Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,450 --> 00:00:02,310
We'll come back.
2
00:00:03,120 --> 00:00:10,450
What we want to do today is that we want to add a battery detection mechanism into our program.
3
00:00:11,190 --> 00:00:15,870
We will continue using our previous program called the UDEMY and Escort Posse.
4
00:00:16,830 --> 00:00:26,280
So the first thing we want to do is we want to add to interrupt where the fun the program actually automatically
5
00:00:26,280 --> 00:00:30,660
detects whether there's a fault with a battery with the power supply system.
6
00:00:31,300 --> 00:00:37,050
OK, and this battery for detection is called the will eighty one.
7
00:00:37,830 --> 00:00:42,840
So what we want to do is we want to add the opiated went into our program.
8
00:00:43,170 --> 00:00:53,150
So we're at the opiated one by going in new object organization block and then we change the Oveta and
9
00:00:53,160 --> 00:00:55,890
change it to become opiated.
10
00:00:55,890 --> 00:00:56,170
Eighty one.
11
00:00:57,000 --> 00:01:00,930
Now the symbol name is automatically generated.
12
00:01:01,230 --> 00:01:09,210
Skopje's unescorted felty open the loop or that will be eighty one and you will see that inside a temporary
13
00:01:09,210 --> 00:01:09,950
variables.
14
00:01:10,920 --> 00:01:24,750
Um all the, all the uh all the parameters are already defined and if you want to learn more about it
15
00:01:24,750 --> 00:01:31,920
you can always, you can always go to the Seimas website and download this PDF.
16
00:01:32,830 --> 00:01:36,770
That's the name of the uh this is the name of the PDF.
17
00:01:36,810 --> 00:01:39,840
You can download, you can search for it online and download.
18
00:01:39,840 --> 00:01:40,710
It's free.
19
00:01:42,330 --> 00:01:49,890
So what you want to do, what we want to achieve today is to use this opiated one and detect any of
20
00:01:49,890 --> 00:01:50,480
the.
21
00:01:51,660 --> 00:02:01,500
Power supply problems and there are many types of power supply problems, for example, as described
22
00:02:01,500 --> 00:02:07,770
in this table here, at least one backup battery of the central rack is exhausted or probably eliminated
23
00:02:08,100 --> 00:02:09,020
the battery fault.
24
00:02:09,040 --> 00:02:14,040
OK, this event occurs only if one of the two batteries fails.
25
00:02:14,520 --> 00:02:20,650
If the second secondary if the second battery also fail, this event will not occur again.
26
00:02:20,670 --> 00:02:26,940
So basically, if it happens, it's for four for power supply with two batteries if the first battery
27
00:02:26,940 --> 00:02:27,780
is exhausted.
28
00:02:29,580 --> 00:02:37,660
The fall will occur, and if this is not taken care of in the second battery, fault also occurs without
29
00:02:37,660 --> 00:02:40,170
clearing the first battery fault.
30
00:02:40,510 --> 00:02:42,670
This would not be this.
31
00:02:42,670 --> 00:02:44,260
Olby will not be called again.
32
00:02:44,620 --> 00:02:53,200
OK, and another type will be the big bag of Boornazian essential brake failed or the failure of the
33
00:02:53,200 --> 00:03:03,280
second of the 12 Bovell battery supply or at least one battery backup battery as problem.
34
00:03:03,280 --> 00:03:09,730
Or you can't you can go through this on your own is depends on your application and what you want to
35
00:03:09,730 --> 00:03:09,940
do.
36
00:03:09,940 --> 00:03:10,450
Exactly.
37
00:03:10,450 --> 00:03:13,300
And how would you want to detect the battery problem?
38
00:03:13,810 --> 00:03:21,310
What I want to show you today is how you actually write the program to detect maybe the most common
39
00:03:21,310 --> 00:03:28,960
ones and then you can decide what you want to do, how you want to make your program, incorporate this
40
00:03:28,960 --> 00:03:36,190
into your program for better problem detection, especially for maintenance purposes.
41
00:03:37,000 --> 00:03:45,160
OK, so let's say if we want to make sure if we want to be able to detect a battery fault as a battery
42
00:03:45,160 --> 00:03:45,500
fault.
43
00:03:45,870 --> 00:03:46,300
OK.
44
00:03:49,050 --> 00:03:58,130
In any of the cities, in any of the cities we can be of the Mississippi, you or the slave C.P.U.
45
00:03:58,860 --> 00:04:01,770
So what we want to do is we want to.
46
00:04:05,860 --> 00:04:07,150
Pick the right one.
47
00:04:07,330 --> 00:04:14,570
OK, there are so many variables here, you want to pick the ones you want to pick, the ones that is
48
00:04:14,590 --> 00:04:15,460
useful to you.
49
00:04:15,490 --> 00:04:22,750
OK, um, one thing I want to tell you is that this Olby eighty one is only triggered when there is
50
00:04:22,750 --> 00:04:23,320
a false.
51
00:04:24,860 --> 00:04:27,030
When the focus appears OK.
52
00:04:28,600 --> 00:04:35,230
This obesity one is not like other obese, it's not like the time you threw up or the Obi Obi Wan,
53
00:04:35,230 --> 00:04:39,880
which continuously just keep rolling on and on.
54
00:04:40,060 --> 00:04:41,220
It's not something like this.
55
00:04:41,560 --> 00:04:46,060
Obesity, when only have only only is called when.
56
00:04:46,060 --> 00:04:52,030
Let's say the battery is exhausted, it'll be called once and then when the battery is replaced and
57
00:04:52,030 --> 00:04:52,660
reset.
58
00:04:53,750 --> 00:04:54,680
It would be called again.
59
00:04:54,950 --> 00:04:56,210
OK, so.
60
00:04:57,210 --> 00:05:05,610
Looking at this variable, OK, opiated one, underscore Ebbe and his core class there to.
61
00:05:07,200 --> 00:05:16,850
Two possible values, the Olby or the thirty eight and thirty nine, which is the incoming I, which
62
00:05:16,860 --> 00:05:21,210
is the outgoing and the incoming outgoing, means that the fault has disappeared.
63
00:05:21,790 --> 00:05:23,110
What has been rectified?
64
00:05:23,550 --> 00:05:26,040
Thirty nine means that the fault just came in.
65
00:05:26,420 --> 00:05:32,880
OK, so in that case, which is Koku, this was also here to the description.
66
00:05:34,880 --> 00:05:42,020
So you say, OK, if this is the case, if this is an incoming event, this would be three nice of incoming
67
00:05:42,020 --> 00:05:45,570
events, that means something's happened.
68
00:05:45,600 --> 00:05:48,230
OK, we don't know exactly know what happened.
69
00:05:48,260 --> 00:05:50,090
OK, say something.
70
00:05:51,380 --> 00:05:52,180
Something's wrong.
71
00:05:53,930 --> 00:05:55,580
Something's wrong with the piece.
72
00:05:55,940 --> 00:05:57,080
We don't know what it is yet.
73
00:05:57,110 --> 00:06:08,660
OK, OK, if if if the class is just make this smaller and it is a bit bigger, then we can see clearly.
74
00:06:10,390 --> 00:06:13,970
If the class is thirty nine, that means something's wrong.
75
00:06:13,990 --> 00:06:19,090
OK, we don't know exactly what is wrong, but we'll find out what is wrong by using this.
76
00:06:22,040 --> 00:06:22,730
The.
77
00:06:26,330 --> 00:06:28,520
Sir, it's just decoding a little bit better.
78
00:06:32,400 --> 00:06:33,430
We know something's wrong.
79
00:06:33,450 --> 00:06:39,360
We don't know what is wrong, what is wrong is that we have to choose the fault, underscore it, the
80
00:06:39,420 --> 00:06:40,910
fault identification code.
81
00:06:40,920 --> 00:06:47,670
OK, let's say what we wanted to do is we want to know that at least on the battery in the central wreck
82
00:06:47,940 --> 00:06:48,740
is exhausted.
83
00:06:49,230 --> 00:06:52,050
OK, so we'll put.
84
00:06:52,930 --> 00:06:58,030
The value of the past 16 past twenty one.
85
00:06:59,020 --> 00:07:03,010
OK, that means at least one better.
86
00:07:03,370 --> 00:07:10,360
Just copy the description here for is your understanding later on.
87
00:07:13,230 --> 00:07:13,580
OK.
88
00:07:18,240 --> 00:07:21,420
OK, if that's the case, then we know exactly.
89
00:07:24,480 --> 00:07:32,380
The incoming events the is caused by at least one of the backup batteries of essential exhausted in
90
00:07:33,400 --> 00:07:37,490
this case, we can just do our logic.
91
00:07:37,500 --> 00:07:43,220
Let's say if this happens, we want to sit and talk to you two hundred point zero to one, OK?
92
00:07:48,070 --> 00:07:53,890
Now, you may be asking, well, if this is a redundant policy, it has two sides and it has the massive
93
00:07:53,890 --> 00:07:59,470
policy, so it has to return to the slave CPU side.
94
00:08:00,190 --> 00:08:07,900
And I want to pinpoint whether the better battery fault was coming from the master side or the slave
95
00:08:07,900 --> 00:08:08,260
side.
96
00:08:08,290 --> 00:08:09,100
How do I do it?
97
00:08:09,820 --> 00:08:14,130
Well, it's not that difficult because you can always choose the recipe.
98
00:08:14,150 --> 00:08:14,960
You OK?
99
00:08:15,760 --> 00:08:26,140
So in that case, let me open another career and another network and just, uh, and just put some common
100
00:08:26,140 --> 00:08:32,990
of which side of the c.p.u is coming from default.
101
00:08:33,010 --> 00:08:33,720
It's coming from.
102
00:08:33,720 --> 00:08:33,980
Right.
103
00:08:36,760 --> 00:08:42,550
OK, so we know that we are dealing with this, so we just go like this, we know we're dealing with
104
00:08:42,550 --> 00:08:47,770
this now, what are the values possible for this rescue?
105
00:08:48,040 --> 00:08:49,930
OK, we go back to the.
106
00:08:51,490 --> 00:08:56,230
To the PDF here, and then we highlight this for easier viewing.
107
00:08:57,050 --> 00:09:05,230
OK, we know that the first eight bits will always be zero, will always be zero zero two, but seven
108
00:09:05,500 --> 00:09:06,520
eight bits in total.
109
00:09:06,610 --> 00:09:10,140
It will always be zero four bits, eight to 15.
110
00:09:10,570 --> 00:09:15,310
It depends on whether you're using a standard CPU or using a redundancy.
111
00:09:15,770 --> 00:09:23,150
OK, for standard CPU, meaning that's a single CPU, it doesn't have a redundancy value is always zero.
112
00:09:23,170 --> 00:09:29,890
So the entire word from zero to seven and eight to 15.
113
00:09:29,900 --> 00:09:33,730
So basically from zero to 15, everything is zero.
114
00:09:34,570 --> 00:09:35,490
Everything is zero.
115
00:09:36,460 --> 00:09:43,960
However, if you're using if you're employing a redundant CPU and you want to pinpoint which side was
116
00:09:43,960 --> 00:09:51,430
coming from, then you have to specifically type in which C.P.U do you want to monitor?
117
00:09:51,440 --> 00:09:55,360
For example, you'd want to monitor wreck one.
118
00:09:56,420 --> 00:10:06,150
Actually, zero, because for redundant p.l.c., OK, the two zero in Iraq, one, so if you want to
119
00:10:06,400 --> 00:10:11,710
if you want to monitor zero and then you want to.
120
00:10:14,200 --> 00:10:15,910
Look at the C.P.U.
121
00:10:16,990 --> 00:10:20,870
Of the three, the massive C.P.U, then how do we do it?
122
00:10:20,920 --> 00:10:24,610
OK, and put this step aside so I can see you, sir.
123
00:10:24,700 --> 00:10:25,020
OK.
124
00:10:26,400 --> 00:10:27,920
It's easy for us to see.
125
00:10:33,050 --> 00:10:38,840
It'd be easier for us to see, instead of flipping back and forth, we can just look at both on the
126
00:10:38,840 --> 00:10:39,800
same screen here.
127
00:10:41,150 --> 00:10:45,750
OK, so if that's the case came in second.
128
00:10:47,120 --> 00:10:48,940
So we're looking at this right now.
129
00:10:54,360 --> 00:10:54,610
Yeah.
130
00:10:57,400 --> 00:10:57,970
So.
131
00:11:00,760 --> 00:11:04,160
First of all, we have to know that the bits, uh.
132
00:11:05,260 --> 00:11:08,540
Accounting from right to left, so the leftmost bit.
133
00:11:09,980 --> 00:11:13,800
The left, the left most, that is 15.
134
00:11:14,390 --> 00:11:17,140
OK, so we have to also go backward.
135
00:11:17,210 --> 00:11:23,420
OK, so since we're typing in one bit at a time, we use binary and the way.
136
00:11:24,340 --> 00:11:32,260
Seimas possie knows how do we tell the seaman's posse that we were typing in a binary format and so
137
00:11:32,260 --> 00:11:38,260
we have to give it to hash, then the then the then the compiler.
138
00:11:38,260 --> 00:11:41,400
We know we know that we're talking in the.
139
00:11:42,850 --> 00:11:50,360
Bad news for me, so let's go back to school from 15, 14, 13, 12.
140
00:11:51,940 --> 00:11:58,900
So it take to be 15, 14, 13, 12, and then we're talking about 11.
141
00:11:59,540 --> 00:12:00,670
Turkey would be 11.
142
00:12:00,700 --> 00:12:07,660
We have to decide whether whether we are monitoring the reserve posse or the CPAC.
143
00:12:08,110 --> 00:12:19,180
Let's say we're monitoring the the, uh, the marsupial's events one, OK, and then they tend to be
144
00:12:19,210 --> 00:12:21,600
ten is the direct number.
145
00:12:22,180 --> 00:12:29,730
So let's say you're so zero is B ten, nine, eight.
146
00:12:30,490 --> 00:12:35,890
So, OK, these three number three bits will make up the record number.
147
00:12:36,850 --> 00:12:49,360
And then for seven to zero to four seven zero zero zero, so did seven six five three four three two
148
00:12:49,390 --> 00:12:49,690
one.
149
00:12:51,160 --> 00:12:53,560
So that's just to make sure we have 18.
150
00:12:53,580 --> 00:12:55,010
But we have 16, Bitsie.
151
00:12:55,020 --> 00:12:55,450
OK.
152
00:12:58,060 --> 00:13:03,610
One, two, three, four, five, six, seven, eight, nine, 10, 11, 12, 13, 14.
153
00:13:04,640 --> 00:13:07,500
Uh, it's not big enough for you, but it was just kind of for me.
154
00:13:07,520 --> 00:13:08,480
How would you describe for me?
155
00:13:09,330 --> 00:13:17,960
Do you want one, two, three, four, five, six, seven, eight, nine, 10, 11, 12, 13, 14,
156
00:13:17,960 --> 00:13:18,720
15, 16?
157
00:13:18,750 --> 00:13:25,400
OK, so this is, uh, uh, EPU.
158
00:13:29,020 --> 00:13:29,510
Zero.
159
00:13:32,220 --> 00:13:32,420
You.
160
00:13:36,140 --> 00:13:44,030
OK, if we want to know if we want to have specific actions for this C.P.U detection, we can say if
161
00:13:44,030 --> 00:13:49,250
this happens again, if it's incoming.
162
00:13:51,530 --> 00:13:53,510
Battery pack of battery phones.
163
00:13:56,650 --> 00:14:04,390
If the system detects incomparably fault and it's coming from a return, then please see what this is.
164
00:14:05,350 --> 00:14:12,190
This is our, you know, configuration rect zero a.m. C.P.U.
165
00:14:13,930 --> 00:14:19,180
Then we can do some action, for example, said the memory to one hundred point one.
166
00:14:20,170 --> 00:14:22,060
OK, that's it.
167
00:14:23,360 --> 00:14:29,370
OK, then you would be asking, OK, what happens when a one detects the other one.
168
00:14:29,390 --> 00:14:35,160
The other side of the CPU was pretty well you have to do.
169
00:14:36,410 --> 00:14:44,020
I like to make separate sections for things you see reviewing the all we have to do is put mastership
170
00:14:44,170 --> 00:14:45,590
and reserve C.P.U.
171
00:14:47,190 --> 00:14:47,350
Right.
172
00:14:47,560 --> 00:14:48,640
This is what we want to do.
173
00:14:48,650 --> 00:14:50,560
We want to a direct zero.
174
00:14:52,400 --> 00:14:56,410
Which one let we do this one, the reserve C.P.U?
175
00:14:56,680 --> 00:15:06,350
OK, so in order to change this correct one, that means that bit eight to 10 will be instead of a zero
176
00:15:06,350 --> 00:15:08,770
zero zero, it will become zero zero one.
177
00:15:09,650 --> 00:15:10,700
So let's try again.
178
00:15:10,770 --> 00:15:15,440
Is 15, 14, 13, 12, 11, 10, eight.
179
00:15:17,290 --> 00:15:26,350
Ten, nine, eight, so these three bits, the direct bits and changing this to one, right, and then
180
00:15:26,380 --> 00:15:27,580
the 11th bit.
181
00:15:29,560 --> 00:15:34,890
I'm changing it in the 11th, 11th, bit of changing it to zero.
182
00:15:36,460 --> 00:15:41,170
OK, of course, I was just given another bit, number two hundred and two.
183
00:15:43,160 --> 00:15:56,150
And now if the posse if the battery on the policy side, on the master side has an error and the error
184
00:15:56,150 --> 00:15:58,270
of the battery has some some faults.
185
00:15:58,840 --> 00:16:00,680
OK, um.
186
00:16:01,790 --> 00:16:08,140
It will give you two hundred point zero and telling me, hey, something's wrong, OK, please go check.
187
00:16:08,600 --> 00:16:15,750
But if you want to know exactly is he coming from the other is coming from the left side, you can change.
188
00:16:15,770 --> 00:16:18,580
You can look at this, these two bits, OK.
189
00:16:18,590 --> 00:16:27,470
And two hundred point one, it means that the incoming battery fault is coming from zero domestic policy
190
00:16:27,920 --> 00:16:32,710
or is coming from this bedazzling erm two hundred point two.
191
00:16:33,050 --> 00:16:36,920
Is the incoming events coming from Brek one, the Reserve C.P.U.
192
00:16:38,140 --> 00:16:43,000
Now, of course, you don't want this to be the end of this block, because once it's said there's no
193
00:16:43,000 --> 00:16:44,260
place to reset this.
194
00:16:45,730 --> 00:16:50,890
And if you if this is connected to discarded in the what, we'll never be able to be reset.
195
00:16:51,580 --> 00:16:57,310
So we want to do is one have a mechanism to to reset this.
196
00:16:58,010 --> 00:17:02,920
OK, so what we have to do is very straightforward.
197
00:17:03,040 --> 00:17:03,940
Just copy this.
198
00:17:05,910 --> 00:17:12,370
OK, and we want to to change the outgoing event right now going to.
199
00:17:15,540 --> 00:17:21,310
Sorry, I get you it and then changed this to become thirty eight.
200
00:17:22,320 --> 00:17:24,130
OK, same idea.
201
00:17:25,720 --> 00:17:27,840
We we're looking at this fault here, OK?
202
00:17:27,870 --> 00:17:28,980
We haven't changed the fault.
203
00:17:29,600 --> 00:17:30,750
The fault means that.
204
00:17:32,830 --> 00:17:41,020
Default means that the battery for them has lit, OK, or that's the problem eliminated.
205
00:17:41,050 --> 00:17:41,800
Remember this?
206
00:17:41,800 --> 00:17:50,980
Obeidi was only called once when it failed when it goes into a vault is also called once more when the
207
00:17:50,980 --> 00:17:53,710
vault disappeared or the problem is eliminated.
208
00:17:54,370 --> 00:18:01,000
OK, so if you took over the battery, if you took out the battery, this will be called the Obi Obeidi.
209
00:18:01,000 --> 00:18:03,880
One will be called due to the event.
210
00:18:03,890 --> 00:18:04,510
Thirty nine.
211
00:18:05,650 --> 00:18:13,420
If you reinsert the battery, a healthy battery and hit the reset button, this will be called again
212
00:18:13,750 --> 00:18:15,430
under even thirty eight.
213
00:18:16,190 --> 00:18:20,920
OK, so in this case one event, thirty eight is called.
214
00:18:21,580 --> 00:18:22,960
Then you reset this bit.
215
00:18:23,260 --> 00:18:23,680
OK.
216
00:18:24,630 --> 00:18:27,360
So the battery fault would be this would disappear.
217
00:18:28,860 --> 00:18:29,250
OK.
218
00:18:30,030 --> 00:18:34,710
Similarly, if you want to if you want to try this.
219
00:18:37,240 --> 00:18:42,370
We want to know exactly which side it is, then we just have to copy this one more time.
220
00:18:42,920 --> 00:18:44,710
OK, and then.
221
00:18:51,770 --> 00:19:00,580
See, it is easier to say, oh, we just say if the fog disappeared, okay, if the fog disappeared.
222
00:19:03,760 --> 00:19:09,880
If the thought disappeared, the problem eliminated, then we just reset the bit, that's it.
223
00:19:11,360 --> 00:19:11,700
Right.
224
00:19:14,150 --> 00:19:15,410
It's not that difficult.
225
00:19:16,850 --> 00:19:17,390
He said it.
226
00:19:19,760 --> 00:19:21,800
OK, that's all you that's all you need.
227
00:19:21,840 --> 00:19:24,000
We need this all we're doing today, OK?
228
00:19:24,470 --> 00:19:32,540
And then we know exactly when a thought has occurred, a weight gain of four.
229
00:19:32,600 --> 00:19:41,060
So could you think you've been through, you know, when the fault has disappeared using even thirty
230
00:19:41,060 --> 00:19:41,390
eight?
231
00:19:42,080 --> 00:19:50,030
What exactly it is OK if is twenty one and at least one back a battery of the essential records.
232
00:19:50,060 --> 00:19:58,310
Exhausted if we want to look at all the faults, ok, for example, we want to look at the failure of
233
00:19:58,310 --> 00:19:58,390
it.
234
00:19:58,400 --> 00:20:03,670
Twenty four volt power supply in at least one of the redundant wrecks.
235
00:20:03,680 --> 00:20:09,590
Then we just change this from a twenty one to a twenty seven.
236
00:20:10,610 --> 00:20:12,240
So you can see that's it.
237
00:20:12,350 --> 00:20:18,770
That's what you want to do or you have to do is change this to a twenty seven and of course you to up
238
00:20:18,770 --> 00:20:21,050
the economy, which is why we're not going to do it here.
239
00:20:21,060 --> 00:20:24,710
But if that's what you want to do, that's what we can do.
240
00:20:24,840 --> 00:20:25,340
OK.
241
00:20:26,290 --> 00:20:36,340
So let me change change this back to twenty one and then you can download this and, uh, go ahead and
242
00:20:36,340 --> 00:20:38,830
have a shot at it and see if that's what you want to do.
243
00:20:39,820 --> 00:20:43,420
Well, thanks for joining this
244
00:20:45,970 --> 00:20:48,190
video and hopefully you've learned something from it.
245
00:20:48,460 --> 00:20:48,970
Thank you.
22603
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.