Discussion:
What's the data format of the DO multiple N Chan N Samp?
(too old to reply)
foolooo
2008-07-23 17:10:11 UTC
Permalink
Hi all,
 
I'm doing high speed DAQ with PCIe-6251 board under win XP, I created a subVI to generate the data to be written into the board. I'm doing 8 channels DO with 64 samples (or more later). The output I want to achieve is like
 
As you can see, the frequency of a channel is half of the previous one.
So I created the following array:
 
The value of data changed with the channel. I don't consider it as the best solution, for it is more complex than I expected. But after I write them into the buffer, it works. And if I use 1 instead of 2, 4, 8 and so on, I won't see the wave from the DO channels except line 0; if I create a 1D array from 0 to 63, then there is an error telling that the sourse of the data does not match with the target.
So is it the only format of the data? Is there some others? Thank you.
 
Best wishes,
Bo
 
DanBrowne
2008-07-25 08:40:08 UTC
Permalink
Hi Bo, Can you post the VI you're working with?Regards,Dan - NIUK
Graziano
2008-07-25 10:10:08 UTC
Permalink
Hi!    You can handle 8 channels as a single Byte, take a look at examples, such as "Write digital port.vi".   If it does not help, I think you should post your code, or even a picture of it!graziano
foolooo
2008-07-25 13:10:10 UTC
Permalink
Hi,
Thank DanBrowne and Graziano for your replies. Here is my vi file. And could you check for me if that's the only "format" (which is kind of complex) for the DO N Chan N Samp, and I do believe the subVI can be optimized. Sorry I didn't figure it out based on the example, and thank you for your advice.
Best wishes
Bo


practice DO N Chan N Samp.vi:
http://forums.ni.com/attachments/ni/250/41831/1/practice DO N Chan N Samp.vi


data in digital output.vi:
http://forums.ni.com/attachments/ni/250/41831/2/data in digital output.vi
foolooo
2008-07-28 16:40:10 UTC
Permalink
This post might be inappropriate. Click to display it.
Graziano
2008-07-29 06:40:08 UTC
Permalink
Hi!    It's been a long I don't work with DAQ, but I think the problem is in the difference between N channel out, and Port output! If you configure your output as a port output, you will need a 1D array to generate 8 bit parallel protocol.      My problem is that I can't quickly test what I'm saying because I've no hardware... graziano
foolooo
2008-07-29 11:40:10 UTC
Permalink
Hi Graziano,
Thank you for your replay. So if I want to use one byte to handle 8 channels, I need to set the DO as "Digital 1D Wfm NChan NSamp", is that correct? But in that case I have to generate a waveform for the data, and it makes things complex again... I'm not very clear about that. Thank you for your patience.
Best wishes
Bo
Graziano
2008-07-29 15:10:08 UTC
Permalink
Hi!    I think you have to use the DAQmx write, set to "Digital 1D U8 Chan NSamp".   I'm currently simulating a device under MAX, and with LabView 8.5.  Which version of DAQ and LabView are you using?   I usually program with LV 7.1, without DAQ (I program for FieldPoint and PC), but I can test under VMware machine with DAQmx and LV 8.5...   Let me know if you find the solution, while I'm trying to do this in (scarce) spare time :smileyhappy:graziano
foolooo
2008-07-29 15:10:09 UTC
Permalink
Hi,
 
Did you mean "Digital 1D U8 1Chan NSamp"? Sorry, I didn't see the #chan you set, but I set it as 1 channel now and I'm going to test it. Thank you for your reply, I'll tell you as soon as I solved it. Thanks.
 
Regards,
BO
foolooo
2008-07-29 15:40:08 UTC
Permalink
Hi,
Thank you, it works! I set the Ling grouping of DO as "one channel for all lines", the DAQmx Write as "Digital 1D U8 1Chan NSamp", and the lines of the physical channels as "Dev1/port0/line0:7". Thank you for your advice!
Best wishes
Bo
Graziano
2008-07-29 21:40:06 UTC
Permalink
Hi!    it's nice to be helpful, even if it was a simple task! :smileyhappy:   Have a nice day!graziano
Loading...