0
1
00:00:21,350 --> 00:00:21,800
Hello.
1

2
00:00:21,860 --> 00:00:29,850
Let's continue to PID control example and with M0 auxiliary relay in the Delta plcs with the rising edge
2

3
00:00:29,870 --> 00:00:30,460
contact.
3

4
00:00:30,710 --> 00:00:38,400
We are writing our variables or our values to the data registers.
4

5
00:00:38,540 --> 00:00:46,190
So 300 to d100 so we think it as sampling time that we are detecting or we are adjusting
5

6
00:00:46,430 --> 00:00:47,590
in this line.
6

7
00:00:47,600 --> 00:00:56,750
And also we are sending 50 to D100 for the heating KP and heating KI  heating upper and heating
7

8
00:00:57,110 --> 00:01:07,280
output lower limits than we  are selecting or adjusting them all in here because of why you can focus to hear
8

9
00:01:07,510 --> 00:01:07,720
--
9

10
00:01:07,760 --> 00:01:10,340
It is k4  what is it.
10

11
00:01:10,340 --> 00:01:11,560
Heating pıd mode.
11

12
00:01:11,660 --> 00:01:12,620
What was it.
12

13
00:01:12,620 --> 00:01:22,640
Control mode mode was 4 temperature control which has been adjusted so we are not doing automatically
13

14
00:01:22,720 --> 00:01:26,970
PID control or automatically parameter adjusting.
14

15
00:01:27,020 --> 00:01:31,640
We are adapting our values with manuelly because of this.
15

16
00:01:31,700 --> 00:01:39,460
We are sending to 4 to D104 for heating PID mode and also for the cooling.
16

17
00:01:39,470 --> 00:01:47,870
We are adjusting our sampling time cooling KP and also cooling KI  cooling output upper and lower
17

18
00:01:47,870 --> 00:01:49,510
limits in here.
18

19
00:01:49,640 --> 00:01:54,160
And also we are sending K4 to cooling PID mode.
19

20
00:01:54,170 --> 00:01:55,310
We are adjusting.
20

21
00:01:55,310 --> 00:01:58,400
Same thing to for cooling.
21

22
00:01:58,400 --> 00:02:07,820
So what we did we adopted our parameters manually we adjusted sampling time KP KI and upper and lower
22

23
00:02:07,820 --> 00:02:17,930
limits and now with the m0 always on contact PID start contact in here you can see when this contact
23

24
00:02:17,960 --> 00:02:26,790
is high what will happen PID instruction is going to start set value is this is 
24

25
00:02:26,850 --> 00:02:33,960
what you need to put here a value for example you want to adjust the room temperature is 30 degree.
25

26
00:02:34,190 --> 00:02:36,760
So you need to put it here and present value.
26

27
00:02:36,770 --> 00:02:43,930
You will read it from here for example from your thermocouple sensor you are reading it as 20 degrees.
27

28
00:02:44,090 --> 00:02:52,760
So heating sampling time PID is going to take a sampling times in this sampling times it will work it will
28

29
00:02:53,060 --> 00:02:58,530
process and it will give a result to d30 with this result.
29

30
00:02:58,530 --> 00:03:07,990
D30 will be increase and decrease this value and with the D106 heating output upper limit.
30

31
00:03:08,090 --> 00:03:16,790
So where it comes from, from here for the heating and it is going to give to output to Y10 also for
31

32
00:03:16,790 --> 00:03:18,740
the cooling you will select.
32

33
00:03:18,740 --> 00:03:19,330
Okay.
33

34
00:03:19,460 --> 00:03:25,110
I want zero degree in my room now it is 10 degree
34

35
00:03:25,310 --> 00:03:29,300
So from the d150
35

36
00:03:29,350 --> 00:03:37,670
It is coming from here sampling time is similar 300 and it will give a value to d31 this is
36

37
00:03:37,670 --> 00:03:45,560
cooling output value and according to this value  and according to your upper limit D156
37

38
00:03:45,560 --> 00:03:54,710
this GPWM instruction will activate Y11 output of your plc
38

39
00:03:54,890 --> 00:03:56,010
So what will happen.
39

40
00:03:56,120 --> 00:04:04,280
It will activate these outputs according to your PID values and PID parameters and it will for example
40

41
00:04:04,280 --> 00:04:14,360
Y10 will be active 5 second and then it will active to 4 second what is our idea or what is our
41

42
00:04:17,440 --> 00:04:20,710
target so PID  works like this.
42

43
00:04:20,710 --> 00:04:22,750
First of all this is our scheme.
43

44
00:04:22,750 --> 00:04:25,890
This is our set value.
44

45
00:04:25,900 --> 00:04:33,790
And if you activate this Y10 and or Y11 it will work like this for example it will start from
45

46
00:04:33,790 --> 00:04:34,640
here.
46

47
00:04:34,690 --> 00:04:42,460
It will go like this or like this or like this but always it will be a little bit longer active or a
47

48
00:04:42,460 --> 00:04:44,050
little bit less active.
48

49
00:04:44,050 --> 00:04:47,680
So for the set value it will work a lot.
49

50
00:04:47,680 --> 00:04:51,010
It will be opened and closed and open and close 
50

51
00:04:51,310 --> 00:04:57,800
But for PID  control it will go just one and two and three.
51

52
00:04:57,820 --> 00:05:02,200
A little bit more and then it will reach your set value always.
52

53
00:05:02,410 --> 00:05:07,660
It will open and close open and close open and close and it will be stable.
53

54
00:05:07,660 --> 00:05:15,760
This is what PID do and why we are using this PID instruction or why this is really important to
54

55
00:05:16,150 --> 00:05:25,570
make stable your outputs to give outputs correctly and without  activate your outputs a long time(a lot)
55

56
00:05:25,570 --> 00:05:29,160
longer or less.
56

57
00:05:29,170 --> 00:05:32,590
You can use this PID instruction with like this.
57

58
00:05:32,590 --> 00:05:42,570
You can adopt them all with automatically to activate control mode as 3 or you can put your variables
58

59
00:05:42,810 --> 00:05:46,000
put your parameters to some data registers.
59

60
00:05:46,000 --> 00:05:53,690
But don't forget because of the power cut/power off and power on you can use to remain data registers.
60

61
00:05:53,690 --> 00:06:01,950
Then you can use as control mode as 4 and then you can use this command for the heating and for
61

62
00:06:01,950 --> 00:06:09,190
the cooling then you can work with the PID instructions with like this for this video.
62

63
00:06:09,300 --> 00:06:10,320
I'm finished here.
63

64
00:06:10,320 --> 00:06:11,760
See you in the next video.
