11-07-2012 04:05 AM
I just need to connect a push button to the parallel port to set it as a trigger signal for a process.
When push button is pressed, labview executes a process.
Kindly help me how to do this, the wiring please
Solved! Go to Solution.
11-07-2012 07:47 AM
@Grugh_Mike wrote:
I just need to connect a push button to the parallel port to set it as a trigger signal for a process.
When push button is pressed, labview executes a process.
Kindly help me how to do this, the wiring please
not quit sure how you want to implement, but did you look at this?
11-07-2012 07:08 PM
if i connect any two pins of the parallel port via push button and then press the button.
Is there any case i can read a signal from any pin in the parallel port using labview?
Thank you in advance
11-07-2012 07:31 PM
Data Lines to be used as inputsSome parallel ports can be configured to use the data lines as inputs. It depends a great deal on the way the manufacturer designed the parallel port. With some models the data lines can be read the same way we read the control lines, by driving them to high logic so they will take on the value of an external signal. However, most parallel ports require that you set the direction bit for input. This is bit 5 in the Control register (base+2). If the port is capable of it, setting the direction bit high has the effect of making the lines tri-state so it can be driven externally. Sometimes it is also necessary to toggle bit 6 high or low. However, it should be noted that some manufacturers actually lock these bits so that software cannot change them. An example is shown below in Figure 7.
To test whether your data lines can be used for input, try the following:
If the reads DON'T match the writes, your port is probably bidirectional. Setting C5 disabled the data outputs and you're reading the open inputs of the data-port buffer. If the reads DO match the writes, your port isn't bidirectional. The data outputs are still enabled, you're reading back what you wrote, and you won't be able to read external signals. If it is possible to use your data lines for input, then you just need to set control register bit 5 high and read from the value of the data lines at the base address.