0% found this document useful (0 votes)
4 views76 pages

PLC I/O Modules Overview

Uploaded by

dinhthien914
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views76 pages

PLC I/O Modules Overview

Uploaded by

dinhthien914
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

TRƯỜNG ĐẠI HỌC BÁCH KHOA HÀ NỘI

UNIVERSITY OF SCIENCE AND TECHNOLOGY

Lecture
PLC and Industrial system

PhD. Nha Tuong Linh


Content
Chap 5. I/O modules

5.1. Digital input DI

5.2. Analog input AI


5.3. Digital output DO
5.4. Analog output AO
5.5. Communication
General (I/O)

PLC’s structure
Type of I/O
5.1. Digital input (DI)
❑ Characteristics

Connect incoming signals to DI Connect incoming signals to DI


(Siemens S7- 1200) (Allen Bradley)
❑ Characteristics

➢ Is a channel to connect to peripheral devices with ON/OFF input


signals such as: Switches, digital sensors, ...
➢ Each I/O address used by the PLC has a unique address
➢ Each pin of the input module acts as a contact.
➢ The power source used for the DI module can be 24v, 5v DC
power source or 110V 220V AC power source
➢ Sinking (Rút dòng)

NPN transistor
4. Các mô đun vào ra
➢ Sinking-style input (Rút dòng)

+ The COM common pin


connects to the negative
terminal of the source, the INPUT
source anode will connect PLC
through the contact to the PLC 24VDC
input.
+ This type of auction is used COM
for PNP sensors
Example1: Relay-type induction into the
input of a sinking-type PLC

When operating, the output allows


current to flow to the COM common
pin. This type is most effective when
all devices have different supply
voltage sources.
Example 2: Connecting a PNP sensor to a sinking-type PLC input
module
➢ Sourcing input( Dẫn dòng)

Transistor PNP
+The positive terminal of the
source is matched to the COM pin,
the source cathode is connected COM
PLC
through the contact to the input
24VDC
+This type of duel is used with NPN
input sensors INPUT

+This type is more common than


the sinking type
Example. Connect the contact and sensor to the input module of
the sourcing-type PLC.
5.2. Analog input AQ
❑ Characteristic
➢ It is a channel to connect to peripheral devices with signals
with similar properties such as: heat sensors, light sensors,
pressure, ...
➢ As an analog/A/D converter
➢ Currently on the plc integrated 2 common forms of analog
input and output as follows:
+ 0-10V: analog voltage reading from 0-10V.
+4-20mA: current reading 4-20 mV.
The 4-20mA signal reading form is used more in practice thanks
to its ability to pull the wire away without the signal being
weakened
❑ Classifications

➢ Unipolar module: can accept input signals that vary only


with positive values.
For example, the output voltage value of the device from 0-
10V uses a unipolar module.

➢ Bipolar modulus: The dipole signal oscillates between the


maximum negative value and the maximum positive value.
For example: A device with an output voltage from -10V to
+10V uses a dipole module
❑ Hardware connection
With voltage-type probe device

With current-type measuring device


❑ Hardware connection

Connect 2-wire, 3-wire, 4-wire devices(Siemens S7-1200)


❑ Analog input signal processing in PLC

Analog signal processing process in PLC


❑ Analog signal processing in PLCs
➢ Convert values by scale mapping (Normalization of input
variables)
OUT
OUT = (VALUE-MIN)/(MAX-MIN)
+ VALUE: Input range value 1
+ MIN: minimum value of output
+ MAX: the best value of the
output 0
+ OUT: output value MIN MAX VALUE
Convert numeric values to the actual values of measuring devices

OUT = VALUE*(MAX - MIN) + MIN

+ VALUE: Input reading value +


MIN: minimum value of input OUT

+ MAX: the best value of the MAX


input
+ OUT: output value MIN

0 1 VALUE
For example: Read the temperature value of the thermal
sensor as 0 – 2000C, corresponding to the voltage value 0 –
10V
=> The analog input will read from 0 – 27648 and save as
Word data OUT

The reading value is 8000, then the 1


corresponding output value is:

OUT = (8000-0)/(27648-0) = 0.289 0

0 27648 VALUE
=> The analog input will read
from 0 – 27648 and save as OUT

Word data 200

The reading value is 0.289, then


the actual output temperature 0
value is: 0 1 VALUE

OUT = 0.289*(200-0)+0 = 57.80C


Result: Analog input signal processing program with
temperature sensor using Siemens S7 1200 PLC on TIA
PORTAL V15.1 software
4.3. Digital output
❑ Characteristics

➢ Is the channel to connect to digital output devices


➢ Output signals can be provided to contactors, solenoids,
relays... to control actuators or industrial processes.
➢ The digital output of a PLC is usually relay type, but they can
also be solid state electronics such as transistors for DC output
or Triacs for AC output.
❑ Classifications

Relay type Transistor


type

Triac type
➢ Relay output
+The relay output is switched on
and off by mechanical contact, the
durability is not long, the switching
frequency is not high, only about 1
Hz.
+The advantage of the Relay Relay Output
output is that it can use both AC
and DC voltages with many
different levels, the maximum
allowable current is up to 5A.
➢ Transistor outputs
+ Transistor output is made of
semiconductor components, so it is
highly durable, can withstand a high
number of switching times, and has a
pulse frequency of up to 100Khz.
Fig 4.4. Transistor output
+The limitation of the transistor output
is that it cannot use AC voltage and the
current through it is limited to less
than 0.5A.
➢ Triac output
+ The triac output switches on and off
faster than the relay type and has a
longer lifespan

+ Triac output can be used with AC


voltage.
Transistor output
❑ Hardware connection

Sinking type

Connect the digital output module to the output device (Sinking)


Sourcing type

Connect the digital output module to the output device (Sourcing)


5.3. Digital output
For example, connect a 220VAC electric motor and a 24VDC
indicator light to the 24VDC output module in Sinking and
Sourcing mode.

Sinking circuit Sourcing circuit


❑ Characteristics

➢ The analog output module receives data from the PLC's central
processing unit. Data is transmitted proportional to voltage or
current to control external analog devices such as inverters,
position control valves, etc.
➢ Digital data passes through a D/A converter and is sent as an
analog signal including:
+ Voltage signal: ± 5V; ±10 V; 0 to 5 V; 0 to 10 V
+ Current signal: 4 to 20 mA; 0 to 20mA
➢ As for voltage output, there is a limit to the current that the module
can provide. Therefore, the load connected to the output must have an
input resistance greater than the minimum limit recommended for the
module in question. Otherwise, the module will not be able to
maintain the output voltage.
Outbound signal processing

Analog signal processing process in PLC


❑ Hardware connection

The Analog output module will be connected to the load at the


output
Voltage type output diagram

For voltage-type output, the current


supplied by the module is limited.
=> Output loads must have input
resistance greater than the
minimum allowable resistance of
the module. Otherwise, the module
cannot maintain the output voltage
5.5. Communication modules
❑ Characteristics
Communication between PLCs
and peripheral devices
➢ Serial communication modules are used to establish point-to-point
connections with other smart devices for data exchange.
➢ Used to connect to computers, operating stations, process control
systems and other PLCs
➢ The communication module allows users to connect the PLC to
high-speed local area networks that may differ from the network
communication provided with the PLC​
❑ Serial Port
➢ Is one of the most popular external connection ports of computers.
➢ These ports operate on a serial basis
➢ These ports are often called COM, RS232, RS422, RS485 portsThe
number of connection pins is usually 9 (DB9) or 25 (DB25)

25
chân

9
chân
❑ Universal Serial Bus
❑ Ethernet port

Gate way

connector
5.6. Module connected to thermal sensor
❑ Thermocouple (Cặp nhiệt điện)

Junction

wire
A

Wire
B
AI connection diagram with thermocouple
Grounding thermocouple

Ungrounding thermocouple

Connect grounded and ungrounded thermocouples(Rockwell


Micrologix)
5.7. Stepper motor control module
Stepper motor
A stepper motor is a synchronous motor used to convert control
signals in the form of successive discrete electrical pulses into
rotational or rotor movements and has the ability to fix the rotor
in certain positions. necessary mind.
Stepper motor control
5.8. Functions(FC) and Function Blocks(FB) in Siemens PLC
Programming
❑ Functions:
+ A function (FC) is a code block without memory.
+ A function gives you the option to transfer parameters in the user
program.
+ Functions are therefore particularly suitable for frequently recurring
complex constructs.

Purposes of FC
•To return function values to the calling block, e.g. for mathematical
functions
•To execute technological functions, e.g. individual controls using bit
logic operations
❑ Functions:
The following types of parameters can be defined in the interface:
+ Input: input parameters read by the block
+ Output: output parameters written by the blockInOut: transit parameters, read
by the block upon recall and modifiable by the same
+ Temp: definition of temporary local variables, they allow the saving of
intermediate results, before using these parameters it is good practice to initialize
them (depending on the type of access and the type of data they could take on
random values when entering the block)
+ Constant: definition of local constants
+ Return: value returned to the calling block, is comparable to an Output
parameter, but can be convenient with the SCL language to write mathematical
expressions or logical evaluations on one line as in other languages
❑ Function Blocks
+ Function blocks are code blocks that store their input, output and in-out
parameters permanently in instance data blocks, so that they remain
available even after the block has been executed.

FUNCTIONS (FCs) FUNCTION BLOCKS (FBs)

Has no dedicated memory Has dedicated memory

Parameters cannot be left Parameters can be left


blank with no address

Requires no instance data Needs an instance data


blank block to work
⇒ We can program FC or FB with FBD, LAD, STL, and SCL. The FB has additional
capabilities to program in Graph.

⇒ Whenever we called for FB, it generated an instance Data Block(DB) with it. There is
no such necessity for FC.

⇒ In FC, we can not leave any parameters such In, Out, In-Out blank.

⇒ In FB, we can leave any of the parameters such as In, Out, In-Out with no address.
❑ Organization blocks
+ Organization blocks are the interface between the PLC operating system and
the user program.
+ Organization blocks, you can think of them as functions FCs or function blocks FBs.

+ Organization blocks OBs are used to perform a lot of tasks, some of which are
listed below:

•Startup characteristics of the automation system


•Cyclic program processing
•Interrupt-driven program execution
•Error handling.
➢ Main Cyclic Interrupt OB1
+ The main cyclic OB1 is the organization block which is responsible for cyclically
executing your logic by the PLC.
+ Whenever you create a new project and add a PLC. Main OB1 will be automatically
created by the software.
+ These are the minimum needed blocks for a PLC code.
➢ Main Cyclic Interrupt OB1
❑ Basics of Instance

•When a function block is called, instances are created automatically.


•An instance's structure is generated from the related FB's interface and may
only be altered there.
•Instances are permanently assigned to a function block.
❑ Basics of Instance
Single Instance
In a single instance, the called block saves its own data in its instance block.

Parameter Instance
The block instance that will be used is passed as an in-out argument (InOut)
to the calling block during execution.

Multi-Instance
5.5. Programmable with high speed counter HSC.
Purpose: to read input sensor
signals with high frequencies of
1kHz or more, we must use a high
speed counter.
For example, read the signal from
the encoder to measure engine
speed.
5. Cấu trúc và hoạt động của bộ nhớ PLC
+ The EN pin is the pin that activates the high-
speed pulse counter
+ HSC is the value specified for the HSC set to use
257 corresponding to HSC1
+ DIR: pin selects the up or down direction.
+ CV is the pin. When switching from 0=>1, the
counter value will change to the value at the
NEW_CV pin
+ Similar for pins RV and NEW_RV
+ PERIOD and NEW_PERIOD are used in case this
command is in frequency reading mode
When using the HSC command, corresponding to
hsc1, the counted value will be saved in ID1000 as
the setting.
5. Cấu trúc và hoạt động của bộ nhớ PLC

Ex. With Encorder OMRON


Resolution 1000p/r
The sampling period is 500ms
5. Cấu trúc và hoạt động của bộ nhớ PLC

Connect the encoder to the PLC


5. Cấu trúc và hoạt động của bộ nhớ PLC

Set up HSC function settings:


+ Type of counting: select Count to count pulses.
+ Operating phase: select A/B counter to count 2 input
pulses in A/B format.
+ Initial counting direction: select Count up to count the
rising edge pulse.
5. Cấu trúc và hoạt động của bộ nhớ PLC

What is PWM?: is the acronym for the phrase "Pulse Width


Modulation" which is translated into Vietnamese as “điều
chế độ rộng xung". PWM is a modulation technique used to
encode a parameter into a pulsed signal.

Its main use is to allow control of the power supplied to


electrical devices, especially for inertial loads such as
motors.
5. Cấu trúc và hoạt động của bộ nhớ PLC

What is PTO?
PTO is the acronym for “Pulse Train Output” used for
precise positioning or precise speed control. PTO is often
used to generate control pulses for the Driver of a Servo
Motor or Stepper Motor.
5. Cấu trúc và hoạt động của bộ nhớ PLC

PTO is to create a square pulse sequence with a constant


T(on)/ T(period) ratio.

+ PTO is to create a square pulse sequence with a constant


T(on)/ T(period) ratio.

+ PWM is to create a series of square pulses with a variable


T(on)/ T(period) ratio.
5. Cấu trúc và hoạt động của bộ nhớ PLC

+ Determine Hardware input


Pulse signal A can be read at pin DI 0.0 and pulse signal B
can be read at pin DI 0.1

+ Identify the HSC data register


See the function data storage register HSC1 in the I/O
addresses section
5. Cấu trúc và hoạt động của bộ nhớ PLC

Program: Technology -> Counting -> Others -> CTRL_HSC


5.6. Stepper motor control with PLC S7 1200.

Hardware connection diagram


Congigurations:
Start the servo with bit M1.0

Controls the relative position of the servo

You might also like