쉐도잉 연습: PLC Programming Tutorial - Ladder Logic #3: Math and Calculations - YouTube로 영어 말하기 배우기

C1
⏸ 일시 정지
Hello and welcome back to Lemaster Tech
184 문장
문장이 너무 짧거나 길면 Edit를 눌러 조정하세요.
1
Hello and welcome back to Lemaster Tech
2
and in today's video we'll be continuing our series on the basics of PLC programming in ladder logic programming language.
3
Today we'll focus on basic math operations including multiplication, division, addition, subtraction, and then we'll talk about the calculate block which combines many of these operations together.
4
If you like the content in this video
5
and you've been finding these tutorials helpful please consider leaving a like on the video
6
and subscribing to the channel it helps me out a ton.
7
Now let's get into this tutorial.
8
okay so for today's video i've just gone ahead
9
and made some empty integer tags in my plc
10
so we're gonna use integers we don't need reels or floats but the math that we're doing in today's video,
11
you could make these floats or decimal values and they will still work.
12
We're just going to use integers today to keep it simple.
13
So let's go into our ladder tutorials binary block.
14
It doesn't matter if you still have some of the binary code from past videos in there.
15
Today, we're going to start from scratch.
16
Concepts covered in these videos are applicable to generally every PLC programming platform in the world.
17
Ladder diagram.
18
These are standard blocks.
19
Um...
20
So today we're going to talk about when you hit an empty block, pretty much every PLC programming software has some version of all the basic mathematical operations.
21
They have an add block.
22
They have a subtract block.
23
They have a...
24
division block and a multiplication block And a cool thing about Tia, most platforms have some version of this.
25
But if you have a block, it's very easy to change in between one and the other.
26
To make this a little bit more readable, I'll put add and subtract up top.
27
and I'll put multiply and divide.
28
in the bottom.
29
And just to talk about the sort of the variables that you're seeing on these blocks, um you're seeing input one and input two and then an output
30
The easiest thing we can do to showcase these working is use one variable like my in zero.
31
and put a hard -coded value in input 2.
32
and then put a new integer in the output here and say myInt1.
33
So what this should do is say one plus two goes into the output.
34
Now let's go ahead and set all of these up at once because this isn't really the super interesting part.
35
I'm gonna just sort of jump ahead to where I have my values added into each block
36
so you don't have to watch it.
37
Okay, and you don't have to use the same, actually it's probably better if I don't, you don't have to use the same constant for every block just to be clear.
38
This is just me entering a number.
39
And you could enter another variable in here too.
40
If you're doing something dynamic scaling or checking states of sequence steps or anything else like that, this could also be a variable and you see addition
41
and multiplication are ones where they're also okay with you adding multiple operands.
42
So obviously to do addition you have to add at least two things together.
43
Same with multiplication.
44
But you could do a long string of multiple values, addition and multiplication on these blocks.
45
It isn't there for subtraction and division because the order matters, and they can't necessarily tell if you want to divide this by this by this by this,
46
or subtract this by this by this by this in what order.
47
But addition and multiplication you can.
48
And in just a minute we'll talk about a more complicated block that does let you combine all of these functions.
49
But let's go ahead and download to the PLC just to showcase these four simple mathematical blocks.
50
And we'll go ahead and write some values to these integers and we'll see what happens to the outputs.
51
Okay.
52
So here we see my in zero currently set to zero.
53
If I change it to 50, you see my int one is just 50 plus 10.
54
It's 60.
55
If I change this to...
56
75 My int 1 is 85.
57
So the output is simply the addition of 1 plus 2.
58
A little bit different over here.
59
If you look at the subtract block, it's 1 minus 2.
60
A little bit different, but not really.
61
And if you do 20 minus 8, it's 12.
62
Okay, so input 1 minus input 2 goes into input 3.
63
Multiplication, 32 times 6 is 195.
64
Pretty straightforward.
65
You know, five times six should be 30.
66
So there you go.
67
Division zero divided by four zero.
68
Let's make it something more interesting than zero like 26 And you see something interesting now with Tia Portal.
69
If you're dividing an integer by an integer and putting it in an integer value, it will still allow that, but it's going to give you the nearest integer value.
70
And so 26 divided by four.
71
is obviously 6 .5.
72
And if we went to 27, you're getting 6 .75, but you see it's doing floor division.
73
It's rounding down.
74
There's one block I wasn't necessarily going to cover because it's a little less common here, but the modulus block is sort of the fifth math block.
75
And if we took this input six and we still put four down here, and we put it in a new integer value, my in eight, let's say,
76
and we divide or download.
77
There we go.
78
You can see that if you're using integer values because booleans or sorry floats decimal values use up more memory.
79
Sometimes you do just want to use an integer and know what the remainder is.
80
That's what the mod block is.
81
Modulus is the remainder of a division system.
82
So 27 divided by four, where you want the integer value will round down to six, and so will 26 and so will 25.
83
but what's changing is the remainder, so you can get the remainder separately using this modulus block.
84
Okay?
85
So there's addition, subtraction, multiplication, division, and modulus.
86
Alright, so that's a lot of simple math pretty fast.
87
One, maybe it's useful, maybe not to you.
88
One useful thing to call out is you can actually put the same input on the left side and the right side.
89
of a math block so if you're doing some sort of transformation on one line of a value
90
like scaling and you can say like, oh, okay, the integer that I currently have plus 10, and then store it in the same variable name.
91
There's really no good reason to do that, but technically it's still valid code.
92
So let's look at a real world scenario really quick where we combine a couple of these
93
and to create a Celsius to Fahrenheit or Fahrenheit to Celsius converter, right?
94
You can take a you know your initial value times nine and you can store that in...
95
my in one
96
And then you can take my int 1 as the output from there
97
and store it as the input from 2 and then say divide by 5.
98
Put that in my int 2.
99
And then you can add my int2. To 32.
100
I moved it.
101
I didn't copy it.
102
There we go.
103
And that obviously you can store in my int.
104
Three.
105
So let's go ahead and download that to the PLC.
106
I'm sure all those intermediates had values, but they'll get overwritten.
107
Oh, this is Celsius to Fahrenheit.
108
75 Celsius is quite hot.
109
30 Celsius.
110
Is 86 Fahrenheit.
111
Okay, that math checks out.
112
So we built a Celsius to Fahrenheit converter.
113
I put it in my notes backwards.
114
Let's actually go ahead real quick and do the same thing.
115
Let's do Fahrenheit to Celsius, see it in reverse.
116
Okay, and I went ahead and spared you the pain of having to watch me type it all out.
117
But here we can see Fahrenheit to Celsius is the same formula but in reverse.
118
It's taking, you know, some number subtracting 32 out.
119
and then multiplying by 5, dividing by 10.
120
So in this case, rather than 30, let's just see it in reverse.
121
If it's 86 degrees Fahrenheit, it's 30 Celsius.
122
This makes sense because we're seeing the same formula in reverse.
123
So let's see what our Fahrenheit to Celsius converter says.
124
If it's a brisk autumn day and it's 60 degrees, that's 15 celsius and you know the math should check out
125
because if we go and make this 15 we should get OK, 59.
126
But that's actually an interesting one because you're seeing the two different types of rounding going on by using exclusively integer values, because if these were all reals,
127
they would obviously be to the decimal precision the exact same number um
128
but that's actually cool you're seeing a symptom of using integers for your math
129
but this is still a functioning celsius to fahrenheit and fahrenheit to celsius converter However, you may be looking at this and saying this looks kind of stupid.
130
I need six integers to be able to do this math.
131
You know, I have to
132
output to an integer value that then goes
133
and becomes the input of another block on every one of these blocks
134
and no you don't that's actually where a far more useful
135
block for doing multi -step calculations like this comes in
136
and in Siemens it's called calculate in Allen Bradley Rockwell it's called compute so you type a CPT in
137
Pretty much every Allen Bradley instruction has like a three letter or four letter
138
abbreviation and CPT is the version of this that you use in Allen Bradley.
139
I actually think the compute block in Rockwell is a little bit more intuitive than the calculate block in Siemens
140
but They do functionally the same thing.
141
And what's cool about this is I can take that same input, my int 0, which is going to be our Celsius input,
142
and then I can store it to a new output that will be our secondary check.
143
So my int 4, if we do this calculation right, should be the same as my in three because we're going to attempt to multiply by nine divide by 5,
144
and add 32, all in this one block.
145
So we're going to try to multiply by nine, divide by 5, and then add 32.
146
all to my int zero.
147
by tap double clicking this output or whatever your PLC IDE version of editing this is.
148
And the output we reference those input variables in defining our output function.
149
So we just come in here and we say, input one times input two,
150
so multiply by nine, divided by input 3 divided by 5 and then plus input 4.
151
So add 32.
152
Okay?
153
And I'm quite confident this is going to work, but let's go ahead and do the reverse version of it too so you can
154
We can just get both of them knocked out at the same time.
155
So we'll use that my int 5 as the input.
156
And what's the next unused one?
157
We'll use my int 9 as the output for this one.
158
And then the only thing different here is we want to subtract by 32, multiply by 5, and divide by 9.
159
I'll just keep them in that order we want to use them here.
160
And this function is going to be...
161
little different it's gonna be input 1 minus input 2 Fortunately, compute blocks and calculate blocks respect PEMDAS.
162
It respects the order of operations, to put it more clearly.
163
So we're going to use those parentheses to say do the subtraction first, and then multiply by input 3 and divide by input 4.
164
Uh, that was, there we go.
165
I put a space in the wrong spot.
166
Okay, so this is saying, you know, the input minus 32 times 5 divided by 9.
167
Okay, so if we did our math correctly and I'm something of a math whiz, Let's go ahead and download.
168
So we did the kind of step show each step using each block one at a time
169
and we have 15 converts up to 59 and then we have 60 converts down to 15.
170
We see the same thing happening here.
171
So if we say Celsius 22 degrees.
172
71 degrees Fahrenheit well let's say if we have 72 degrees Fahrenheit it converts down to 22 degrees Celsius.
173
So 75, 23, yeah I guess I saw that coming.
174
19 would convert up to 66.
175
Okay, so this is a pretty solid basic introduction to math and simple Mathematical operations in ladder programming for Siemens.
176
And so we'll probably do an advanced math video at some point in the future, but those come up far less frequently than the ones we covered today.
177
Hopefully you found this useful.
178
Hopefully you've been enjoying the series.
179
If there's a specific concept you want to see covered in the video.
180
in a video, be sure to let me know about in the comments below.
181
As always, thank you for watching.
182
Don't forget to like the video, subscribe to the channel, and see you next time.
183
Thanks.
184
Bye.

앱 다운로드

Everything you need to speak fluently

AI PronunciationScore every sentence
IPA PracticeMaster every sound
VocabularyBuild your word bank
Vocab GameLearn while playing

맥락 및 배경

이번 영상에서는 PLC 프로그래밍의 기본 개념을 다루며, 특히 사다리 논리 프로그래밍 언어에서의 수학적 연산에 초점을 맞추고 있습니다. 연사자는 곱셈, 나눗셈, 덧셈, 뺄셈과 같은 기본적인 수학 연산을 소개하고, 다양한 연산을 조합할 수 있는 계산 블록에 대해서도 설명합니다. 이 영상은 모든 PLC 프로그래밍 플랫폼에서 적용될 수 있는 개념을 제시하고 있어, 관련 학습을 원하는 학습자에게 유익한 내용입니다.

일상 대화를 위한 5가지 주요 표현

  • “우리가 오늘 다룰 것은 기본적인 수학 연산입니다.” - 주제를 제시하며 시작하는 표현입니다.
  • “힘들어하지 마세요, 이 내용은 매우 간단합니다.” - 학습자에게 자신감을 주는 말입니다.
  • “모든 PLC 프로그래밍 소프트웨어에는 기본 수학 연산 블록이 있습니다.” - 개념을 설명할 때 유용한 표현입니다.
  • “입력값을 설정한 후 블록을 다운로드합니다.” - 과정 설명에서 사용할 수 있는 표현입니다.
  • “우리의 출력 결과를 확인해 보겠습니다.” - 학습자에게 실습 결과를 강조하는 표현입니다.

단계별 쉐도잉 가이드

이번 영상을 통해 영어 쉐도잉을 연습하고 싶은 학습자에게 다음과 같은 단계를 추천합니다:

  1. 초기 청취: 전체 영상을 한번 들어보며 대화의 흐름을 이해합니다. 중요한 키워드와 문장을 메모하세요.
  2. 구체적인 문장 선택: 영상에서 나온 5가지 주요 표현 중 하나를 선택하고 반복해서 들어봅니다.
  3. 쉐도잉 연습: 선택한 문장을 따라 말해 보세요. 가능하면 원어민의 발음에 맞춰 억양과 리듬에 집중하세요. 이를 통해 자연스러운 영어를 습득할 수 있습니다.
  4. 피드백 받기: 자신의 쉐도잉 촬영 후 들어보며 발음과 억양을 조정합니다. 이는 IELTS 스피킹 시험 준비에도 도움이 됩니다.
  5. 반복 연습: 정기적으로 위 과정을 반복하며 익숙해질 때까지 연습하세요. 매일 짧은 시간을 투자하면 큰 효과를 볼 수 있습니다.

영어 쉐도잉, 특히 유튜브 영어 공부를 활용하여 꾸준히 연습하면 말하기 능력을 크게 향상시킬 수 있습니다. 다양한 표현을 익히고 반복하는 습관을 기르세요!

쉐도잉이란? 영어 실력을 빠르게 키우는 과학적 방법

쉐도잉(Shadowing)은 원래 전문 통역사 훈련을 위해 개발된 언어 학습 기법으로, 다언어 학자인 Dr. Alexander Arguelles에 의해 대중화된 방법입니다. 핵심 원리는 간단하지만 매우 강력합니다: 원어민의 영어를 들으면서 1~2초의 짧은 지연으로 즉시 소리 내어 따라 말하는 것——마치 '그림자(shadow)'처럼 화자를 따라가는 것입니다. 문법 공부나 수동적인 청취와 달리, 쉐도잉은 뇌와 입 근육이 동시에 실시간으로 영어를 처리하고 재현하도록 훈련합니다. 연구에 따르면 이 방법은 발음 정확도, 억양, 리듬, 연음, 청취력, 말하기 유창성을 크게 향상시킵니다. IELTS 스피킹 준비와 자연스러운 영어 소통을 원하는 분들에게 특히 효과적입니다.