Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

to detect counter output through parallel port

Solved!
Go to solution

i need to detect the counter counting trigger, everytime for performing an operation. I am thinking of getting the signal through the input pins (status or control pins). The counter am using is omron H7EC.

 

I have lowered the voltage from 24 V to 5V using resistances.

But i cannot get the input through the parallel port.

 

All my status pins are high always.

 

What should i do, please help.

 

In the parallel read write loop.VI, the starting screen is attached herewith.

 

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 1 of 7
(3,555 Views)

Hi grugh,

 

Do you have all the pins of the parallel port connected or are some floating? According to this document, if certain pins are left floating it can affect the reads and writes to the port.

 

Also, could you post the whole VI and detail how the port is connected?

 

Take care!

Tanya Visser
National Instruments
LabVIEW Group Manager
Message 2 of 7
(3,532 Views)

The screenshot i took was without any connections to the parallel port.

 

I just need the computer to detect the counter signal, so which pins should i use?

 

Which is better, status or control?

Do help me regarding this.

 

Is there a need of any pull up resistance or can i straight away connect the 5V supply directly to the pin?

 

Plz reply at your earliest.

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 3 of 7
(3,508 Views)

Hi grugh,

 

Take a look at the example "Parallel Port Read and Write Loop.vi". You can find this example by searching for "parallel" in the Example Finder. This has code for reading from the parallel port. The values you want to read should be connected to the data lines. Look at the second tab in the VI to see which pins are the data lines. There are instructions on the front panel of the VI about how to connect your pins.

 

Also, why are you be connecting a 5V supply directly to a pin?

 

The easiest way to read the values from your device would be to use a Digital I/O card. Would this be an option for you?

 

Take care!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 4 of 7
(3,478 Views)

You may also find this KnowledgeBase article useful:

 

How Do I Use the Parallel Port in LabVIEW?

 

Take care!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 5 of 7
(3,475 Views)

i have tried connecting my 5V from the counter to the parallel port.

Till now i have not got a detect signal from the computer.

 

How can i configure the data pins for input?

I have made the bidirectional bit of control register logic 1, then all the data pins turn logic 1.

But when i supply my 5V to any data pin, i am not getting any response.

 

The only response i get is when i short the data pin and the ground.

 

So is it not possible to make the input mode data pins turn to logic 0?

 

is it not possible to detect the occurance of a 5V signal through data pins?

 

Please help, i have tried many times.

Am desperate for an answer.

 

please.

Regards
Grugh Mike

Success is Everything !!
0 Kudos
Message 6 of 7
(3,458 Views)
Solution
Accepted by topic author Grugh_Mike

I suspect the inputs pins on the parallel port have a weak pullup resistor to 5V, thus they tend to float high (logic 1).

 

Try adding a pulldown resistor of 4,700 ohms between the input pin and ground of the parallel port, see if it then reads low (logic 0). If so, then keep the resistor in place and connect the 5V signal you wish to monitor to the input.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 7 of 7
(3,444 Views)