0
1
00:00:21,150 --> 00:00:22,400
Hello.
1

2
00:00:22,510 --> 00:00:26,490
In this video we are going to learn scale command.
2

3
00:00:27,190 --> 00:00:33,400
We can say that the scale command is used to see or use the analog data in the range
3

4
00:00:33,460 --> 00:00:35,530
We want with the scale.
4

5
00:00:35,530 --> 00:00:37,920
Command or scale instruction.
5

6
00:00:37,930 --> 00:00:45,880
The data whose value range is read from the source data can be converted into the desired range
6

7
00:00:45,910 --> 00:00:47,210
or desired data.
7

8
00:00:47,680 --> 00:00:52,920
So for example on also you can see our graphs in here.
8

9
00:00:52,930 --> 00:00:54,170
Let's take a look first.
9

10
00:00:54,280 --> 00:01:01,930
Our example the analog signal zero to ten volt connected to analog input of PLC and let's say these
10

11
00:01:02,350 --> 00:01:09,750
analog input value is equals to 0-4000 value in PLC.
11

12
00:01:10,090 --> 00:01:17,770
If we want to convert and to see zero four thousand value is zero to one hundred value in the PLC or
12

13
00:01:17,770 --> 00:01:19,510
HMI etc.
13

14
00:01:19,510 --> 00:01:21,200
This can be possible.
14

15
00:01:21,220 --> 00:01:26,660
These processing handle with can be handled at with scale.
15

16
00:01:26,670 --> 00:01:29,230
command in here let's
16

17
00:01:29,230 --> 00:01:38,410
Take a look to our example our source value, minimum source value is zero and the maximum source value
17

18
00:01:38,410 --> 00:01:51,810
is going to be four thousand and our destination value will be maximum as maximum one hundred according
18

19
00:01:51,810 --> 00:01:54,280
to our desired range.
19

20
00:01:54,300 --> 00:01:59,170
We want to see this data as 0 to 100.
20

21
00:01:59,430 --> 00:02:01,430
So this is our graphs
21

22
00:02:01,440 --> 00:02:10,610
So in the PLC for example the data will be equal to two thousand and the output of these two thousand
22

23
00:02:10,620 --> 00:02:16,490
data will be half of our destination value =  50.
23

24
00:02:16,500 --> 00:02:27,740
So in the HMI  for example we are going to say okay for example the tank is half full or half of
24

25
00:02:27,770 --> 00:02:36,710
our tank is empty or let's take a look to another example and let's learn how to use scale command in
25

26
00:02:36,710 --> 00:02:38,620
our plc projects.
26

27
00:02:38,690 --> 00:02:45,790
Imagine 0 to 20 mA our pressure sensor connected to 04AD analod card
27

28
00:02:45,830 --> 00:02:55,400
And in the this analog card we are giving this value as example for a moment 0 to 20 ma
28

29
00:02:55,430 --> 00:02:59,300
equal to 0 to 4000 value inside of the PLC.
29

30
00:02:59,570 --> 00:03:06,860
And the scaled value should be between zero to one hundred as percentage  the analog value between
30

31
00:03:06,920 --> 00:03:13,370
0 to 4000 is going to be in d20 data register.
31

32
00:03:13,430 --> 00:03:17,960
So we are going to write this value in d20 and in here.
32

33
00:03:17,960 --> 00:03:25,700
Let's take a look what we have maximum analog input value as digital in PLC is going to be 4000 according
33

34
00:03:25,700 --> 00:03:35,030
to our example minimum analog input value as digital in plc is going to be zero and maximum desired
34

35
00:03:35,060 --> 00:03:44,960
output range will be one hundred and minimum desired output range is going to be zero and in here.
35

36
00:03:44,990 --> 00:03:46,970
Let's take a look our example.
36

37
00:03:47,210 --> 00:03:52,340
So our source maximum value is D100.
37

38
00:03:52,340 --> 00:03:54,820
This is just an example.
38

39
00:03:54,980 --> 00:04:02,910
But this is K4000 is our analog input value as maximum value.
39

40
00:04:03,090 --> 00:04:08,170
Source Max we are moving it always on with the always on contact.
40

41
00:04:08,170 --> 00:04:17,450
In here we are moving this value to D100 and source min value is zero is we are moving is this value
41

42
00:04:17,780 --> 00:04:23,040
to D101 and now target max value.
42

43
00:04:23,210 --> 00:04:29,750
So our target maximum value or desired output range maximum value is one hundred and we are moving it
43

44
00:04:29,750 --> 00:04:36,370
to be D102 and minimum desired output range is zero.
44

45
00:04:36,380 --> 00:04:45,130
So we are moving the zero value to D103 and in here we are using our scale command
45

46
00:04:45,390 --> 00:04:50,870
SCLP D20  remember what was it.
46

47
00:04:51,290 --> 00:05:01,840
It is our written reading value as it is coming from the our pressure sensor and D100 is remember
47

48
00:05:01,910 --> 00:05:10,790
it is coming from here it is our maximum value and this scale command is going to use this for parameter
48

49
00:05:11,120 --> 00:05:21,260
in the instruction and d200 is our reading value what we are reading in D200
49

50
00:05:21,590 --> 00:05:31,550
for example if the data is written from the reading not written reading from the pressure sensor
50

51
00:05:31,650 --> 00:05:42,260
equals to let's say 5 mA and 5 mA is going to be equal to 1000 inside of the plc  and according
51

52
00:05:42,260 --> 00:05:51,020
to our scale command and according to our source max and min and target max and min values we are
52

53
00:05:51,020 --> 00:05:55,300
going to see 25 in d200
53

54
00:05:55,520 --> 00:06:07,510
So in in D200 is to 25 ,  %25  It means quarter
54

55
00:06:08,110 --> 00:06:17,870
value is reading from the pressure sensor for example if the reading data is 2000 so we are
55

56
00:06:17,870 --> 00:06:27,550
going to see a 50%  in D200 data registers for example if this value is 4000 it
56

57
00:06:27,550 --> 00:06:39,010
is coming from the 4000 from the pressure sensor so we are going to see 100 inside of D200 data register.
57

58
00:06:39,080 --> 00:06:42,430
So in this video I am finished here.
58

59
00:06:42,440 --> 00:06:44,200
See you in the next video.
