# NPN PNP Problem

A

#### Arturo Arevalo

Hi, we selected improperly a Robot with sink I/O and tried to connect it to a PLC with sourcing inputs. Is there any way to "fix" this problem without changing the PLC or the robot?

D

#### Daniel Chartier

Hello,

There are many ways to fix this, depending on your time and budget:
-use a signal conditionner (see Phoenix contacts or Weidmuller, for example)
-use a relay
-use a resistor (pull-up or pull-down, depending on the case).
For example, look at the following discussion on the same subject:

Hope this helps,
Daniel Chartier

Z

#### Zamora E.

Hi,

I believe there is an easy fix to this. Simply place a pull-up resistor (typically 3.3 Kohm) between each of the output terminals and the power supply, that will convert the sinking to sourcing output. Check out this site:
http://www.qcontrol.com/saved/technical_docs/QCI-TD013 Optical IO Module - OPTM and OPTO.pdf

This technical document explains in detail the procedure, and normally most PLC documentation related to I/O control should have a section explaining this. For inputs would be the same, from sink to source using pull up resistor, for source to sink, a pull down resistor from DC to signal line. Be sure to invert the PLC logic where required.

Hope this info helps.

K

#### Ken Emmons Jr.

You might be able to use Pullup resistors on the input of the PLC. The only issue is that the inputs to the PLC will be "true" at power-up, so
don't have a logic state of "true" trigger anything at power up! There are two electrical considerations to sizing your resistor that will tell if it will work or not:

- Your pullup resistor has to be low enough in value to source the right amount of current to the opto isolator circuits of your PLC. You will need the circuit of the PLC input and/or a set of good experiments to find this value out.
- Your output of the robot must be able to drive the pullup resistor current to ground.

---- OR ------

Use PNP transistors to invert the logic.

24V
---
|
|
4.7K Ohm |<-/
---/\/\/\/\----|
Robot |\
Output |
|
|
|-----------> PLC Input

IT may be possible someone makes such an inverter device, but it is easy to prototype on a small scale.

~Ken

A

#### Anonymous

You'll have to run the I/O from the Robot through isolation relays. Doing this will allow you to keep the NPN/PNP I/O seperate.

G

#### Gerald Beaudoin

The usual work around to this situation is the use of pull up or pull down resistors inserted at the input or output. However it usually also requires you to invert the condition being sensed for in the PLC. Make sure to use values of resistors that respect the current ratings of the inputs and outputs, yet are low enough in value to allow the change to be sensed by the input. You may have to experiment a bit, but typical values are 4.7K - 10K.

Gerald Beaudoin

A

#### Anonymous

Hi there,

This can be achieved by running your I/O through isolated relays. Hope this helps.

M

#### Michael Griffin

They are probably separately powered, so you probably wouldn't want to wire the robot directly into the PLC anyway even if they were both of the same type. Put a set of opto-couplers or small relays in between the two.