LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

State of digital output lines

Solved!
Go to solution

I am writing digital output lines on a cDAQ 9403 module to control some relays using LabView (DAQmx).  I can write the lines without difficulty.  After writing the line with the first VI, I would like second VI to be able to know/inquire about the state in which the first VI left the line.  

 

Is there any sort of "read" function that will tell me the state of digital output line?

 

I have developed a work-around by writing and reading a global variable, but this doesn't tell me the actual state of the lines - only the state that I think I last wrote them.

 

Thanks in advance for any suggestions!

0 Kudos
Message 1 of 6
(746 Views)

I think you can just do a DAQmx Read.  I will have to play around to verify.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(740 Views)
Solution
Accepted by topic author BikeSki

If I understand the question you are asking, you want to monitor the output of a DO line, the actual (TTL) Boolean value it is producing.  Depending on your DAQ device, all you need to do is to connect the DO output to a DI input, then do a DAQmx Read of the corresponding DI line (which, of course, will give you a Boolean that should equal the Boolean you used to set the driving DO line).

 

Bob Schor

0 Kudos
Message 3 of 6
(737 Views)

Thanks Bob!

 

A hardware solution hadn't occurred to me, but what you have suggested would certainly work since I am using less than half of the lines available to me on my 9403 module.  Your solution would give me the actual state of the lines with 100% certainty.

 

What I had in mind was some way of accessing the register that (presumably) exists in the 9403 that sets (and holds?) each line either high or low.  If I could get such access, it would be a notch better than my global variable, but not as good as your digital input hardware measurement.

0 Kudos
Message 4 of 6
(727 Views)

I suspect that the reason NI doesn't provide "monitoring" terminals for their DO devices is that (for the most part) they are designed to be reliable, and to build in "proof of reliability" would be a waste of circuitry and terminals.  To what are you connecting your DO device?  If it is designed to accept a 0-5V signal, with 0-0.8 V being False, and 2-5 V being True (those are, I believe, the TTL standard voltages), and you aren't driving 20 m of cable, you should be Good to Go.

 

Bob Schor

0 Kudos
Message 5 of 6
(695 Views)

Yup, driving a bunch of SSRs.  Should be no problem as you suggest.  Thanks again!

0 Kudos
Message 6 of 6
(690 Views)