Input and Output Addressing in Siemens PLC - Tia Portal Tutorial

Instrumentation Tools
21 Dec 202114:13

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

00:00

🔌 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.

05:00

⚙️ 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.

10:00

🔢 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

Input/Output (I/O) refers to the communication channels between a system and the external devices or interfaces. In the context of the video, I/O is crucial for Siemens PLCs (Programmable Logic Controllers) to interact with sensors and actuators. The script mentions digital inputs and outputs, which are binary signals that can be either on or off, and analog inputs and outputs, which can have a range of values. For instance, digital inputs might be connected to switches or buttons, while analog inputs could be connected to temperature sensors.

💡Memory Addressing

Memory Addressing pertains to how data is stored and accessed within a system's memory. In the video, memory addressing is essential for PLC programming as it allows the processor to interact with data stored in memory. The script explains that there are two types of addressing: I/O addressing, which refers to the physical input and output terminals, and memory addressing, which is the internal addressing within the PLC's memory.

💡Bits and Bytes

Bits and Bytes are fundamental units of data storage. A bit is the smallest unit of data, representing a 0 or 1, while a byte consists of 8 bits. The video script uses these terms to explain how data is represented in the PLC's memory. For example, the script mentions that a byte is a combination of 8 bits, which is a basic unit for data storage and manipulation in PLCs.

💡Boolean

Boolean is a data type that represents one of two values: true or false, which are equivalent to 1 or 0 in digital systems. In the video, Boolean is used to describe digital signals, such as the state of a switch, which can be either on (true) or off (false). The script emphasizes that Boolean values are crucial for handling digital inputs and outputs in PLC programming.

💡Integer

Integer is a data type representing whole numbers, both positive and negative. In the context of the video, integers are used to represent analog signals, such as sensor readings that can be converted into integer values. The script explains that integers can be signed (with a positive or negative sign) or unsigned (always positive), and this distinction is important for PLC programming as it affects how data is stored and manipulated.

💡Float

Float is a data type that represents real numbers, including fractions, in decimal form. The video script mentions that floats are used for analog signals, which can have a continuous range of values. For example, a temperature sensor might output a float value representing the current temperature as a decimal number.

💡Data Conversion

Data Conversion is the process of transforming data from one format to another. The script discusses how analog signals, such as 4-20 mA or 0-10V, are converted into digital values that the PLC's processor can understand. This conversion is a critical step in PLC programming as it allows the processor to handle and process analog data.

💡Digital Input/Output

Digital Input/Output refers to the binary signals that are either on or off. In the video, digital inputs are connected to addresses like I0.0, I0.1, etc., and digital outputs are addressed as Q0.0, Q0.1, etc. These are used for simple on/off control in automation systems, such as turning a light on or off.

💡Analog Input/Output

Analog Input/Output handles signals that can vary over a continuous range of values. In the script, analog inputs are addressed starting from IW128, and analog outputs from QW144. These are used for more complex control tasks that require a range of values, such as controlling the speed of a motor or adjusting the temperature in a heating system.

💡Identifiers

Identifiers are used to label and distinguish different elements in a program or system. In the video, 'I' and 'Q' are identifiers used to distinguish between input and output terminals in PLC addressing. The script explains that 'I' is used for inputs and 'Q' for outputs, helping to organize and manage the connections in a PLC system.

💡Machine Language

Machine Language is the low-level language understood by a computer's hardware. The video script mentions that a processor understands machine language, and the data from sensors, such as current or voltage signals, must be converted into a form that the processor can understand. This conversion is a fundamental aspect of PLC programming, allowing the processor to interpret and act on input signals.

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

play00:05

[Music]

play00:15

[Music]

play00:18

hello everyone so in today's lecture we

play00:21

are going to discuss about input output

play00:23

and memory addressing in siemens plc

play00:26

okay so basically input types and output

play00:30

types basically can be divided into two

play00:32

categories so basically digital input

play00:35

and digital outputs similarly in case of

play00:38

analog there will be analog input and

play00:40

analog outputs right so

play00:43

now before moving further we should know

play00:46

these are some of the basic

play00:48

terminologies about how the data is

play00:51

stored inside the memory okay bits are

play00:54

what zeros and ones similarly if you

play00:57

talk about byte so byte is basically

play01:00

combination of 8 bits similarly if you

play01:03

talk about the word the word is

play01:05

basically combination of 2 bytes or 16

play01:08

bits

play01:09

similarly if you talk about double word

play01:12

double word will be the combination of

play01:14

two words or four bytes or 32 bits right

play01:18

data types can be categorized into four

play01:21

types okay so basically boolean means

play01:24

what boolean is basically zero or one

play01:27

state okay so used for digital signals

play01:31

similarly if you talk about string

play01:33

strings are basically characters

play01:35

integer means what basically a value

play01:39

existing from minus infinite to plus

play01:41

infinite it can be any of the value

play01:44

between these okay so similarly if you

play01:47

talk about float so float is basically a

play01:50

data type which contains the value which

play01:53

are in decimal okay so

play01:56

these are basically the four types of

play01:58

data types which will be very important

play02:00

in case of our plc programming okay

play02:04

now important point here to notice the

play02:07

integer and float addressings are for

play02:09

analog signals okay so boolean is

play02:11

basically for

play02:13

uh digital signals okay and

play02:16

integer and float addressings are for

play02:19

analog okay

play02:20

so addressing can be divided into two

play02:22

categories okay so first one is io

play02:25

addressing and second one is memory

play02:28

addressing

play02:29

in case of io addressing this is the

play02:31

addressing of the input terminals and

play02:34

the output terminals of the plc

play02:36

okay similarly memory addressing it is

play02:39

inside the memory of the plc okay so

play02:43

addressing can be divided into two

play02:44

categories first one is io addressing

play02:48

and second one is memory addressing in

play02:50

case of io addressing basically this is

play02:53

the addressing of the

play02:54

input and output terminals of the plc

play02:57

and similarly if you talk about the

play02:59

memory addressing it is basically the

play03:02

addressing of input bits or we can say

play03:05

the internal bits of the plc's memory

play03:08

okay now

play03:09

we should note that a processor can

play03:12

always understand machine language okay

play03:15

so the data which is coming in the form

play03:18

of

play03:19

integer values from the sensors that

play03:22

will be in the form of a current or

play03:24

voltage that is from 4 to 20 milliampere

play03:27

or 0 to 10 volt signal then this signal

play03:30

will be converted into uh such a form

play03:34

that it can be understandable or we can

play03:37

say the processor can understand that

play03:40

data so

play03:41

how this data is converted to

play03:44

bits that is the that is what we are

play03:47

going to see here so first of all we

play03:50

should know that the integers can be

play03:52

categorized into two forms that is

play03:54

signed and unsigned integers right so if

play03:57

you talk about

play03:58

unsigned integers the values which don't

play04:01

have any sign

play04:03

all those values are called as unsigned

play04:06

integers right so here

play04:08

all the values from 0 or above 0 all

play04:12

these are called positive values so all

play04:15

this will be defined under unsigned

play04:18

integers right so if you are having only

play04:21

positive values uh then

play04:23

we can write it without any sign also

play04:26

for example if you are writing 4 so the

play04:29

4 value is not having any sign so by

play04:32

default it will be positive only ok

play04:35

similarly if you talk about signed

play04:38

integers in case of signed integers

play04:41

there will be

play04:42

sign present before the value okay so

play04:45

here if you observe

play04:47

minus 2 plus 1 okay so minus 2 is also a

play04:51

value which is having negative sign

play04:54

similarly plus 1 is having positive sign

play04:57

so basically it is a signed integer okay

play05:00

so any value suppose plus 4 that is

play05:03

having a sign that means it is a signed

play05:05

integer okay or understood what is the

play05:08

difference between signed and unsigned

play05:11

integers right now we'll be seeing how

play05:14

this bit data is converted into integer

play05:17

form okay if you take two bits right

play05:19

suppose we are having two bits so how

play05:22

many states are possible basically 2 to

play05:25

the power 2 is how much 4 so 4 states

play05:28

are possible using 2 bits right so 0 0 0

play05:31

1 1 0 1 1 okay so

play05:34

basically we can have four states with

play05:37

it okay so

play05:38

uh zero zero means what zero value

play05:41

similarly if you talk about zero one

play05:44

that is one similarly if you talk about

play05:46

one zero that will be

play05:49

two and similarly if you talk about 1 1

play05:51

that will be 3 this is how we can write

play05:54

in case of unsigned integers from 0 to 3

play05:57

right similarly in case of signed

play06:00

integers will be having it from minus 2

play06:03

to plus 1 okay

play06:05

now

play06:06

similarly if you take 8 bits okay how

play06:09

many values can be represented using 8

play06:12

bits so 2 to the power 8 is 2 to 256

play06:15

right so in case of unsigned integers if

play06:19

you talk about unsigned integers means

play06:21

what here all the positive values

play06:23

including 0 will be there so we can go

play06:26

from 0 to 255 why because

play06:30

256

play06:32

total 256 values can be represented so 0

play06:36

is all always considered in case of

play06:38

positive so

play06:40

if 0 is the one value then remaining

play06:42

there are 255 more values which can be

play06:45

represented using unsigned integer

play06:47

using 8 bits right similarly if you talk

play06:50

about signed integers so half of it will

play06:53

be divided here if you observe

play06:56

if you talk about 256 so if you divide

play06:59

it by 2 then

play07:01

we will be getting 128 okay so

play07:04

in case of if you talk about signed

play07:07

integers from minus 128 to 0 that means

play07:11

how many values 128 values for negative

play07:15

and from 0 to 127 that is 0 is also

play07:19

included in it that means we are having

play07:22

again positive 128 values and negative

play07:26

128 values that means total we are

play07:28

having 256 values so in case of signed

play07:32

values we can say from minus 128 to plus

play07:35

127 okay now if we talk about 16 bits so

play07:40

2 to the power 16 is 65536

play07:43

so again in case of unsigned integers

play07:45

from zero

play07:47

from zero to six five five three five

play07:50

and in case of signed integers it will

play07:52

be divided into half okay

play07:55

in two halves means what minus three two

play07:57

seven six eight two plus three two seven

play08:00

six seven zero is also included in

play08:03

positive that is why it is three two

play08:04

seven six seven similarly in case of

play08:07

thirty two bits okay thirty two bits

play08:09

mean means what we are having one word

play08:12

that is 2 to the power 32 is

play08:14

4 2 9 4 9 6 7 2 9 6 okay so again we'll

play08:19

be having 0 to 4 2 9 4 9 6 7 2 9 5 okay

play08:23

similarly if you talk about signed

play08:25

integers so again it will be divided

play08:27

into half minus two one four seven four

play08:30

eight three six four eight two plus two

play08:32

one four seven four eight three six four

play08:34

seven okay now if you talk about the i o

play08:38

addressing okay now

play08:40

in case of plcs okay so we'll be having

play08:43

digital inputs digital outputs analog

play08:46

input and analog output so in case of

play08:48

plc's we will be having terminals okay

play08:51

so there will be connecting our wires or

play08:55

the signals coming from the pl uh

play08:58

sensors right so in case of digital

play09:01

inputs so digital inputs will be

play09:03

connected to the following addresses

play09:05

right so

play09:07

the addresses are like this i zero dot

play09:10

zero okay i zero dot one i zero dot two

play09:13

i zero dot three in this way we are

play09:15

moving okay so here if you observe these

play09:18

are basically zero one 2 3

play09:22

4 5 6 7 so this is what these are the

play09:25

input bits okay so these are what input

play09:29

bits similarly if you observe

play09:31

this value is 0 that means these are

play09:34

word bytes okay so basically it is zero

play09:37

byte which is having eight bits okay so

play09:40

zero to seven there are total eight bits

play09:43

and this is what byte okay so it will be

play09:47

updated when

play09:49

these total 1 byte is completed so 0 to

play09:52

7 there are total 8 bits so it is

play09:55

completed now so it will be updated now

play09:58

see if you observe here there is one

play10:00

okay so

play10:01

after completing that

play10:03

one or we can say now the value has

play10:06

updated to one here okay now

play10:09

again it will complete the same and

play10:11

again then after 0 to 7 it will again

play10:15

update itself to 2 in this way the

play10:18

addressing will be carry forwarded okay

play10:21

now similarly if it

play10:23

here one more important thing is i so i

play10:26

is basically the identifier okay so

play10:29

identifier is basically used to identify

play10:32

whether it is input or output now in

play10:35

case of

play10:36

siemens plcs the output addressing is in

play10:39

the form of q0 dot zero see here if you

play10:42

observe this is one of the output bits

play10:44

okay so output is not represented by o

play10:48

okay so output is not represented by o

play10:52

here we will be using the addressing in

play10:54

the form of q zero dot zero q

play10:58

zero dot one q 0.2 in this way okay so

play11:02

again if you observe from 0 to 7 it will

play11:05

complete the total 8 bits and then only

play11:08

it will update itself okay so here the

play11:10

byte will be updated after completing

play11:13

eight bits okay so in this way we are

play11:16

using the output addressing format okay

play11:20

similarly if you talk about analog

play11:22

inputs

play11:23

so analog are basically the values so

play11:26

obviously it will be in the form of word

play11:28

okay so basically

play11:30

in

play11:31

previous

play11:33

slide we have seen that if the analog

play11:35

inputs are present so what will be using

play11:38

word okay so word is basically what 16

play11:41

bits to represent any values so the data

play11:44

will be coming in the form of 4 to 20

play11:46

milliampere so it has to be converted in

play11:49

some other form

play11:51

that is

play11:52

binary language form that is why we need

play11:54

to use this kind of addressing okay here

play11:58

if you observe this is what iw 128 that

play12:02

is what word addressing okay so i w is

play12:06

basically i is representing what analog

play12:09

input okay here in case of

play12:13

a i it is representing analog input and

play12:16

similarly if you talk about analog

play12:18

output this is like this qw 144 qw

play12:23

okay so here one

play12:25

uh you might have observed why

play12:28

after 128 130 is given so uh we'll be

play12:32

discussing it in uh the upcoming slides

play12:35

right why it is so okay now so digital

play12:38

inputs will be uh i zero dot zero i zero

play12:42

dot to i zero dot seven similarly after

play12:44

that uh

play12:46

i one dot zero i one dot one and it will

play12:50

go up to i 1.7 and again then it will be

play12:52

updating itself so it will be i

play12:55

2 dot

play12:56

1 i 2 dot 2 in this way okay similarly

play13:00

if you talk about digital outputs so the

play13:02

addressing will be q 0 dot 0 give zero

play13:05

dot

play13:06

one q zero dot two in this way and

play13:09

uh similarly analog inputs will be i w

play13:12

zero i w two

play13:14

okay and analog outputs will be q's w

play13:17

zero q w two in this way will be having

play13:20

okay so i and q are also called as

play13:23

identifiers to represent the address if

play13:27

it is input or output okay so uh

play13:30

to identify whether it is an input or

play13:33

output terminal here what will be using

play13:36

i and q okay and similarly w represents

play13:40

the word addressing for analog inputs or

play13:43

output so whether you want to

play13:45

if you want to identify whether it is

play13:47

analog input or digital input we can

play13:49

identify it using

play13:51

if we find w here okay so w means what

play13:54

for analog that is representing the

play13:56

world okay

play14:04

[Music]

play14:13

you

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
PLC BasicsSiemens PLCInput OutputMemory AddressingDigital SignalsAnalog SignalsData TypesSigned IntegersUnsigned IntegersPLC Programming
Benötigen Sie eine Zusammenfassung auf Englisch?