0
1
00:00:21,570 --> 00:00:22,150
Hello.
1

2
00:00:22,200 --> 00:00:27,630
In this video we are going to learn how to use a st language in delta plcs.
2

3
00:00:27,870 --> 00:00:36,690
I will create a new project and controller type will be AS and the plc type will be AS332T say
3

4
00:00:36,690 --> 00:00:44,070
OK in the project tree we will see program section in the program section already.
4

5
00:00:44,080 --> 00:00:51,190
We are always creating our programs with the ladder language but now we will select structure text
5

6
00:00:51,490 --> 00:01:00,580
language and say OK and we will see complete interface of program is changed than you see now.
6

7
00:01:00,580 --> 00:01:03,860
There is no networks and also the lines.
7

8
00:01:03,940 --> 00:01:13,270
Now we have an editor like C programming or another high level languages programming areas but now
8

9
00:01:13,630 --> 00:01:16,260
we can write our code to here.
9

10
00:01:16,570 --> 00:01:26,650
I will define two variable first variable will be start motor and type will be bool and the second variable
10

11
00:01:26,800 --> 00:01:39,440
will be motor turning forward type will be bool and I will use it in our a still language programming
11

12
00:01:39,800 --> 00:01:40,610
page.
12

13
00:01:40,850 --> 00:01:44,030
If start motor
13

14
00:01:51,880 --> 00:01:53,060
what will happen.
14

15
00:01:53,170 --> 00:01:59,160
Motor turning forward will be
15

16
00:02:05,350 --> 00:02:09,250
and if this is our very basic very similar code.
16

17
00:02:09,610 --> 00:02:18,290
And I will create a device monitor table also to see what will happen in here I will let my identifiers
17

18
00:02:18,290 --> 00:02:27,260
from program 0 motor turning forward then also in here I will select start motor in here also program
18

19
00:02:27,260 --> 00:02:41,030
0 in program section I will go here I will send these codes to our plc now it will send it and transfer
19

20
00:02:41,480 --> 00:02:49,010
it is transferring and transfer is finished I will say run plc start motor what will happen if I say
20

21
00:02:49,010 --> 00:02:49,930
start motor.
21

22
00:02:49,970 --> 00:02:57,620
Now you see it is green now motor turning forward is activated stop motorist high motor turning forward
22

23
00:02:57,680 --> 00:03:03,620
is high start motorist set off but motor turning is still forward.
23

24
00:03:03,620 --> 00:03:04,140
Why.
24

25
00:03:04,220 --> 00:03:11,810
Because it is similar in the if loop it reads start motor then motor turning became through and then
25

26
00:03:12,020 --> 00:03:13,220
start motor is gone.
26

27
00:03:13,250 --> 00:03:14,660
But what will happen.
27

28
00:03:14,660 --> 00:03:17,030
We didn't put anything else.
28

29
00:03:17,030 --> 00:03:28,360
Let us put something else in here else if not start motor means motor turning
29

30
00:03:32,540 --> 00:03:35,300
forward will be false.
30

31
00:03:36,020 --> 00:03:44,940
So let's take a look again and say okay in here I made a mistake.
31

32
00:03:44,950 --> 00:03:47,300
Now go on line
32

33
00:03:50,420 --> 00:04:00,480
and yes it is transferring this project and project is transferred to simulator.
33

34
00:04:00,480 --> 00:04:08,430
Now you see motor turning is false because of here start motor and motors turning forward and somebody
34

35
00:04:08,430 --> 00:04:17,650
released push button start motor and motor turning forward this false and now I will open my online
35

36
00:04:17,740 --> 00:04:27,270
it area and use timer if if not start motor
36

37
00:04:31,460 --> 00:04:32,810
so I can write the here
37

38
00:04:37,380 --> 00:04:52,820
let's run our timer 3 second and else t 0 will be 0 and if so what will happen now.
38

39
00:04:52,840 --> 00:04:54,110
Let's take a look.
39

40
00:04:54,160 --> 00:04:59,120
I will send this to missing error.
40

41
00:04:59,180 --> 00:05:06,070
command that else because of why?should I use this.
41

42
00:05:06,070 --> 00:05:08,390
Let's take a look now.
42

43
00:05:08,410 --> 00:05:13,690
Yes I forgot it then update is completed now.
43

44
00:05:13,690 --> 00:05:25,880
So it is 30 because of motors start this of I Will Run motor start set on you say it is zero.
44

45
00:05:25,890 --> 00:05:34,090
Motorist turning forward and forward and forward then look this timer if start motor is goes off timer
45

46
00:05:34,120 --> 00:05:48,670
is counting counting and counting and now our time worries on so I will go I do it again in here according
46

47
00:05:50,660 --> 00:05:51,860
to timer
47

48
00:05:53,340 --> 00:05:57,910
We will get system error
48

49
00:06:00,720 --> 00:06:14,700
message how it will work if t 0 then I will create a two more  or one more variable in here but now
49

50
00:06:14,700 --> 00:06:25,620
we are at on line it at mode so it is not possible so I will say go off line and I will say no if timer
50

51
00:06:25,790 --> 00:06:28,590
done then time timer coming.
51

52
00:06:28,680 --> 00:06:41,790
Start motor then start motor is  off so motor is stopping we will create these variable motor stop and
52

53
00:06:41,970 --> 00:06:46,440
type will be bool and say OK motor
53

54
00:06:52,870 --> 00:07:10,410
will be true else motor stopped falls end_if, send changes to our simulator or in the reality
54

55
00:07:10,450 --> 00:07:13,300
plc  doesn't matter.
55

56
00:07:13,350 --> 00:07:22,430
Yes I want to download the execution code now it's transferring our code to plc.
56

57
00:07:22,590 --> 00:07:32,050
It is sended and you see timer  started to count that it's okay time is high and time high.
57

58
00:07:32,080 --> 00:07:33,670
Motor stop this high.
58

59
00:07:33,720 --> 00:07:35,580
You see now Motorstop.
59

60
00:07:35,960 --> 00:07:47,480
And if I say start motor now you see motor stopped is still true and we need to see why it is not stopped.
60

61
00:07:47,490 --> 00:07:53,280
This is another one question but in here start motor is  okay motor is  turning forward.
61

62
00:07:53,400 --> 00:07:57,330
If not start motor so stop motor is coming timer
62

63
00:07:57,480 --> 00:08:11,720
Didn't came(high) but in here we set timer is timer0 is should be zero but the timers contact is not
63

64
00:08:12,470 --> 00:08:14,340
not reset.
64

65
00:08:14,390 --> 00:08:19,700
So we need to reset this timer but this is another one point for a moment.
65

66
00:08:19,700 --> 00:08:20,900
Doesn't matter.
66

67
00:08:21,770 --> 00:08:30,140
If timer contact is goes off that moment they will say motor stop will be false.
67

68
00:08:30,320 --> 00:08:39,470
That's all but these are if loops and in here we have if repeat and while and for and case loops for example
68

69
00:08:40,490 --> 00:08:46,540
I can create in here just briefly and other one thing.
69

70
00:08:47,420 --> 00:08:51,600
How can I say for example steps.
70

71
00:08:51,690 --> 00:08:56,150
And this will be word and I can use it.
71

72
00:08:56,210 --> 00:09:02,010
Case steps of like this.
72

73
00:09:02,220 --> 00:09:13,980
And then for example 10 I can say start.
73

74
00:09:15,440 --> 00:09:16,490
Will be true
74

75
00:09:20,540 --> 00:09:21,550
case.
75

76
00:09:21,650 --> 00:09:23,000
So what will happen.
76

77
00:09:23,240 --> 00:09:31,640
I will go online again and I will send these things to the case because integer expressions so I need
77

78
00:09:31,640 --> 00:09:37,110
to change it to integer it s okay and go on line again.
78

79
00:09:37,260 --> 00:09:38,580
And yes right.
79

80
00:09:38,620 --> 00:09:43,150
This project to my plc and it's downloading
80

81
00:09:48,460 --> 00:09:49,440
yes.
81

82
00:09:49,480 --> 00:09:54,000
So now you see our steps as integer is 0.
82

83
00:09:54,370 --> 00:09:58,750
So I will say change present value to 10.
83

84
00:09:58,750 --> 00:09:59,820
What will happen now.
84

85
00:09:59,910 --> 00:10:01,010
Let's focus to here.
85

86
00:10:01,030 --> 00:10:09,740
You see now motor is 2 because a step ten is activated and now it is to say 9.
86

87
00:10:11,280 --> 00:10:16,390
And you see it is still true because we didn't reset it .
87

88
00:10:16,710 --> 00:10:24,720
So what will happen if start motor set of timer will count and etc. our motors stop falls or true
88

89
00:10:24,720 --> 00:10:26,260
commands an etc..
89

90
00:10:26,670 --> 00:10:35,280
But my idea my goal in this video to show you how to create and a step programs and how to write is
90

91
00:10:35,280 --> 00:10:41,800
the language programming and how is the structure of a still language.
91

92
00:10:41,880 --> 00:10:50,070
This is there is still language you can add in here if and case and repeat file and for loops and they
92

93
00:10:50,070 --> 00:10:59,490
can continue to write our projects or programs I'm using for st languages to met instructions but
93

94
00:10:59,910 --> 00:11:08,300
in the detail st  videos and the in advance st commands and the usage of st commands we will
94

95
00:11:08,500 --> 00:11:14,610
will look them all in the one by one in the next videos for this video I'm finished here.
95

96
00:11:14,610 --> 00:11:18,690
This one's the just for the show to you st basics.
96

97
00:11:18,780 --> 00:11:26,400
So we already learned how to create st program and have to add variables in st languages
97

98
00:11:26,400 --> 00:11:32,570
and how to use it and how to set on and set off of ,true and false and the cases and the loops.
98

99
00:11:32,640 --> 00:11:34,850
So I'm finished for this video.
99

100
00:11:34,860 --> 00:11:36,270
See you in the next video.
