Lecture_3_PLC_Discrete_IO
Lecture_3_PLC_Discrete_IO
All systems are continuous but they can be treated as logical for simplicity.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 2
Q: I/O devices
There have four types of I/O devices
• Digital input (DI) device
• Analog input (AI) device
• Digital output (DO) device
• Analog output (AO) device
Digital input device:
The field devices that have only two conditions or states, such as ‘ON’ and ‘OFF’, and are used for
collecting data are called digital input devices. For example, switches used to connect a fan to the main
power supply line have only two states either ‘ON’ or ‘OFF’. No other states in between ‘ON’ or ‘OFF’ are
possible. So these switches are digital input devices. Examples of digital input devices are,
• switches,
• push buttons,
• limit switches,
• proximity sensors, or
• Other sensors that provide a simple ON/OFF signal.
Digital input devices generate binary signals.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
• distance sensor,
• liquid level sensor,
• other sensors that provide a continuous signal.
Analog inputs devices generate analog signals.
Digital output device:
Page | 3
The field devices that we want to control and have only two conditions or states ‘ON’ and ‘OFF’ are called
digital output devices. For example, an electromagnetic relay has only two states either ‘ON’ or ‘OFF’. No
other states in between ‘ON’ or ‘OFF’ is possible. When we want to control a motor (fan) is either connected
or not to the main supply then it is digital output device. Example of digital output devices are,
• Electromagnetic relays
• Solenoid valve
• Magnet contractor
• Motor starter
Digital outputs devices or actuators require digital signals.
Analog output device:
The field devices that we want to control and has many positions or state rather than only two conditions
‘ON’ or ‘OFF’ are called analog output devices. When we want to control the speed of motor (fan) then it
is an analog output device. The speed control of motor can be achieved by analog output device VFD. If
we are measuring the pressure using analog input and we would like to display it on an analog meter you
can use an analog output of PLC.
Example of digital output devices are,
• Proportional valve
• VFD
Analog outputs devices or actuators require analog control signals.
The interface between the CPU of PLC and output actuator devices is called the output module. Output
modules perform four tasks in the PLC control system,
• receive a signal from the processor
• convert the received signal to the correct voltage level for the output devices
• isolate the PLC from fluctuations in the input signal's voltage or current
• activate the output devices.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Q: IO module
The input/output (I/O) section or IO module of a PLC is the section or unit to which all field devices are
connected and provides the interface between them and the CPU.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 6
(a): The load is in sourcing mode and the output (a): The output module is in sourcing mode, and
module is in sinking mode the load is in sinking mode
Fig. 2: Illustration of sourcing and sinking concept.
For both of these methods, the emphasis is on current flow, not voltage.
A PNP transistor is used for the sourcing output, and an NPN transistor is used for the sinking input.
Sinking and sourcing terminology applies only to DC input and output circuits.
If a device provides current when it is ON, it is said to be sourcing current. Conversely, if a device receives
current when it is ON, it is said to be a sinking current.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 7
(a)
(b)
Fig. 4.3: A typical sinking sensor and sourcing input module configuration.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
to an NPN transistor. This will turn on the transistor, and effectively close the switch. This will allow current
to flow in the following direction.
positive terminal of battery → Transsitor emitter → transistor collector → pin 1 of input module
→ pin 2 of input module → negative terminal of battery
So the transistor is acting as the source and input module is acting as the sink.
Page | 8
(a)
(b)
Fig. 4.4: Sourcing sensor and sinking input module.
Q: What is an optoisolator?
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Opto-isolators are devices that use a light emitter to control a photo-switch. The effect is that inputs and
outputs are electrically separate but optically connected.
Optical isolator provides electrical isolation between field wiring and the PLC internal circuit. It consists
of LED and phototransistors. The circuitry to the LHS of the isolator is powered from the field and the
circuitry to the RHS is powered from the internal PLC voltage source.
Page | 9
Q: Why are input devices not directly connected to PLC?
These PLC input devices are not just connected directly to the PLC for specific reasons.
• It is not assured that someone will always connect a properly rated device (output is 24V DC) for
the PLC input.
• A different polarity of DC input may be connected to the I/O module of the PLC.
• The optoisolation prevents the external events from interfering with the PLC and causing a
module failure.
For these specific reasons, the PLC is kept safe by a principle called optoisolation.
PLCs have miniature versions of photoelectric switches in order to protect the system.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 10
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Signal indicator: Resistor 𝑅1 and signal indicator form a voltage divider. The signal indicator indicates
that the signal is imputing.
Bridge rectifier: Bridge rectifier converts AC voltage into DC voltage.
Resistor 𝑅2 : it is a safeguard for LED.
Optoisolator: It provides an isolation between two circuits.
Page | 11
𝑅3 and C: It forms a voltage divider in the output section.
The operation of the circuit can be summarized as follows:
• The input noise filter consisting of the capacitor and resistors R1 and R2 removes false signals
that are due to contact bounce or electrical interference.
• When the pushbutton is closed, 120 VAC is applied to the bridge rectifier input.
• This results in a low-level DC output voltage that is applied across the LED of the optical
isolator.
• The zener diode (ZD) voltage rating sets the minimum threshold level of voltage that can be
detected.
• When light from the LED strikes the phototransistor, it switches into conduction and the status of
the pushbutton is communicated in logic to the processor.
• The optical isolator not only separates the higher AC input voltage from the logic circuits but also
prevents damage to the processor due to line voltage transients. In addition, this isolation also
helps reduce the effects of electrical noise, common in the industrial environment, which can
cause erratic operation of the processor.
• For fault diagnosis, an input state LED indicator is on when the input pushbutton is closed. This
indicator may be wired on either side of the optical isolator.
• An AC/DC type of input module is used for both AC and DC inputs as the input polarity does not
matter.
• A PLC input module will have either all inputs isolated from each other with no common input
connections or groups of inputs that share a common connection.
Q: Explain the sinking sensor and sourcing input module with an optical isolator.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 12
Q: Explain the sourcing sensor and sinking input module with an optical isolator.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 13
Q: What is the function of the optical isolator circuit used in discrete I/O module circuits?
Provide isolation between the field devices and the CPU
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
• Isolate the PLC from fluctuations in the input signal’s voltage or current.
• Send a signal to the processor indicating which sensor originated the signal.
Q: What will happen if sinking or sourcing devices are connected in opposite direction.
Input and output points that are sinking or sourcing only can conduct current in only one direction. Page | 14
Therefore, it is possible to connect the external supply and field device to the I/O point with current trying
to flow in the wrong direction, and the circuit will not operate.
(a): Relay type output module (b) Solid-sate type output module
Fig. 3
• Triac outputs can be used only for control of ac devices,
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
• transistor outputs can be used only for control of dc devices.
• Relay outputs can be used with ac or dc devices.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 16
• The transistor output module is voltage-dependent and can only operate DC loads.
• Transistor output modules are for DC applications only.
• Transistors typically cannot switch a large load current as can a relay.
• A transistor is fast because there are no mechanical parts. Their response time is much faster than
relays.
• Because a transistor is not a perfect switch, there is always a small voltage drop across it when
turned on.
• In some transistor modules, there is a leakage current even when turned off.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
• As with the transistor, a Triac is much faster than a relay.
• Triac outputs are suited to low-power AC loads such as lighting, motor starters, and contactors with
current ratings of around 1 amp.
• Example: The Siemens 6ES7522-5FF00-0AB0 is an 8-output Triac Output Module
Page | 17
(a) (b)
Fig. 2
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Page | 18
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Figure 2-15 shows the block diagram for one output of a typical discrete output module. It is composed of
two basic sections: the power section and the logic section, coupled by an isolation circuit. The output
interface can be thought of as an electronic switch that turns the output load device on and off. Logic circuits
determine the output status. An output LED indicates the status of the output signal.
Page | 19
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
Q: Discrete TRIAC output module
Figure 2-15 shows the block diagram for one output of a typical discrete output module. It is composed of
two basic sections: the power section and the logic section, coupled by an isolation circuit. The output
interface can be thought of as an electronic switch that turns the output load device on and off. Logic circuits
determine the output status. An output LED indicates the status of the output signal.
Page | 20
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
• The triac cannot be used to switch a DC load.
• For fault diagnosis, the LED output status indicator is on whenever the PLC is commanding that
the output load be switched on.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO
গগোপোলগঞ্জ বিজ্ঞোন ও প্রযুবি বিশ্ববিদ্যালয়
Gopalganj Science and Technology University
ইললবিক্যোল অ্যোন্ড ইললিবনক্ ইবঞ্জবনয়োব িং বিভোগ Dept. of Electrical and Electronic Engineering
ইবঞ্জবনয়োব িং অ্নুষদ Faculty of Engineering
গগোপোলগঞ্জ-৮১০০, িোিংলোলদশ Gopalganj-8100, Bangladesh
• The signal from the PLC is converted to a corresponding analog or digital signal according to the
module to which it is connected.
This process of reading the input value, executing the program, and writing the output value is called
scanning.
Page | 22
Q: Process of turning the output devices ON or OFF
In reality, turning the output devices ON or OFF occurs in two steps. First, as the processor executes the
internal programmed logic, it will turn each of its programmed internal output coils ON or OFF. The
energizing or de-energizing of these internal outputs will not, however, turn the output devices ON or OFF.
Next, when the processor has finished evaluating all of the control logic program that turns the internal
coils ON or OFF, it will perform an update to the output interface modules, thereby turning the field devices
connected to each interface terminal ON or OFF. This process of reading the inputs, executing the program,
and updating the outputs is known as the scan.
Q: What electronic element can be used as the switching device for a 220 VAC discrete output
interface module?
TRIAC
Q; What electronic element can be used as the switching device for DC discrete output modules?
Transistor
Q: A discrete relay-type output module can be used to switch either AC or DC load devices. Why?
Relay
References
1. Frank D. Petruzella. “Programmable Logic Controllers,” McGraw-Hill Education, Fifth
Edition, 2017.
2. L.A. Bryan, E.A. Bryan. “Programmable Controllers: Theory and Implementation,” An
Industrial Text Company Publication, Atlanta, Georgia, USA, Second Edition, 1997.
3. Hugh Jack. “Automating Manufacturing Systems with PLCs,” Version 5.1, March 21,
2008.
4. W. Bolton. “Programmable Logic Controllers,” Elsevier (Newnes), Sixth Edition, 2015.
Dr. Md. Rabiul Islam, Associate Professor, EEE ∥ [email protected] ∥ PLC Discrete IO