LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Input & Digital Port?

I'm using LabView 6.0.2 and NI DAQ card PCI-6025E. I want to read a line state (high or low) at the digital port (port 3 in this case) using analog input. Each time I put a high state at port 3 (any line) using "Write to Digital line.vi" and try to read it with an analog input vi connecting directly to the same digital port line, but the line state reset itself to a low state. Does anyone know why this happened and how to fix this problem?

Thanks in advance,

CH
0 Kudos
Message 1 of 5
(3,455 Views)
CH,

Can you attach your VI so I can look at it?

Thanks,

Mark
0 Kudos
Message 2 of 5
(3,455 Views)
Mark,

I know what the problem is now, but I still need your help to make it work. Hope you can help.

The problem happens when I use a "Write to Digital Port.vi" in the first frame in a sequence and then use it again in the next frame. What really happen was in the first frame it write a high and then the next frame it resets to low. Looks like the digital ports are not independent. Hope this is not confusing to you. Attached is an example of what I'm doing.
0 Kudos
Message 3 of 5
(3,455 Views)
I looked your VI. You must connect the ITERATION input to a number different of 0. This iteration should be 0 only in the first Frame. This input is used to configure the port to be Input or Output. If the Itertation is Zero, the Card is reseted every time and the signal High that you wrote in the first Frame is settet back to Low.
0 Kudos
Message 4 of 5
(3,455 Views)
Thanks for your comment.

I need the third frame of my example vi to go through iteration 0 again or else it will not work. In the third frame, I try to put a constant of 1 for iteration on both "Write to Digital port.vi" and still does not work.

I maybe wrong, but the way I see it you cannot use two digital port vi in the same vi. It's ok to use two digital port vi in the same frame or location in a vi, because they execute at the same time. If they execute one after another ( like my example), the second one will reset back to a Low. This is not what I want. I want the line state to stay unchange.
0 Kudos
Message 5 of 5
(3,455 Views)