LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital waveform to DAQ

Hi,

 

I have generate some digital waveform by reading a text file. the graph that is connected to the waveform is what i wanted. But I need to output this waveform through one line digital output of USB6501. How do i go about doing it?

 

Any help is appreciated. Thanks.

Download All
0 Kudos
Message 1 of 2
(1,085 Views)

When one looks at the specifications for the USB6501, one notes that it cannot do hardware-timed output.  Therefore, you can't use a waveform datatype to generate output with this card.

 

So, you will have to use software timing and a loop.  Since you specify a pretty slow transfer rate (0.5sec), it should work fine.

 

Look at one of the examples that ships with LabVIEW to get you started.  Click "Find Examples...Hardware Input and Output...DAQmx...Digital Generation...Write Dig Chan".

 

Of course, you only want one line.  So when you specify your physical channel, only specify one line.  Change the function inside the loop to "Single Channel...Single Sample...Boolean (1 line)".  Now the function will accept a single boolean value.

 

You do a lot of screwing around with getting your data into the right format.  That can be simplified a lot.  See the attached picture.  This is not complete code -- you will need to look at the example I mentioned -- but this picture and the example, combined, should tell you what you need to know.

 

read file and convert to boolean.png

 

Hope this helps get you started.

 

 

0 Kudos
Message 2 of 2
(1,007 Views)