Input and Output Addressing in Siemens PLC - Tia Portal Tutorial
Summary
TLDRToday's lecture covers input/output and memory addressing in Siemens PLCs. It explains the basics of digital and analog I/O, memory storage units like bits, bytes, words, and double words, and data types including Boolean, string, integer, and float. The lecture distinguishes between digital (Boolean) and analog (integer/float) signal addressing. It also details how PLCs convert sensor signals into machine-readable data, using signed and unsigned integers. The addressing format for digital and analog I/O in PLCs is discussed, highlighting identifiers like 'I' for inputs, 'Q' for outputs, and 'W' for analog word addressing.
Takeaways
- 💡 Digital inputs and outputs are categorized as digital signals, while analog inputs and outputs correspond to analog signals.
- 📊 Data in Siemens PLC is stored in bits (zeros and ones), and various units such as byte (8 bits), word (16 bits), and double word (32 bits) are used for memory addressing.
- 🔢 There are four main data types in PLC programming: boolean (0 or 1), string (characters), integer (both positive and negative values), and float (decimal values).
- 📉 Boolean data types are used for digital signals, while integer and float data types are used for analog signals.
- 🎛️ Addressing is divided into two categories: I/O addressing for input/output terminals and memory addressing for internal memory of the PLC.
- ⚙️ Unsigned integers only store positive values, while signed integers include both positive and negative values, determined by the presence of a sign before the value.
- 🧮 The number of possible states using bits is calculated as 2^n, where n is the number of bits. For example, 2 bits give 4 states, 8 bits give 256 states.
- 🔢 In Siemens PLCs, I/O addressing for inputs uses the 'I' identifier, and output addressing uses the 'Q' identifier.
- 🧾 Analog inputs and outputs use word addressing, which consists of 16 bits to handle the data (e.g., IW for input word, QW for output word).
- 🔄 Digital inputs and outputs increment the address after 8 bits (from 0 to 7), while analog addresses update in steps of 2 (IW 128, IW 130).
Q & A
What are the two main categories of inputs and outputs in Siemens PLCs?
-The two main categories of inputs and outputs in Siemens PLCs are digital inputs/outputs and analog inputs/outputs.
What is a bit, and how does it relate to a byte and a word?
-A bit is the smallest unit of data and represents either 0 or 1. A byte is a combination of 8 bits, and a word is a combination of 2 bytes or 16 bits.
What are the four main data types used in PLC programming?
-The four main data types used in PLC programming are boolean, string, integer, and float. Boolean represents digital signals (0 or 1), strings represent characters, integers represent whole numbers, and floats represent decimal values.
What is the difference between signed and unsigned integers?
-Unsigned integers only represent non-negative values (0 and above), while signed integers can represent both positive and negative values by including a sign before the value.
How many states can be represented using 2 bits?
-Using 2 bits, 4 states can be represented, which are 00, 01, 10, and 11.
What is the range of values that can be represented using 8 bits for signed and unsigned integers?
-For unsigned integers, 8 bits can represent values from 0 to 255. For signed integers, the range is from -128 to +127.
What is the function of IO addressing in a PLC?
-IO addressing in a PLC is used to address the input and output terminals, allowing the PLC to manage the signals from and to sensors and actuators.
What do the identifiers 'I' and 'Q' represent in Siemens PLC addressing?
-'I' represents input addressing, while 'Q' represents output addressing in Siemens PLCs.
What does 'W' represent in Siemens PLC addressing for analog signals?
-'W' represents word addressing, which is used for analog inputs and outputs in Siemens PLCs, where data is usually represented in 16 bits.
How does the PLC convert analog signals such as current or voltage into data that the processor can understand?
-The PLC converts analog signals like 4-20mA or 0-10V into digital data by converting the signals into binary form, which the processor can then interpret as integer or float values.
Outlines
🔌 Introduction to Input, Output, and Memory Addressing in Siemens PLC
This paragraph introduces the basic concepts of input, output, and memory addressing in Siemens PLC. It explains the two primary types of input and output (digital and analog) and provides an overview of how data, such as bits, bytes, words, and double words, is stored in memory. The explanation continues by breaking down data types used in PLC programming: Boolean (for digital signals), String (for characters), Integer (for a wide range of values), and Float (for decimal values). It also highlights the difference between addressing for digital and analog signals.
⚙️ IO and Memory Addressing in Siemens PLCs
This section further delves into the two types of addressing: I/O addressing (for input and output terminals) and memory addressing (for internal bits stored in the PLC's memory). It explains that processors in PLCs can only interpret machine language and describes how incoming signals from sensors, typically in the form of current or voltage, are converted into data that the processor can understand. It also introduces signed and unsigned integers, explaining the distinction between them and illustrating how integer values are represented in both forms.
🔢 Representation of Data Using Bits
This paragraph explains how data is represented using bits. Starting with two bits, it shows how different states (e.g., 00, 01, 10, 11) map to values for unsigned integers. It extends this logic to 8 bits, explaining how unsigned and signed integers are represented across a range of values. For example, 8-bit unsigned integers can represent values from 0 to 255, while signed integers are divided into negative and positive halves, spanning from -128 to 127. The concept is expanded to 16-bit and 32-bit representations, which significantly increase the number of possible values.
🔌 Digital Inputs, Outputs, and Addressing in Siemens PLCs
This section introduces the addressing format used for digital inputs and outputs in Siemens PLCs. For digital inputs, addresses follow the format 'I' (input) followed by byte and bit numbers (e.g., I0.0 to I0.7). The concept of byte updates after 8 bits are processed is also explained. Similarly, output addressing uses 'Q' (for output), such as Q0.0 to Q0.7. This part emphasizes how addressing updates occur and the role of identifiers (I for input, Q for output) in distinguishing between input and output terminals.
📊 Analog Inputs, Outputs, and Word Addressing
This paragraph focuses on addressing for analog inputs and outputs in Siemens PLCs. Analog signals, often coming in the form of current or voltage (e.g., 4–20 mA), are represented using word addressing due to their larger data size. Input addresses for analog signals are formatted as 'IW' (e.g., IW128 for input words), while outputs use 'QW' (e.g., QW144 for output words). The paragraph also mentions the specific structure of these addresses and hints at why certain addresses (like 128 and 130) are used for analog signals.
Mindmap
Keywords
💡Input/Output
💡Memory Addressing
💡Bits and Bytes
💡Boolean
💡Integer
💡Float
💡Data Conversion
💡Digital Input/Output
💡Analog Input/Output
💡Identifiers
💡Machine Language
Highlights
Introduction to input, output, and memory addressing in Siemens PLCs.
Types of input and output: Digital (digital input, digital output) and Analog (analog input, analog output).
Basic data storage in PLCs: bits, bytes (8 bits), words (16 bits), and double words (32 bits).
Four essential data types: Boolean (0 or 1), String (characters), Integer (range from negative to positive infinity), and Float (decimal values).
Boolean data type is used for digital signals, while Integer and Float are used for analog signals.
PLCs use I/O addressing for input/output terminals and memory addressing for internal bits.
Unsigned integers include only positive values, while signed integers include both positive and negative values.
Using two bits, we can represent four states in unsigned integers: 00, 01, 10, and 11.
With 8 bits, unsigned integers can range from 0 to 255, while signed integers range from -128 to 127.
Explanation of 16-bit unsigned integers (range from 0 to 65535) and signed integers (range from -32768 to 32767).
32-bit signed integers range from -2147483648 to +2147483647.
Digital inputs and outputs have specific I/O addressing formats (e.g., i0.0, q0.0 for Siemens PLCs).
Analog input and output use word addressing (e.g., iw128, qw144 for Siemens PLCs).
Identifiers such as 'i' for input, 'q' for output, and 'w' for word are used to distinguish between analog and digital signals.
Addressing in Siemens PLCs is carried forward after completing eight bits (byte completion updates the next address).
Transcripts
[Music]
[Music]
hello everyone so in today's lecture we
are going to discuss about input output
and memory addressing in siemens plc
okay so basically input types and output
types basically can be divided into two
categories so basically digital input
and digital outputs similarly in case of
analog there will be analog input and
analog outputs right so
now before moving further we should know
these are some of the basic
terminologies about how the data is
stored inside the memory okay bits are
what zeros and ones similarly if you
talk about byte so byte is basically
combination of 8 bits similarly if you
talk about the word the word is
basically combination of 2 bytes or 16
bits
similarly if you talk about double word
double word will be the combination of
two words or four bytes or 32 bits right
data types can be categorized into four
types okay so basically boolean means
what boolean is basically zero or one
state okay so used for digital signals
similarly if you talk about string
strings are basically characters
integer means what basically a value
existing from minus infinite to plus
infinite it can be any of the value
between these okay so similarly if you
talk about float so float is basically a
data type which contains the value which
are in decimal okay so
these are basically the four types of
data types which will be very important
in case of our plc programming okay
now important point here to notice the
integer and float addressings are for
analog signals okay so boolean is
basically for
uh digital signals okay and
integer and float addressings are for
analog okay
so addressing can be divided into two
categories okay so first one is io
addressing and second one is memory
addressing
in case of io addressing this is the
addressing of the input terminals and
the output terminals of the plc
okay similarly memory addressing it is
inside the memory of the plc okay so
addressing can be divided into two
categories first one is io addressing
and second one is memory addressing in
case of io addressing basically this is
the addressing of the
input and output terminals of the plc
and similarly if you talk about the
memory addressing it is basically the
addressing of input bits or we can say
the internal bits of the plc's memory
okay now
we should note that a processor can
always understand machine language okay
so the data which is coming in the form
of
integer values from the sensors that
will be in the form of a current or
voltage that is from 4 to 20 milliampere
or 0 to 10 volt signal then this signal
will be converted into uh such a form
that it can be understandable or we can
say the processor can understand that
data so
how this data is converted to
bits that is the that is what we are
going to see here so first of all we
should know that the integers can be
categorized into two forms that is
signed and unsigned integers right so if
you talk about
unsigned integers the values which don't
have any sign
all those values are called as unsigned
integers right so here
all the values from 0 or above 0 all
these are called positive values so all
this will be defined under unsigned
integers right so if you are having only
positive values uh then
we can write it without any sign also
for example if you are writing 4 so the
4 value is not having any sign so by
default it will be positive only ok
similarly if you talk about signed
integers in case of signed integers
there will be
sign present before the value okay so
here if you observe
minus 2 plus 1 okay so minus 2 is also a
value which is having negative sign
similarly plus 1 is having positive sign
so basically it is a signed integer okay
so any value suppose plus 4 that is
having a sign that means it is a signed
integer okay or understood what is the
difference between signed and unsigned
integers right now we'll be seeing how
this bit data is converted into integer
form okay if you take two bits right
suppose we are having two bits so how
many states are possible basically 2 to
the power 2 is how much 4 so 4 states
are possible using 2 bits right so 0 0 0
1 1 0 1 1 okay so
basically we can have four states with
it okay so
uh zero zero means what zero value
similarly if you talk about zero one
that is one similarly if you talk about
one zero that will be
two and similarly if you talk about 1 1
that will be 3 this is how we can write
in case of unsigned integers from 0 to 3
right similarly in case of signed
integers will be having it from minus 2
to plus 1 okay
now
similarly if you take 8 bits okay how
many values can be represented using 8
bits so 2 to the power 8 is 2 to 256
right so in case of unsigned integers if
you talk about unsigned integers means
what here all the positive values
including 0 will be there so we can go
from 0 to 255 why because
256
total 256 values can be represented so 0
is all always considered in case of
positive so
if 0 is the one value then remaining
there are 255 more values which can be
represented using unsigned integer
using 8 bits right similarly if you talk
about signed integers so half of it will
be divided here if you observe
if you talk about 256 so if you divide
it by 2 then
we will be getting 128 okay so
in case of if you talk about signed
integers from minus 128 to 0 that means
how many values 128 values for negative
and from 0 to 127 that is 0 is also
included in it that means we are having
again positive 128 values and negative
128 values that means total we are
having 256 values so in case of signed
values we can say from minus 128 to plus
127 okay now if we talk about 16 bits so
2 to the power 16 is 65536
so again in case of unsigned integers
from zero
from zero to six five five three five
and in case of signed integers it will
be divided into half okay
in two halves means what minus three two
seven six eight two plus three two seven
six seven zero is also included in
positive that is why it is three two
seven six seven similarly in case of
thirty two bits okay thirty two bits
mean means what we are having one word
that is 2 to the power 32 is
4 2 9 4 9 6 7 2 9 6 okay so again we'll
be having 0 to 4 2 9 4 9 6 7 2 9 5 okay
similarly if you talk about signed
integers so again it will be divided
into half minus two one four seven four
eight three six four eight two plus two
one four seven four eight three six four
seven okay now if you talk about the i o
addressing okay now
in case of plcs okay so we'll be having
digital inputs digital outputs analog
input and analog output so in case of
plc's we will be having terminals okay
so there will be connecting our wires or
the signals coming from the pl uh
sensors right so in case of digital
inputs so digital inputs will be
connected to the following addresses
right so
the addresses are like this i zero dot
zero okay i zero dot one i zero dot two
i zero dot three in this way we are
moving okay so here if you observe these
are basically zero one 2 3
4 5 6 7 so this is what these are the
input bits okay so these are what input
bits similarly if you observe
this value is 0 that means these are
word bytes okay so basically it is zero
byte which is having eight bits okay so
zero to seven there are total eight bits
and this is what byte okay so it will be
updated when
these total 1 byte is completed so 0 to
7 there are total 8 bits so it is
completed now so it will be updated now
see if you observe here there is one
okay so
after completing that
one or we can say now the value has
updated to one here okay now
again it will complete the same and
again then after 0 to 7 it will again
update itself to 2 in this way the
addressing will be carry forwarded okay
now similarly if it
here one more important thing is i so i
is basically the identifier okay so
identifier is basically used to identify
whether it is input or output now in
case of
siemens plcs the output addressing is in
the form of q0 dot zero see here if you
observe this is one of the output bits
okay so output is not represented by o
okay so output is not represented by o
here we will be using the addressing in
the form of q zero dot zero q
zero dot one q 0.2 in this way okay so
again if you observe from 0 to 7 it will
complete the total 8 bits and then only
it will update itself okay so here the
byte will be updated after completing
eight bits okay so in this way we are
using the output addressing format okay
similarly if you talk about analog
inputs
so analog are basically the values so
obviously it will be in the form of word
okay so basically
in
previous
slide we have seen that if the analog
inputs are present so what will be using
word okay so word is basically what 16
bits to represent any values so the data
will be coming in the form of 4 to 20
milliampere so it has to be converted in
some other form
that is
binary language form that is why we need
to use this kind of addressing okay here
if you observe this is what iw 128 that
is what word addressing okay so i w is
basically i is representing what analog
input okay here in case of
a i it is representing analog input and
similarly if you talk about analog
output this is like this qw 144 qw
okay so here one
uh you might have observed why
after 128 130 is given so uh we'll be
discussing it in uh the upcoming slides
right why it is so okay now so digital
inputs will be uh i zero dot zero i zero
dot to i zero dot seven similarly after
that uh
i one dot zero i one dot one and it will
go up to i 1.7 and again then it will be
updating itself so it will be i
2 dot
1 i 2 dot 2 in this way okay similarly
if you talk about digital outputs so the
addressing will be q 0 dot 0 give zero
dot
one q zero dot two in this way and
uh similarly analog inputs will be i w
zero i w two
okay and analog outputs will be q's w
zero q w two in this way will be having
okay so i and q are also called as
identifiers to represent the address if
it is input or output okay so uh
to identify whether it is an input or
output terminal here what will be using
i and q okay and similarly w represents
the word addressing for analog inputs or
output so whether you want to
if you want to identify whether it is
analog input or digital input we can
identify it using
if we find w here okay so w means what
for analog that is representing the
world okay
[Music]
you
تصفح المزيد من مقاطع الفيديو ذات الصلة
RSLogix 5000 Analog Input Programming | Wiring Scaling Tutorial for PLC Analog Input Signal Example
When to use PLC ,DCS & SCADA | PLC vs DCS vs SCADA Selection Guide
Variables and Datatypes
Difference between Analog and Digital Signals | AddOhms #6
What is Digital Signal?
Analog vs. Digital As Fast As Possible
5.0 / 5 (0 votes)