Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Maximum Length Sequences in Multiple Channels

I would like to send out independent maximum length sequences to multiple physical channels.  At present, I am only able to send the same maximum length sequence to multiple channels.  I have tried using LabVIEW's native MLS Waveform VI and append them as an array and send it to DAQmx Write to multiple channel but it does not work.  Could anybody give some advice or point me to the solution if it is already documented in NI's FAQ?  Also, while reading up on MLS Waveform signal, I came upon Binary MLS Signal.  Could anyone explain the difference between waveform-based and array-based signals?  Thanks in advance.
0 Kudos
Message 1 of 4
(3,822 Views)
Hi Kelken,

you can generate various sequences and connect them individually to your DAQmx-Write. Then you should be able to read different signal on your channels.

Could you please post your VI. This would give me the possibility to have a look at your code to fix the problem.

Thanks in advance.
National Instruments
District Sales Manager
0 Kudos
Message 2 of 4
(3,796 Views)
Hi,

I have somehow gotten my code to work.  It was mainly the confusion between array-based and waveform-based signals.  But one point I am still not quite sure, perhaps you could further elaborate on this point, is as follows.  I have employed 32 Binary MLS vi and limited the number of samples to be 1 per MLS vi.  Does each Binary MLS vi generate just one sample for every loop, or it generates a long sample and then sends one sample to the physical channel and discards the rest?  I have also realised that employing 32 sources is a bit overkill.  Can one rewrite the code using just one MLS source?  I would also like to know the difference between array-based and waveform-based signals.  How can I rewrite this code using the waveform-based MLS signal generator?  Thank you very much for answering.

Regards,
Kelken
Download All
0 Kudos
Message 3 of 4
(3,778 Views)
Hi Kelken,

Does each Binary MLS vi generate just one sample for every loop, or it generates a long sample and then sends one sample to the physical channel and discards the rest? 

It generates as much samples as you wired at the input.
Inside the VI there is a for loop. If you wire a value 128, the for loop is running for 128 times, and generates 128 samples. If you only wire a "1", there will be only one sample.


I have also realised that employing 32 sources is a bit overkill.  Can one rewrite the code using just one MLS source? 

Yes you can use one source, that's enough.

I would also like to know the difference between array-based and waveform-based signals. 

Array based signals don't have as much informations as waveform based signals.
Waveform signal e.g. have a timestamp,...
See screenshot.


How can I rewrite this code using the waveform-based MLS signal generator? 
If you want to rewrite this code using waveforms, you have to add your arry to the normal waveform data.
The simplest way to see what I mean is the following:
Set you "Daqmx Write" to Waveform (Multiple Channels -> Single Sample -> 1D Waveform)
Then create a control as input. Here you see all the data in the waveform, including an array. This array should be your array, so you have to build your own waveform.


Hope this helps.
Best regards
Dippi
0 Kudos
Message 4 of 4
(3,753 Views)