LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Physical button boolean

Solved!
Go to solution

Is there an easy way to assign a boolean value to a digital pulse?  For ease of use, I need to create a box of switches (actual, physical, real life switches) that correspond to the boolean switches in my program so I don't need tto constantly hover over a computer during my experiment.  Is it possible to set a port to give a true value if, say, it is held at a voltage above 5V and false if not?  That seems to be the most simple, direct approach.  I tried poking around the example programs, but that didn't yeild much help.  Then again, I may have been looking in the worng place.  

 

Using LabView 2009 SP1

0 Kudos
Message 1 of 4
(2,584 Views)
Solution
Accepted by RBeck

Not sure what you mean by an "easy way", but if you look at the example finder under Hardware Input and Output >> DAQmx>> Digital measurements>>  Read dig channel.vi.  That should work as long as your voltage signal is within the ranges of a digital signal.  Or like you said for a voltage reading you would just check if the actual voltage is greater than whatever voltage you choose. 

0 Kudos
Message 2 of 4
(2,576 Views)

Using a DIO card with DAQmx would be the easiest.  But I feel you are going to add a big complication on us.  Are you trying to have the change in physical switches cause an event that the software switch would perform?  (I'm not sure how to properly word my question, so hopefully you figure what I'm asking)


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 3 of 4
(2,563 Views)

If you are not using a DIO card or DAQmx and have an unused parallel port you can use that for digital IO.

 

http://digital.ni.com/public.nsf/allkb/B937AC4D8664E37886257206000551CB

=====================
LabVIEW 2012


0 Kudos
Message 4 of 4
(2,558 Views)