0
1
00:00:21,440 --> 00:00:22,120
Hello.
1

2
00:00:22,200 --> 00:00:32,640
In this video we are going to learn plc data types X is used for plc physical inputs and it is addressed
2

3
00:00:32,670 --> 00:00:41,530
in the eight point base such as x0 to 7 X10 to x 17 x20 x27.
3

4
00:00:41,730 --> 00:00:44,390
So it is not starting from the X8.
4

5
00:00:44,400 --> 00:00:51,540
So you need to watch out this when you add one extra Io module to your cpu you it is going to start
5

6
00:00:51,540 --> 00:01:02,060
from x 10 also Y is used for the plc physical output for the Delta plc and it is similar like x.
6

7
00:01:02,100 --> 00:01:14,250
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

8
00:01:14,250 --> 00:01:18,900
bit addresses are used for auxiliary relays than this relays.
8

9
00:01:18,930 --> 00:01:26,420
Internal bits internal relays are going to help us a lot and it is address in on a 10 base numbers
9

10
00:01:26,420 --> 00:01:33,060
such as M0 or M10 or M25 etc.
10

11
00:01:33,180 --> 00:01:37,260
S is used for the step contact and address on ten base.
11

12
00:01:37,270 --> 00:01:42,160
number  such as S0 S25 S50.
12

13
00:01:42,170 --> 00:01:49,730
D used for sixteen bit data registers and addressed on a 10 base numbers T is used for the timer
13

14
00:01:49,730 --> 00:01:59,190
registers and the contacts and also similar 10 base number such as t0 t10 21 or etc.
14

15
00:01:59,640 --> 00:02:07,140
and C is used for counter registers and contacts and it is addressed in a ten base number such as C
15

16
00:02:07,160 --> 00:02:18,580
0 that's given examples C 50 or 55 and etc. E and F are in direct addressing variables so they
16

17
00:02:18,580 --> 00:02:28,230
are used such as D50@E0 so we are going to teach these in direct addressing variables to
17

18
00:02:28,230 --> 00:02:32,820
you detailly but in here I want to give you an example about it.
18

19
00:02:32,940 --> 00:02:35,340
Let's say E0 equals 1.
19

20
00:02:35,400 --> 00:02:38,820
So D50 add +1 =D51
20

21
00:02:38,850 --> 00:02:48,480
This means this value represents D51 or F3 means let's say or F3 value equals 5
21

22
00:02:48,480 --> 00:02:49,350
--.
22

23
00:02:49,350 --> 00:02:54,450
So D105
23

24
00:02:54,750 --> 00:03:07,080
So these value or D represents is going to be equal D105 Knx , Kny and Knm expressions are
24

25
00:03:07,080 --> 00:03:09,440
the way it addresses are used as word.
25

26
00:03:09,870 --> 00:03:16,900
So 16 bit address between variable m0 and 15 it is representing these
26

27
00:03:16,950 --> 00:03:27,140
So K means 4 bit and four bit  multiply by in here 4.
27

28
00:03:27,830 --> 00:03:30,140
So this means 16.
28

29
00:03:30,140 --> 00:03:40,250
Bit. If you want to start from M0 after 16 bit you will reach M15 like here.
29

30
00:03:40,640 --> 00:03:45,340
And in this page we are going to learn complete data types.
30

31
00:03:45,420 --> 00:03:50,960
Bool data types can just get 0 or 1.
31

32
00:03:51,260 --> 00:03:55,620
This means just one bit, one bit can take 0 or 1.
32

33
00:03:55,670 --> 00:04:03,840
Or we can call it just true or false and byte can take 8 bit so 8 bit.
33

34
00:04:04,010 --> 00:04:13,550
If we put 8 bit together altogether it represents byte data type or byte value and if we put two bytes
34

35
00:04:13,700 --> 00:04:20,800
together it will create word value so word value can take 16 bit value.
35

36
00:04:21,110 --> 00:04:30,230
If we want to give an example as hexadecimal numbers it will start from hexadecimal  0 to hexadecimal.
36

37
00:04:30,230 --> 00:04:39,720
FFFF, and if we want to create doubleword so unit put to word together or four byte together.
37

38
00:04:39,770 --> 00:04:49,060
So this will create a doubleword and that means doubleword can take 32 bit value inside and if we
38

39
00:04:49,060 --> 00:04:50,700
want to create a long word.
39

40
00:04:50,720 --> 00:05:01,820
So this will this is equals to 8 byte or four word or two double word and longword (lword) means can get 64
40

41
00:05:01,820 --> 00:05:12,320
bit value inside if you want to use a numbers with negative numbers or positive numbers so means
41

42
00:05:12,500 --> 00:05:23,120
that means signed numbers,  signed integer can take just the 8 bit integer can get sixteen bit value in it
42

43
00:05:23,420 --> 00:05:31,330
and doubly integer if want to create a double integer so we need two integer or 4 signed.
43

44
00:05:31,540 --> 00:05:32,880
-- 
44

45
00:05:32,990 --> 00:05:41,390
Short integer S means short , short integer can get 8 bit , signed integer,  integer can take 16 bit  signed
45

46
00:05:41,390 --> 00:05:52,430
integer and double integer can get 32 bit signed integer if we want to create a long integer so long integer
46

47
00:05:52,430 --> 00:06:03,020
can get 64 bit signed integer so what we need, we need 8 short integer or 4  integer or 2 double integer
47

48
00:06:03,440 --> 00:06:16,040
U means unsigned s means short so unsigned short integer can get 8 bit unsigned integer and unsigned
48

49
00:06:16,040 --> 00:06:25,520
integer can get sixteen bit and unsigned double integer equals 32 bit unsigned integer value and unsigned
49

50
00:06:25,520 --> 00:06:33,680
long integer 64 bit and real this is really important data type and we need to watch out and we need
50

51
00:06:33,680 --> 00:06:43,220
to list in this value or learn this value carefully because real numbers is 32 bit floating point value
51

52
00:06:43,670 --> 00:06:53,690
these floating values we can send or we can get in or from real values real values can get
52

53
00:06:53,690 --> 00:07:02,000
minus and positive values and also floating values if you want to send for example -10.3
53

54
00:07:02,000 --> 00:07:12,410
to data register so  You need to adopt  your data registers as real data type and long real get
54

55
00:07:12,710 --> 00:07:22,460
64 bit floating point value add arrays and arrays is going to be help us a lot of an array data types
55

56
00:07:22,760 --> 00:07:31,790
we can declare assembles and after that symbols are declared we can put a lot of value to array so if
56

57
00:07:31,790 --> 00:07:39,080
we are working with a lot of values a lot of data registers you can manage them all with the array data
57

58
00:07:39,080 --> 00:07:48,110
types and strings string data types use 8 bit to represent 1 ASCII character so we are going to use a
58

59
00:07:48,110 --> 00:07:56,780
string with while we are working with the ASCII character but  I need to explain one more thing
59

60
00:07:56,780 --> 00:08:00,890
to you what is the meaning of these values.
60

61
00:08:00,890 --> 00:08:10,410
Because short integer is the effective ranges minus one under twenty eight two plus one under twenty
61

62
00:08:10,410 --> 00:08:19,460
seven but if we are looking to here it is starting from 00 to hexadecimal f f f f or if we look
62

63
00:08:19,460 --> 00:08:26,710
here we are going to see double integer  is going to start from minus 2 billion one hundred forty
63

64
00:08:26,860 --> 00:08:35,560
seven million four hundred eighty three thousand six hundred forty eight two plus two billion one hundred
64

65
00:08:35,560 --> 00:08:40,840
forty seven million four hundred eighty three thousand six hundred forty seven.
65

66
00:08:40,860 --> 00:08:42,910
What is the meaning of these values.
66

67
00:08:42,990 --> 00:08:44,640
We can calculate them.
67

68
00:08:44,700 --> 00:08:46,140
How can we do this.
68

69
00:08:46,140 --> 00:08:56,560
Open your calculator and 2^16bit means sixty five thousand five hundred thirty six.
69

70
00:08:56,640 --> 00:09:05,730
So word can get this value but if you are working with the signed integer so we need a minus and the positive
70

71
00:09:05,730 --> 00:09:06,390
values.
71

72
00:09:06,390 --> 00:09:08,910
So we need to divide these two.
72

73
00:09:08,910 --> 00:09:18,660
So look this is our minus value minus thirty two thousand seven hundred sixty eight two in here that you
73

74
00:09:18,660 --> 00:09:24,010
can see two thirty two thousand seven hundred sixty seven.
74

75
00:09:24,150 --> 00:09:35,210
That is add this value to our result thirty two thousand seven hundred sixty seven and equals.
75

76
00:09:35,490 --> 00:09:41,730
Same 16 bit signed integer if you make it like this.
76

77
00:09:41,790 --> 00:09:53,700
two exponential 64 we will get this value if we were working without negative values so this
77

78
00:09:53,700 --> 00:10:03,300
value in here that you can see unsigned long integer can get this value inside the data registers but
78

79
00:10:03,330 --> 00:10:08,670
if we are working with the negative and the positive values let's take a look.
79

80
00:10:08,670 --> 00:10:18,030
This value can get and we need to we need to sign integers and you can see in here signed and also long
80

81
00:10:18,420 --> 00:10:25,470
because we will get this result with the sixteen bit we calculated the sixteen bit and long integer
81

82
00:10:25,740 --> 00:10:28,260
you can see in here you can compare it in here.
82

83
00:10:28,800 --> 00:10:33,090
So complete data types are finished now also I'm finished.
83

84
00:10:33,090 --> 00:10:40,470
In this video in the next videos we are going to use this complete data types in our plc projects
84

85
00:10:40,860 --> 00:10:48,960
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

86
00:10:48,960 --> 00:10:56,550
use bools and words and the integers and the real values and the array values but the rest of all you
86

87
00:10:56,550 --> 00:11:05,580
are going to need them all in the future believe me you will or you are going to really need these complete
87

88
00:11:05,760 --> 00:11:12,060
data types  after or in really different projects see you.
