Hello. 1
In this video we are going to learn plc data types X is used for plc physical inputs and it is addressed 2
in the eight point base such as x0 to 7 X10 to x 17 x20 x27. 3
So it is not starting from the X8. 4
So you need to watch out this when you add one extra Io module to your cpu you it is going to start 5
from x 10 also Y is used for the plc physical output for the Delta plc and it is similar like x. 6
It is addressed in the eight point base such as y7 y 0 to y7 y y10 to y 17 y 20 and Y 27 m internal 7
bit addresses are used for auxiliary relays than this relays. 8
Internal bits internal relays are going to help us a lot and it is address in on a 10 base numbers 9
such as M0 or M10 or M25 etc. 10
S is used for the step contact and address on ten base. 11
number such as S0 S25 S50. 12
D used for sixteen bit data registers and addressed on a 10 base numbers T is used for the timer 13
registers and the contacts and also similar 10 base number such as t0 t10 21 or etc. 14
and C is used for counter registers and contacts and it is addressed in a ten base number such as C 15
0 that's given examples C 50 or 55 and etc. E and F are in direct addressing variables so they 16
are used such as D50@E0 so we are going to teach these in direct addressing variables to 17
you detailly but in here I want to give you an example about it. 18
Let's say E0 equals 1. 19
So D50 add +1 =D51 20
This means this value represents D51 or F3 means let's say or F3 value equals 5 21
--. 22
So D105 23
So these value or D represents is going to be equal D105 Knx , Kny and Knm expressions are 24
the way it addresses are used as word. 25
So 16 bit address between variable m0 and 15 it is representing these 26
So K means 4 bit and four bit multiply by in here 4. 27
So this means 16. 28
Bit. If you want to start from M0 after 16 bit you will reach M15 like here. 29
And in this page we are going to learn complete data types. 30
Bool data types can just get 0 or 1. 31
This means just one bit, one bit can take 0 or 1. 32
Or we can call it just true or false and byte can take 8 bit so 8 bit. 33
If we put 8 bit together altogether it represents byte data type or byte value and if we put two bytes 34
together it will create word value so word value can take 16 bit value. 35
If we want to give an example as hexadecimal numbers it will start from hexadecimal 0 to hexadecimal. 36
FFFF, and if we want to create doubleword so unit put to word together or four byte together. 37
So this will create a doubleword and that means doubleword can take 32 bit value inside and if we 38
want to create a long word. 39
So this will this is equals to 8 byte or four word or two double word and longword (lword) means can get 64 40
bit value inside if you want to use a numbers with negative numbers or positive numbers so means 41
that means signed numbers, signed integer can take just the 8 bit integer can get sixteen bit value in it 42
and doubly integer if want to create a double integer so we need two integer or 4 signed. 43
-- 44
Short integer S means short , short integer can get 8 bit , signed integer, integer can take 16 bit signed 45
integer and double integer can get 32 bit signed integer if we want to create a long integer so long integer 46
can get 64 bit signed integer so what we need, we need 8 short integer or 4 integer or 2 double integer 47
U means unsigned s means short so unsigned short integer can get 8 bit unsigned integer and unsigned 48
integer can get sixteen bit and unsigned double integer equals 32 bit unsigned integer value and unsigned 49
long integer 64 bit and real this is really important data type and we need to watch out and we need 50
to list in this value or learn this value carefully because real numbers is 32 bit floating point value 51
these floating values we can send or we can get in or from real values real values can get 52
minus and positive values and also floating values if you want to send for example -10.3 53
to data register so You need to adopt your data registers as real data type and long real get 54
64 bit floating point value add arrays and arrays is going to be help us a lot of an array data types 55
we can declare assembles and after that symbols are declared we can put a lot of value to array so if 56
we are working with a lot of values a lot of data registers you can manage them all with the array data 57
types and strings string data types use 8 bit to represent 1 ASCII character so we are going to use a 58
string with while we are working with the ASCII character but I need to explain one more thing 59
to you what is the meaning of these values. 60
Because short integer is the effective ranges minus one under twenty eight two plus one under twenty 61
seven but if we are looking to here it is starting from 00 to hexadecimal f f f f or if we look 62
here we are going to see double integer is going to start from minus 2 billion one hundred forty 63
seven million four hundred eighty three thousand six hundred forty eight two plus two billion one hundred 64
forty seven million four hundred eighty three thousand six hundred forty seven. 65
What is the meaning of these values. 66
We can calculate them. 67
How can we do this. 68
Open your calculator and 2^16bit means sixty five thousand five hundred thirty six. 69
So word can get this value but if you are working with the signed integer so we need a minus and the positive 70
values. 71
So we need to divide these two. 72
So look this is our minus value minus thirty two thousand seven hundred sixty eight two in here that you 73
can see two thirty two thousand seven hundred sixty seven. 74
That is add this value to our result thirty two thousand seven hundred sixty seven and equals. 75
Same 16 bit signed integer if you make it like this. 76
two exponential 64 we will get this value if we were working without negative values so this 77
value in here that you can see unsigned long integer can get this value inside the data registers but 78
if we are working with the negative and the positive values let's take a look. 79
This value can get and we need to we need to sign integers and you can see in here signed and also long 80
because we will get this result with the sixteen bit we calculated the sixteen bit and long integer 81
you can see in here you can compare it in here. 82
So complete data types are finished now also I'm finished. 83
In this video in the next videos we are going to use this complete data types in our plc projects 84
so you can take a photo or you can take some notes from this page and a lot of times we are going to 85
use bools and words and the integers and the real values and the array values but the rest of all you 86
are going to need them all in the future believe me you will or you are going to really need these complete 87
data types after or in really different projects see you.