LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Push button signal to parallel port to trigger a process

Solved!
Go to solution

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

 

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 1 of 4
(3,927 Views)

@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?

0 Kudos
Message 2 of 4
(3,913 Views)

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

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 3 of 4
(3,907 Views)
Solution
Accepted by topic author Grugh_Mike

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:

  1. Set bit 5 of the control register high (at base address+2).
  2. With nothing connected to the port, write a couple of values to the data port, and read each back after you write it.

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.

Message 4 of 4
(3,900 Views)