GSV rslogix 5000. Time Exception

Zakonenko

Member
Join Date
Jun 2015
Location
Bolgary
Posts
11
Hello,

I always have problems with GSV.
I have to prepare a sequence in RS5000, which need to operate only at the set time. For example, from 22:00 till 3:00. It is really difficult to do, if the time crosses the 0:00, because I cant use LES and GRT instructions.
Could somebody help me please with it?


Thanks
Zakhar

Untitlsed.png
 
Latch a bit on at 22:00, unlatch it a 03:00


The bit can then drive your sequence...
 
You have two variables, TimeA and TimeB.

Update those from the panel.

2019-11-04_155143.jpg
 
Or you could use this if you want it to automatically update as you change the TimeX variables ....

2019-11-04_160412.jpg
 
Rockwell has free addon instructions for time and date comparisons.
Go here: https://www.rockwellautomation.com/...d326-9a38-0bf2-7fa8dde97de8;deepLinking=false


and search for
Time and Date Math Add-On Instructions


Overkill, in my opinion. Just importing the T_LIM add-on imports 4 others, T_ADD, T_GEQ, T_LEQ, T_LES. That's a lot of bytes of memory used, the T_LIM data-type is 604 bytes on its own ....

If the op just wants a sequence to run for a set number of hours every day, and be able to change the start and stop times from his panel, the above logic works perfectly.

Personally I would have it as StartTime and Duration instead of StopTime, calculating the Stop hour as StartTime + Duration, MOD 24. That way you can inhibit the sequence completely with a Duration of 0

2019-11-05_080522.jpg
 
Last edited:
Overkill, in my opinion. Just importing the T_LIM add-on imports 4 others, T_ADD, T_GEQ, T_LEQ, T_LES. That's a lot of bytes of memory used, the T_LIM data-type is 604 bytes on its own ....

If the op just wants a sequence to run for a set number of hours every day, and be able to change the start and stop times from his panel, the above logic works perfectly.

Personally I would have it as StartTime and Duration instead of StopTime, calculating the Stop hour as StartTime + Duration, MOD 24. That way you can inhibit the sequence completely with a Duration of 0

Thank You a lot!!!

It is also good to add SUB - 1 to the TimeB. Like in attachment

Untitlsed.png
 
Thank You a lot!!!

It is also good to add SUB - 1 to the TimeB. Like in attachment


Ah Yes ! Because you want it to stop at 6, not 7 as my first code would have done.

But you need that SUB in front of where it is tested in the LIM.

But now you have a problem if TimeB is 0 (midnight), the SUB will make it -1, which the LIM is not going to work correctly with.


This should cure that problem ....

2019-11-05_113312.jpg
 
Ah Yes ! Because you want it to stop at 6, not 7 as my first code would have done.

But you need that SUB in front of where it is tested in the LIM.

But now you have a problem if TimeB is 0 (midnight), the SUB will make it -1, which the LIM is not going to work correctly with.


This should cure that problem ....

Yes :)
Better MOV in the end

Capture.PNG
 
No, you need to make it 23 if subtracting 1 makes it -1.


You can do it with a MOV if you like, or just ADD 24
 

Similar Topics

Hi folks! I'd like to add to my PLC logic a way to detect what failure is my I/O module (PowerFlex 525 VFD)having. My goal is been able to array...
Replies
10
Views
4,422
Hello everyone, I am having an issue with random I/O faults on a ControlNet network. In the logic, there is a GSV instruction with LedStatus as...
Replies
3
Views
5,359
I'm trying to extract the fault status from a CompactLogix L33ER rev 20 and I cannot get the GSV intruction working on the Fault Routine. I...
Replies
1
Views
3,946
I am trying to get the Wall clock time with GSV. I was looking at this you tube video Here, I noticed that the Data type that they picked was...
Replies
5
Views
5,943
Hi guys I have a project in my head that I'm thinking of putting on our machines to help the engineers to fault find ? On our machines we do not...
Replies
1
Views
1,956
Back
Top Bottom