Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dinamically select individual signals from a digital waveform

I have a digital waveform signal captured from port 0 of a DAQ device, which consists of 8 digital lines. It can also be recovered as a 2D array of booleans. I want to be able to select each of these lines individually using switches and send them out on other DIO lines of the DAQ. 

 

I think I've solved the creation of the task but now I'm having a hard time creating the signal which will be sent out. Is there a way of selecting just the required lines and create a 2D (or 1D) array with these signals that can be sent out using the task that I created?

 

 

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

HI thehun,

 

i think i understand what you want, but there is one point i don´t really understand. What do you wanna actually do with your attached programm? 🙂

Do you want to select the lines before you start the task and than switch from line to line ? - I think this is possible

Or do you want to use the attached code to change dynamically the line? - not a good idea 😉

 

 

Best Regards

 

Cochse1991

 

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

Thanks Cochse1991,

 

There are some switches on the control panes and I want to use them to select which lines to output, either directly by the user or by callin gthis subVI from another VI. These lines are contained in the digital waveform. 

 

 

0 Kudos
Message 3 of 5
(3,894 Views)

Hi thehun,

 

sorry for the late update. You could use this example : Dynamically Adjust Frequency and Amplitude for a Generated Sine Wave (DAQmx) - National Instruments
http://www.ni.com/example/29856/en/

But instead of Simulate Signal, you use your digital Wavform. Than you can put your boolean controlls into this while loop and depending of the state of every Controll you multiply your specific line with "Zero" or with "One"

 

A rouge method, put maybe it works 😉

 

 

Cochse1991

Message 4 of 5
(3,870 Views)
use convert from dynamic data
0 Kudos
Message 5 of 5
(3,847 Views)