07-16-2012 12:19 PM
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
Solved! Go to Solution.
07-16-2012 12:35 PM
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.
07-16-2012 01:49 PM
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)
07-16-2012 01:56 PM - edited 07-16-2012 02:01 PM
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