I have done this in the past(years ago) but i can't remember how to get a variable equal to the current hour and current minute. I want to be able have the operator input an hour value and a minute value that i can then do a simple compare and run controls based on this enable. I am also communicating over radio so the input values from the operator will be in Word or Integer.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all, you have to use a function which returns the date and time from the realtime clock of your PLC. It can be RtcGetTime(TRUE). The other one function should be used for you task is DELETE. See code:
I have done this in the past(years ago) but i can't remember how to get a variable equal to the current hour and current minute. I want to be able have the operator input an hour value and a minute value that i can then do a simple compare and run controls based on this enable. I am also communicating over radio so the input values from the operator will be in Word or Integer.
First of all, you have to use a function which returns the date and time from the realtime clock of your PLC. It can be RtcGetTime(TRUE). The other one function should be used for you task is DELETE. See code:
For my tasks I've created a FB:
You can insert it into your project and call in PLC_PRG:
Thanks for the info. I will give it a try right away.
Oops, I'm sorry. There was a mistake in the last one line of the code I pasted. Now, it has been fixed.