RsLogix/Studio 5000 Sequence Timer(s)

ohnedich6

Member
Join Date
Jun 2014
Location
Midlands SC
Posts
67
All,

I've done a search on this but did not have any luck, but if I have overlooked a topic on this by all means let me know.

I am a little stumped on a bit of logic that i am attempting to write using RsLogix/Studio 5000 v24. I am writing some Sequences, using the tag Seq_Test (DINT), where i am performing MOV instructions after certain is True to increment my Seq_Test tag. Some of this logic contains delays between steps of varying times (1s, 3s etc.).

What I am wanting to do is use one Timer and move in a predefined Preset value depending on what the needed Preset is based upon the Step that my logic is in. If i make a Sequencer that only has delays in the steps, the delay in the first step operates correctly but once it finishes it "blows" through the rest of the code and stops at the last step.

I've attached a JPEG of the sample logic I am working with. Thank you for your help.

-Nathan

Sequence Timer Forum Help.jpg
 
Think about how it will scan a routine from start to finish. It looks to me (if i have understood your question correct) that on the scan cycle when the timer is done, it will the carry out rung 3, and put the 20 into the sequence. then it will move to rung 4 and as the timer.DN is still true it will then carry out that rung aswell and put a 30 in to sequence, then the same for rung 5 and so on.

it will all happen incredibly fast and you will just see the end result of the 50 being in there.
 
I put my sequence timers in a seperate routine that is always scanned so when the step goes off the timer is reset.
 
I just tried placing the TIMER in the MAIN routine, the Sequence routine is a subroutine, it still jumps after it completes the first TIMER and the RES bit still appears to not trigger in parallel with the MOV command.
 
OK, remove the res in parallel with the move

Make sure the timer is only used once (that is the timer, not its contacts)

Use the XIC of the step to run the timer

Use the timer.dn to advance your step

Make sure the time pre has a value and remember this value is in milliseconds

If your still stuck after that i can do some screen shots later/tomorrow

Edit: The RES is a good solution too so i am wondering if your preset is incorrect
 
Last edited:
I got the Timer to work properly, I had to keep the RES's in parallel with the MOV instruction. What I believe my issue was is that I was using a tag that the .DN bit was toggling (via OTE) instead of the .DN bit itself. Once i changed it to the .DN bit everything worked fine.

Thanks everyone for your help!
 
In state machines, it is bad practice to have the same condition transition two sequential states. Either have intermediate states that require the timer to be timing (or not done) before transitioning, or have separate timers.

You are kind of doing this anyway with "when state is complete, do the timer reset, and then move on to the next state" but you are not explicitly calling the timer reset portion a state.
 
In parallel with each 'MOV' place a 'RES' of the timer.

Or swap the positions of rungs 0 and 1

That won't work....RES writes 0 to the .ACC, but until the TON is called again, the .DN bit is still set. The reason it's blowing through is because the DN bit is set. In addition to the RES timer, you could unlatch the .DN bit.
 
That won't work....RES writes 0 to the .ACC, but until the TON is called again, the .DN bit is still set. The reason it's blowing through is because the DN bit is set. In addition to the RES timer, you could unlatch the .DN bit.

The .DN bit is unlatched when you call the RES instruction, no need to do it separately
 
An example of problems with troubleshooting on the forum. Apparently the picture of the logic was not the same as the logic he was troubleshooting. The picture had the .DN bit of the timer in each rung but the logic he was troubleshooting had a bit which was turned on by the .DN bit earlier in the logic.

This bit, obviously, was not being reset by the timer RES instruction. He says that he fixed it by using the RES instructions and going back to using the .DN bit of the timer in each rung.

While it is good your logic is now working as you wish it is important that those trying to help all working from the same information as being used in the problem.
 

Similar Topics

So, I have a little dillemma I am trying to work through but I feel there is probably a better way. I've always liked the idea of using a VM in...
Replies
5
Views
2,055
I have a micrologix 1100 that I am trying to read three data points from it on my safety plc using studio 5000. Any tips or guidance is appreciated.
Replies
4
Views
849
Dear Sir, We have Windows 10 Dell laptop with RSlogix Studio 5000 installed in it. Now we have purchased a ex-proof laptop with Windows 10 and...
Replies
2
Views
2,620
How can I achieve the same functionality in Studio 5000? Image 001.png for the old RSLogix500 program Image 002.png for conversion to Studio...
Replies
6
Views
2,526
Hello all, I am working on a project on a CompactLogix L16ER-BB1B plc, and I was given a program that is on version 20.019, while my plc is on...
Replies
3
Views
1,847
Back
Top Bottom