Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

switch closure not detected at higher equipment speed

I have a data aquisition stop switch programmed into my Labview VI that is an analog 0-5v signal. The switch itself is a magnet operated reed switch. When a magent passes the switch, it will momentarily open. Once the magnet has passed the switch the switch closes again. This causes the voltage to drop from 5 volts to 0 volts for a very short duration. This works well when the duration the magnet passed the switch is substantial enough to let labview read the momentary pulse. The switch is programmed into a while loop that performs the aquisition of 12 channels of data and some data analysis.
However, the faster I make the machine operate the more often the program misses the stop data aquisition switch. Is there a way I can program labview to momentarily latch this switch long enough for the program to read it consistently regardless of the speed of the machine. A 1/2 second latch duration would be adeqate for my needs. I do know there is a way to do this with an electronic circuit , but I would prefer to do it Labview.
0 Kudos
Message 1 of 2
(6,095 Views)
Hello,

I'm assuming from your message that you have a physically separate switch from your system (ie. not a relay on a plug-in board). I'm also assuming that you are reading the analog voltage from that switch using a DAQ board. This forum area is primarily for users of actual NI switching hardware (ie. relays on a plug-in board) and related software. I'll try to answer your question, but if it's not helpful you might want to try re-posting your message with a little more detail to the DAQ or LabVIEW forums.

The answer to your question may depend a lot on how you are reading the analog input. Are you using single point values or are you using a continuous acquisition and examining the buffers as they come back. If you are using single point, the number of times that you can sample the channel will be reduced and the likelihood of missing the voltage change will be higher. By doing a continuous acquisition and then looking at the buffers for a change in state, you will have more determinism as far as your minimum time is concerned.

Given that you have 0 and 5 volt levels, you might also be able to use a counter to count changes. If the count hasn't changed, no one has touched the button. If the count has changed, they have. This might be more reliable.

There's probably a number of other ways to accomplish the same behavior. Again, if this doesn't help please feel free to post with a little more detail on what hardware you are using and how it is hooked up and I'm sure that someone can help!
0 Kudos
Message 2 of 2
(6,087 Views)