Digital outputs: How to wire digital outputs
About the limitations of digital outputs and their operation
- ACE digital outputs are NPN transistor outputs. NPN Outputs = Negative logic. Which means that they provide the ground connection turn on a load. Outputs complete the circuit to turn on any connected DC device up to 30 VDC and 300 mA.
- The actual current limit is shown in the figure at right of this page and is dependent on the number of digital outputs that are ON simultaneous and their duty cycle.
- If I’ve only 1output always ON or 2 at 50% duty cycle, you can go up to 300 mA
- If I’ve 2 outputs simultaneously ON or 4 at 50% duty cycle, you can go up to 200 mA
- If I’ve 3 outputs simultaneously ON or 6 at 50% duty cycle, you can go up to 150 mA
- Each ouput includes diode snubber protection, for inductive load (solenoids, relays, etc.) protection. The supply voltage, up to 30VDC, which is connected to the load devices, must be connected to the VO terminal pin, next to output 6 of the output port, to enable this protection.
- Each output is connected, through a 33K ohm resistor to the VO terminal pin (next to output 6). This acts as a weak pull up. When the output is off (logic state 0), the output will be pulled up to the voltage at the VO terminal. If no power supply connection is made to the VO terminal, the voltage at the VO terminal will come through a 10 ohm resistor and an isolation diode, resulting in a voltage approximately 0.7 V below the 5V (4.3V) supply to the PLC
The logic is the following
- When the OUTPUT = 1, we link the output to the (-) GND (-)
- When the OUTPUT = 0, the output is linked to almost nothing! (in reality, to the (+) terminal pin via a 33K ohm resistor)
Wiring an output and pin description
|Your load (here, the indicator light) must be connected to:
|The ACE outputs are connected:
- VDC (+) is the + of your power supply. From 5 to 24 VDC.
- GND (-) is the – of your power supply.
- (+) it is often the last pin of your connector
- (-) it is often the first pin of your connector
- OUTPUT is an output of your ACE PLC
How to wire the output to a relay or an indicator light?
Don’t forget to wire the (+) to the VDC (+). It is used to eliminate the current feedback of inductive loads (electromagnet, contactor coils, relays,..)
to a relay
to a indicator light
Read more: How does the outputs work?
|Each output is connected, through a 33K ohm resistor to the VO terminal pin (next to output 6). This acts as a weak pull up. When the output is off (logic state 0), the output will be pulled up to the voltage at the VO terminal.
If no power supply connection is made to the VO terminal, the voltage at the VO terminal will come through a 10 ohm resistor and an isolation diode, resulting in a voltage approximately 0.7V below the 5V supply to the PLC. This is enough to allow the PLC outputs to directly interface TTL circuits.
If voltage is connected from an external source to the VO terminal, inactive outputs will pull up to the external source voltage.
If AC power, or higher power DC needs to be switched, the Ace’s digital output ports can be connected to a Relay Terminal Block module, through a short standard cable, supplied with the module. With a Relay module, up to 250VAC and 5 Amps can be switched under program control. The cable diagram connection to the PLC digital output port pluggable connector is illustrated in the Relay Terminal Block module documentation.
The digital outputs are open collector / ULN2003. The latter has a specification of 500 mA. The ACE is specified at 300 mA if only 1output always ON or 2 at 50% duty cycle.
How do I connect my output to a PNP input?
You can add our Optocoupled Sourcing Transistor Board TBTN06-35H (see our Shop page)
Or… Add a pullup resistor of 2.2 kΩ… But in this case the logic will be inversed.
For reverse the logic of output in your program, add this program (example for outputs D and E outputs) at the beginning of your main program:
Here, we reverse the logic of 12 outputs (D1..D6 and E1..E6) by additing 255 with the Xor function of the Calculator tool.
You can named each « ROutBitXn » by any name you want.
About issues with the outputs if you don’t wire correctly
About the only thing that will cause one of our PLCs to reset or to be damaged is a high voltage spike
- They only two things that will damage a digital output is over current and over voltage.
- Over voltage spikes could occur on the port if either output is connected to an inductive load (relays are inductive loads) and you have not connected pin 8 (the VO pin) of the digital output port to the positive voltage of the power supply.
- The current is based on the load & should be limited to 300mA nominal & less if multiple outputs are on simultaneously (curve on top of this page).
- Other potential causes are an unstabilised-filtered power supply. You can add RFI filter before the power supply (220 VAC)
- In most cases, connecting GND to Ground solves many problems.
- And also the use of power supply to power the PLC and another power supply for the relays, without connecting the grounds of both power supplies.