dbh6
Lifetime Supporting Member
Hello guys,
Something got me thinking, now we all know that most PLC's have their own internal time clock for Hr, Min, sec, and some even micro seconds.
My questions is say you want to write logic to fire at certain times during the day, how will the PLC tell if its AM or PM
For example say you want the PLC to turn off an output say at 12:00pm during lunch , if you program that in your logic you can have an EQU instruction for when the Hr, and Min are equal to 12 and 00 respectively and when it equals that have it turn off a certain output, but when the time equals 12:00AM in the morning the PLC will still turn of that output because all the plc is doing is looking for the numbers 12 and 00, so how can you program in a way that the plc will tell the difference?
Something got me thinking, now we all know that most PLC's have their own internal time clock for Hr, Min, sec, and some even micro seconds.
My questions is say you want to write logic to fire at certain times during the day, how will the PLC tell if its AM or PM
For example say you want the PLC to turn off an output say at 12:00pm during lunch , if you program that in your logic you can have an EQU instruction for when the Hr, and Min are equal to 12 and 00 respectively and when it equals that have it turn off a certain output, but when the time equals 12:00AM in the morning the PLC will still turn of that output because all the plc is doing is looking for the numbers 12 and 00, so how can you program in a way that the plc will tell the difference?