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,016
So we have a few associates that like to write the date in the file name when saving the program to back it up. We back up the programs every...
Replies
12
Views
222
Hello Everyone, I want to upgrade the firmware of Powerflex 40 from 5.001 to 6.002 can anyone tell me how can I do that?
Replies
0
Views
76
Hello, I'm hoping someone can help me with understanding how to set/change these data types. We recently swapped from Invertek to AB drives...
Replies
1
Views
137
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
326
Back
Top Bottom