Pratica di Shadowing: How to Scale Analog Values in PLC Programming! - Impara a parlare inglese con i video

Creazione lezione...
1
Hello and welcome back to the channel.
2
And today we're going to take a look at PLC programming, continuing our PLC programming tutorials, and today zeroing in on how to scale analog inputs.
3
So we've done quite a lot of work so far on the channel with Booleans or binary digital inputs and digital outputs, which are on, off, zero, or one.
4
Today we're going to take a look at the other kind of input, which is analog inputs and outputs.
5
And these are things like temperatures, pressures, flows, the speed of a variable frequency drive, things that are not zero or one.
6
They have a range of control, a range of feedback input or control output.
7
And to understand the scaling that we need to do in the PLC, you need to understand briefly how these work.
8
signal.
9
The most common ones are 0 to 10 volts DC and 4 to 20 milliamps analog input.
10
So the thing that I want to go, you know, put my credibility at stake
11
and say is more common is 4 to 20 milliamps
12
because you get this nice benefit of 0 milliamps also telling you that there's a problem with the device.
13
So 4 milliamps acts as your baseline of a zero reading where that's zero pressure
14
or flow or your low level or whatever, but, or four milliamps tells you that, but zero milliamps tells you,
15
hey, I've lost communication with this device and I've gotten some benefit.
16
You don't always have that necessarily if you have zero to 10 volts, unless you add in some sort of like broken line connection.
17
Now it's important to note that every PLC manufacturer and every analog input card can be a little bit different.
18
So you need to check the specs for what the raw input signal is for your card.
19
Some Alan Bradley cards will use zero to 32 ,000.
20
They'll basically max out what a double integer can hold, a double integer value variable.
21
But Siemens, the more common one is basically zero to 27 ,648,
22
where anything below zero will be seen as under current and anything above 27 ,648 will be seen as over current.
23
I have the Siemens PLC programming software and a PLC hooked up.
24
But the concepts we're about to cover are universal for any PLC.
25
So let's actually get into what scaling an analog input looks like, and let's just make a new function called analog scaling.
26
you could create this in any plc platform now the exact
27
name of the next two blocks i'm going to show do vary across plc platforms
28
so the two steps we want to do are basically take a raw electrical
29
input which will be giving us a value of 0 to 27 648
30
and we want to normalize it to basically 0 to
31
And then we want to scale it according to our engineering units.
32
Okay, so this is what scaling an analog input means.
33
What that 0 to 27 ,648 means to the actual real world is meaningless unless we scale it because a flow meter,
34
a pressure sensor and a temperature sensor and a level sensor could amps,
35
but that tank might be telling you 0 to 10 feet of liquid, that flow meter might be telling you 0 to 50 GPM of flow,
36
you know that temperature could be 32 to 200 degrees Fahrenheit, or you might want that temperature sensor reading in Celsius.
37
that is where the scaling comes in.
38
So the first thing we want to do is we want to normalize that raw value.
39
Siemens has a block called norm underscore X.
40
You could do this in Allen Bradley with a compute or calculate block.
41
You can do it in Siemens with a calculate block, but this is already built for you where you basically say, what is my raw electrical minimum?
42
It's going to And then we'll define this raw input as a input to be passed into this function.
43
OK, so we're creating a function that will let us scale all of our analog inputs.
44
So we'll make this reusable.
45
So we'll make it what's called a local in, meaning it needs to get passed into this function when we call it.
46
And we'll make it a double integer.
47
That's the proper proper format for this.
48
function called normalized.
49
So we'll just go ahead and define it.
50
We'll make it a real because this is going to give us zero to one, but we don't want an integer that will only ever read zero or one.
51
We want it that normalized zero to 100 percent.
52
So we want it to be a real.
53
Okay, now we'll have this normalized bit that will and actually did I call it local temp?
54
Okay, good.
55
So this will basically tell us zero to one as a function of scale, like where in the four 20 milliamps span our devices.
56
But that's still not useful because those aren't the units we're looking for.
57
What we're looking for is something that has been scaled to the appropriate output.
58
Okay, so we'll take that normalized and we'll say we have zero to 100.
59
It can be really tempting to just take that value and multiply it times your max span.
60
So if you were looking at a level sensor
61
with saying like well now I'll just multiply it by a hundred
62
and it'll tell me the percent full of the tank
63
but that's tricky because four milliamps does not always equal zero sometimes like with the temperature sensor
64
and in the US you know we're using Fahrenheit zero is
65
not a temperature you're going to see from a temperature sensor very regularly
66
if you're measuring the temperature of a liquid a lot of these are scaled to like 32
67
or or you know there'll be 32 to 200 but you want temperature sensor that goes 50 to 300.
68
So again, to make this reusable, what we want to do is we want to make some new variables and call them EU min and EU max.
69
You can call these something else that makes more sense to you.
70
EU means engineering units, right?
71
This means the basically like the actual what you want your scaled output to display as.
72
And we'll make these reels as well, even though they are most commonly going to be integers.
73
That's OK.
74
We'll keep them all reels.
75
not be local temp that should be another local in okay we want
76
when you're calling can i move that okay we want
77
that to be a local in because we want this to be something that you pass in per input
78
the whole thing about making an analog scaling function that's reusable
79
means you need to be able to change these parameters per sensor
80
that you hook up so we'll make engineering units minimum I know I just said output,
81
that'll be our scaled input.
82
But if you think about what this function is doing, it's taking a raw electrical signal from an analog input,
83
and it's turning it into a useful scaled engineering units, whether that's GPM for flow, or, you know, inches of H2O for,
84
for, for, for a level sensor or something like that.
85
So we'll make that a local out, and we'll go ahead and define that.
86
Just this little normalize plus scale is all it's going to take to give us a reusable function
87
that will let us scale inputs.
88
So let's go take a look at what actually using this thing looks like and we'll show an example of it working.
89
So let's go ahead and define like raw.
90
Temp one, okay, we'll make a raw temperature sensor
91
and to not worry about wiring or physical hookup We'll make it a memory tag for now, but obviously I This would be the tag you hook up to your global analog input channel.
92
We'll go ahead and define it and we'll say the engineering units minimum for this will be 32 and 200, right?
93
So it's measuring the temperature of water.
94
There's no reason to think it's going to measure below 32.
95
Super important point about EU min and EU max.
96
This is not something you as the programmer should be picking what makes sense to you.
97
This should be from the manual of the device that you hooked up.
98
span for four and 20 milliamps.
99
So I am obviously picking values for the demonstration.
100
But these are things that should be coming from a manual.
101
Now let's go ahead and define the scaled output.
102
Okay, so this is going to be now a temperature sensor doesn't need the pound sign.
103
There we go.
104
This is going to show us a temperature sensor.
105
Let's go ahead and download it.
106
This will show us a temperature sensor that is going to read a raw electrical signal of zero to 27 ,648.
107
But our function that we just wrote should scale
108
that down to a zero to one percent of span
109
and then multiply it times 32 to 200 to figure out where we are in that span.
110
Okay, so we're sitting there at zero 32 is a good sign.
111
Let's go ahead and throw 13 ,000 in here and look at what about middle span looks like, And it gives us, hey,
112
okay, you're getting this electrical reading on your card of 13 ,000.
113
That correlates to 110 .99 degrees Fahrenheit.
114
Nobody in the UK panic.
115
And then let's say, let's go get pretty close to max span, okay, 25 ,000.
116
All right, it's 183 degrees.
117
So you can see this is kind of cool and kind of useful.
118
But let's take a look at where it gets really useful.
119
level in here as well
120
and the level is going to show us from three inches of water up to 240 inches of water.
121
Okay, it's a it's I don't know, ultrasonic level sensor to pick your poison.
122
But basically, let's just make up that we have some level sensor here
123
and we are going to have a scaled level one here and we'll make that a global memory as well.
124
And like making all these global memories is not exactly good programmers etiquette.
125
I'm just trying to go fast for the sake of a tutorial.
126
And then we'll throw one more in here.
127
and we'll define a little global flow meter tag here.
128
That shouldn't have been a reel, that's okay, it doesn't matter.
129
And let's say that the flow meter is zero to 100 GPM and we'll make scaled flow one tag as well.
130
Okay, define tag, global memory.
131
There we go.
132
All right, let's go ahead and download this, play around with it and talk through what we're seeing a little bit.
133
All righty, so we'll leave scaled temp alone as is.
134
But what's cool is we've written that scaling function once.
135
And this raw to, you know,
136
10 ,000, a little less than half span, it gives us, hey, okay, the level is 88 inches of water.
137
And I go to my flow, and I say, this is a little over half span.
138
And it says, all right, you're getting 54 GPM.
139
So one very simple analog scaling function that takes a raw input, normalizes it, and then scales it according to our engineering units,
140
is able to take every 4 to 20 convert it to engineering units that we'd want to see.
141
We'd want to put these on an HMI, add them to a historian tool, and view trends over time.
142
So this is really a simple, basic crash course to analog scaling.
143
No need, I think, to overcomplicate it.
144
I'm sure in the future we'll need to do a tutorial on the actual wiring of analog inputs
145
and the setup loop checking process for analog inputs, how you actually make sure they're working correctly.
146
But for the scaling in the PLC, I think this is a great tutorial and good place to stop.
147
So I'll go ahead and call it there on this lesson.
148
If you have any questions, be sure to let me know about in the comments below.
149
Please consider leaving a like on the video, subscribing to the channel, that helps me out a ton.
150
And let me know in the comments as well what you'd like to see next on the channel.
151
Thanks so much for watching and see you next time.
152
Thanks, bye.

Perché praticare la conversazione con questo video?

Praticare conversazione in inglese può sembrare una sfida, ma con risorse come i video di programmazione PLC, puoi migliorare le tue abilità linguistiche in un contesto tecnico. Guardare video su argomenti specifici, come la scalatura dei valori analogici, ti consente di ascoltare termini tecnici e il gergo associato. Questo non solo amplifica il tuo vocabolario, ma migliora anche la tua comprensione del contesto, permettendoti di esprimerti più facilmente. Utilizzare video in lingua inglese è un modo efficace per apprendere mentre ti concentri su argomenti che ti interessano, rendendo l'esperienza di apprendimento più coinvolgente e pratica.

Grammatica ed espressioni nel contesto

  • Frasi condizionali: Il relatore utilizza spesso frasi come "se non fai attenzione...". Queste strutture grammaticali sono utili per esprimere condizioni e conseguenze.
  • Uso del presente semplice: Frasi come "la scalatura dei valori è importante" evidenziano come il presente sia utilizzato per fare affermazioni generali, il che è cruciale nella tua pratica di conversazione in inglese.
  • Terminologia tecnica: Frasi come "normalizzare i valori" e "input analogico" offrono una visione di termini specifici utilizzati nel contesto dell'ingegneria. Familiarizzarsi con questi termini ti aiuta a migliorare la pronuncia inglese e a sentirti più sicuro nelle conversazioni tecniche.

Trappole comuni nella pronuncia

Alcune parole e frasi in inglese possono essere complicate, specialmente per chi sta imparando l'inglese con youtube. Ecco alcune trappole di pronuncia da prestare attenzione:

  • Analog: Assicurati di pronunciarlo correttamente come “ˈæn.ə.lɔg”, evitando di cadere nell'errore comune di pronunciarlo come “analog”.
  • Normalize: Questa parola può creare confusione. È importante ripetere “ˈnɔːr.mə.laɪz” per evitare errori di pronuncia.
  • Input: Il termine “input” è semplicemente “ˈɪn.pʊt”, ma chi pratica può confondere la pronuncia iniziale, quindi esercitati a dirlo chiaramente.

Concentrati su queste trappole di pronuncia e utilizza la tecnica di shadowspeak per migliorare la tua capacità di parlare in modo fluido e chiaro in inglese. Ogni video offre un'opportunità per migliorare, abbraccia questa chance per perfezionare le tue competenze linguistiche!

Cos'è la tecnica dello Shadowing?

Shadowing è una tecnica di apprendimento delle lingue supportata da studi scientifici, originariamente sviluppata per la formazione dei traduttori professionisti e resa popolare dal poliglotta Dr. Alexander Arguelles. Il metodo è semplice ma potente: ascolti un audio in inglese di madrelingua e lo ripeti immediatamente ad alta voce — come un'ombra che segue il parlante con un ritardo di solo 1–2 secondi. A differenza dell'ascolto passivo o degli esercizi di grammatica, lo shadowing costringe il tuo cervello e i muscoli della bocca a elaborare e riprodurre simultaneamente i modelli di discorso reale. La ricerca dimostra che migliora significativamente la precisione della pronuncia, l'intonazione, il ritmo, il discorso connesso, la comprensione dell'ascolto e la fluidità del parlato — rendendolo uno dei metodi più efficaci per la preparazione alla prova di speaking dell'IELTS e per la comunicazione reale in inglese.

Tecnica dello shadowing: leggi la guida completa passo dopo passo →