Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can DAQmx write.vi accept clusters as input data?

Hi,

 

I am continuing to develop my program to write N-different waveforms to N-different channels of a PCI-6703. I have recently learned through the forum that this device cannot accept any timing info from the waveform, so I cannot directly input an array of waveforms to the PCI-6703.

 

I can input a 1D array of waveform samples (e.g. {0,0,0,1,1,1,1,1,0,0,0} as a 5 ms pulse of 1 V samples) to one channel, so I would like to expand that to be a 2D array of waveform samples for N-channels. I have found a nice vi called "Multi Channel Dynamic Config" where it generates all the waveforms and inputs them to the device all at once. However, this means that all N-channels must have the same array length and would not have frequency flexibility across channels.

 

Would it be possible to bundle all the different array lengths into a cluster? --> I have just tried this and since it is a different data type, DAQmx write.vi won't accept it. Just wondering if there is a way around this?

 

A follow-up question is, I need to continuously output the same array over and over again until of a user action. I am playing around with a while loop to output one sample at a time so far, but would there be a more efficient way to do this?

 

I have attached an earlier working form of my block diagram (sans while loop and clusters). Since the period of each wave is different, the program would fill in zeros to make each array the same length as the longest one. I know one solution is to have the period of each wave to be the same, but it would be great if there was the freedom to assign different frequencies!

 

Thanks!!

0 Kudos
Message 1 of 5
(3,537 Views)

... and here's my png.

0 Kudos
Message 2 of 5
(3,535 Views)

Hey M_Vrinkle,

 

I think you might want to take a look at one of the examples that ships with LabVIEW. Open the example finder and browse to Hardware Input and Output >> DAQmx >> Analog Output >> Voltage - Continous Output. This example shows how to continuously write data to the device. The arrays that are fed into DAQmx write all need to be the same length, so the only way to do signals of different frequency would be to find a multiple number of samples among all the different frequencies and output at that frequency.

David S.
0 Kudos
Message 3 of 5
(3,513 Views)

Hi David,

 

Thanks for the suggestion. I tried looking for "Continuous Output" using the example finder, but probably because I have LabVIEW 2011, I could only see examples detailing continuous generation of waveforms. I later found a vi of that name here -- do you mean that one? Unfortunately I cannot open it with my version of LabVIEW.

 

Also, from the block diagram of "Continuous Output", it appears to use "sample clock" for timing and sample generation, but I cannot use that vi with my DAQ card (PCI 6703). Would there be a more efficient way to form my array of N-signals (or update when necessary), extract the correct sample index, and write those samples to my N-channels continuously than from using a while loop and a couple of timers? I don't think I'm explaining this well...

 

Any ideas are appreciated! Thanks again.

0 Kudos
Message 4 of 5
(3,502 Views)

Hello,

 

I think I have solved my problem! I did go back and use the while loop plus a few shift registers, and my signals can show up on a waveform graph. Now I will check them out with an oscilloscope.
 
Thanks for all your help!
0 Kudos
Message 5 of 5
(3,494 Views)