You are on page 1of 2

52.

Numeric Field

All right, In this lesson, we'll see how to input the time and see the feedback on the HMI. You can see in
this screen we have this time entry as 15 seconds. And this is a feedback time. All right, the motor is at
off. And if I press the Start button, you will see this time will increase. And this will go up to 15 seconds.
And when it completes 15 seconds this motor is on. So this is actually my preset time. And this is the
running time. All right, so let's see how we can create this application in which you have to feed the time
from the HMI and you can read the time here. Alright. So to do that, you might have guessed that the in
the PLC logic we're using a timer, it is the TON block and in the PT I took the double register MD10.
Okay, double register. Now, if you see this is 15 seconds here. So in the HMI, what you have to do is go
to the HMI, take this IO field here, alright, we need 2 IO fields, okay. Now, if you want to write some text
here, just for the information, I will take a text input, and I can write "timing operation in HMI". Okay. If
you want you can increase and decrease its size from here. This is okay. So this, this field over here, this
is our preset time. So I will write it PT, okay and increase its size by 16. Let shift it here, then I will copy
paste this one. And I will write it as ET which is my estimated time or maybe it's your running time,
whatever you want to call it. So this ET is here, PT is here. Now, you might imagine that if I go to my PLC
again, this thing over here, MD10, this is your PT, so you directly tag that with PT. Okay, for this one you
can tag it with your PLC, I will go back here PLC tag. This is MD10. Okay. So this is tag. Now, you must
notice one thing that in the PLC this default, it's written as 15 seconds, okay. But if I check here, just 1.
Okay, in my PLC if I write 1, in my HMI, you will notice that's 1 second. But here, you can see some
decimals. Suppose if I write 0.001, press Enter. And here you will notice it is 1 millisecond. So how this is
happening? In that case, if you go to your HMI, you have to define some decimals, because the default
input to the PLC timer is milliseconds, okay. So you have to take 3 decimals here. All right, if you notice
here, let me extend it, you have 3 decimals, it means now if we enter 1, the input will be 1.000, which
will be 1 second. So if you're entering 1 in this input, it will be 1 second, if we enter 1.001 it will be 1
second 1 millisecond. Okay. So similarly in estimated time, now we have to give the tag . Now what is
the tag for ET ? we have to find out in our PLC, go to the program block, and then to the system block
where you will find the database for the timer. And here you'll find ET so take its output. And here again,
if you want to display the time, in milliseconds, and in seconds, I would prefer you to take 3 decimals. All
right. And now here maybe if you want you're going to write the time feedback is in second, okay. So
that the operator will not be confused. Okay. So this you can write a textual information here. So let's
just download this one. Let me check the tag again. Everything's okay. So, when you download this one
in your HMI, this will do exactly what we started initially what we saw initially, but with some more text,
of course. So let me go back to my main OB1 and here is my camera.

And okay, so right now the PT is given as 1 millisecond so here is 0.001. Okay, let's just change that to
5.5. So this will be 5.5 seconds. So you can see that 5 seconds and 500 milliseconds, okay. So let's just
run the motor now. The motor will take the exact time and you can see the time here and it will be on
for 5.5 seconds, I hope this makes sense. So, this is the feedback we are reading. All right now there is
one thing I want to mention, if I, if I just click this one, this shows this menu, okay this is this is not
required because because that was your estimated time, this is not required. So, in this case, what you
can do is, go back to your screen and double click this one and use this mode as only output. Okay, so
this will only display the value, okay, but this PT is, this is your input/output both it will read and write
both value so this should be input/output. this should be only output. Now let's see the difference what

Internal
we have, when we change that mode to output, you may not be able to change the value ET like before,
this was necessary.

All right, it's running now. And here you see this is the same time, when I press with this one, nothing
happens. But here it is changing because this is input/output mode. If I press just four, it will be 4
seconds in my PLC, if you just want to see again, here you are okay, if I enter here, let's say 0.56, this will
be taken as 560 milliseconds, okay. The accuracy goes up to 3 decimals. So if I write 4.445, this will be 4
seconds, and 445 milliseconds. If you don't want this milli.., if you just one the you know if your time
ranges not in seconds, it's only in milliseconds, you can remove the decimal points, and you can just put
your milliseconds in directly. All right. So this is up to you how you want to use it if you want, exactly,
let's say 1 hour, so you put 3600 and you can see in the PLC, it's 1 hour, all right, because the ranges
double. So you can put 1 hour delay by writing 3600 seconds. And here you can maybe write in the small
in seconds so that the operator is not confused. So I hope this lessons, this lesson is very beneficial for
you to display the numeric characters and enter the value in the PLC. So let's see what we have in the
next lesson. Thank you

Internal

You might also like