Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

which function i have to use on labview to write a pattern of digital data on a DAQ board. I am using pci-6024 DAQ board. would anyone help me pleasel.

I am working on a project which writes a column of digital data on labview (S1 -S4 ). I try to use many DIG PORT (write to digital port) function and enclose each one in a sequence structure then the whole program in a while loop. i also put a time delay function for each. when the program runs i get high or low at the output. but i want some kind of means which i can control the duration of each bit whether it is high or low in a COLUMN. is there anyone who can help me or suggest me other way.
thankyou
casu

this is an example how the data flows (from S1,S2,S3...)
S1 S2 S3 S4
1 0 1 0
0 1 0 1
1 0 1 0
0 1 0 1
1 0 1 0
0 1 0 1
0 Kudos
Message 1 of 4
(3,371 Views)
Hi Casu,

First things first. What version of LabVIEW are you using? Is this code you have written in Traditional DAQ or DAQmx?

If you have LV 7.0 or better, you should be using DAQmx. Traditional DAQ is the older driver (black and white VIs) while DAQmx is the newer better driver (DAQmx VI icons are in color). From what you wrote (you mentioned DIG_PORT) it seems like you may be using traditional DAQ. If youhave LabVIEW 7.0 or greater, I would HIGHLY suggest using DAQmx to write your program. It will make things much easier and better in the long run.

From what you wrote, it seems that you would like to control each of your digital lines separately. Right now, you can change the data on the whole port. But you want to change the time that each line is high/low individually. Is this correct? If so, you can configure each line to be a separate channel in DAQmx and control each of them separately. You can start with one of the DAQmx example programs found here:

LabVIEW >> Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Digital Generation >> Write Digital Chan.vi

In this example you can configure your digital channel to be one or multiple lines. You could configure 4 channels (one for each line) and operate them independently.

Please let me know if you have any further questions.

Thanks,
Sal
Message 2 of 4
(3,364 Views)
thank you sal for the big help. I appreciate it. I have some more question if anyone can help me. how can I configure more than one channel on DAQmx virtual channel to write digital data on each channel at the same time. do I have to use many DAXmx virtual channel vi or one.

thanks
casu
0 Kudos
Message 3 of 4
(3,349 Views)
Casu,
You do not need to have more than one DAQmx Create Channel.vi. If you are looking at the example that Sal recommended (Write Dig Chan.vi) then all you need to do is change the 'lines' input to the DAQmx Create Channel.vi. For example, if you were previously writing to line 0 and you want to write to lines 0 through 3, then you can simply change the lines input from Dev1/port0/line0 to Dev1/port0/line0:3. That should do it.
-Alan A.
0 Kudos
Message 4 of 4
(3,342 Views)