Date Time comparison in RSLogix 500

nasps

Member
Join Date
Sep 2007
Location
Aveiro
Posts
11
Hi everybody!

I'm trying to make an external lightening system time-controlable with AB SLC 5/05.
I'm with some dificulty in compare specific time (hours:minute) because I want that an output stays ON between 19:00 and 07:00(next day). The other remaining period, the exit is off!

Any help?

Thanks in advance.
 
This quick example should get you started:

clock0.png
 
Hi Ken! Thanks very much for your tip. The quick example is very useful. I'm having a little trouble with minutes. For example: Lights On > 19:15
Lights Off > 07:30.
The bit must always be ON for the time that it suposed to be ON and OFF for the remaining period. Imagine that the CPU fails in an ON time and returns to normal state in an OFF time, the lights must "go down"!
In situations that the desired time is xx:00 no problem, but I must see all possibilities.

Thanks for any suggestion!
 
Hello Oakley! One of the problems is that the timestamp is divided in 3 status word hh:mm:ss and its not easy to compare 2 diferent words (hh:mm)when the slightest change in the conditions creates problems in the output.
 
The easy way

I honestly hate using latching instructions but, this is a great place for them.

Try the following logic...
HH = 19 and MM = 15 OTL
HH = 7 and MM = 30 OTU

The downfall of the above logic is that it only sends the lights on command at 19:15 and the lights off command at 7:30. This means if the lights are off and you start your logic at 20:00, the lights will not come on till the next day when the clock hits 19:15.
If this is an issue, you will need to go back to your greater then and less then comparisons.

Good Luck,
Tim
 
Because you want the output to be ON between 19:00 and 07:00, for this to work correctly you will want the Low Lim = 1900 and the High Lim = 0700.

By reversing the limits, it effect says that if you are outside the limits, then turn on the output.
 

Similar Topics

I have searched the forum unsucessfully for some logic for date/time comparison. I have some RFID tags coming from another area that I read and...
Replies
2
Views
3,004
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
248
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
94
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
86
Hello, I have an automation direct d2 262 plc and C-more HMI EA9T6CL-R. I need to prepare a program, scheduled to be performed on a future date. I...
Replies
1
Views
112
Back
Top Bottom