Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the data format of the DO multiple N Chan N Samp?

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
 


Message Edited by foolooo on 07-23-2008 12:13 PM
------------------------
My blog Let's LabVIEW.
Download All
0 Kudos
Message 1 of 11
(4,559 Views)
Hi Bo,

Can you post the VI you're working with?

Regards,

Dan - NIUK
0 Kudos
Message 2 of 11
(4,539 Views)
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
0 Kudos
Message 3 of 11
(4,533 Views)

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

------------------------
My blog Let's LabVIEW.
Download All
0 Kudos
Message 4 of 11
(4,530 Views)

Hi Graziano,

But the control of the DO N chan N samp is 2D array, so I'm not quite clear about your words. In your example, there is a constant output for 8 channels and it needs a 1D array. Is there any simple format of the data? Thanks.

Best wishes

Bo

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 5 of 11
(4,503 Views)
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
Message 6 of 11
(4,493 Views)

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

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 7 of 11
(4,483 Views)
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 Smiley Happy


graziano
Message 8 of 11
(4,476 Views)
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
------------------------
My blog Let's LabVIEW.
0 Kudos
Message 9 of 11
(4,472 Views)

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

------------------------
My blog Let's LabVIEW.
0 Kudos
Message 10 of 11
(4,469 Views)