Need some RLL plus help

thierry2003

Member
Join Date
Oct 2003
Posts
70
Since I am trying out the RLL plus programming I found a small problem.

Let's say that stage 1 turns a motor on clockwise.
Lets say that stage 2 turns the same motor on but counter-clockwise.
Both stages use the OUT instruction.

Now, on the end of stage 1 I do a jump to stage 2.
So stage 1 will become inactive and stage 2 will become active.
So, on the end of the scan both contactors (the one to turn clockwise and the one to turn counter-clockwise) will be on!
Since there are wired interlocks on the contactors there will be no real problem but I just don't like it.

What is the best way to solve this?

I could use a stage between 1 and 2 that, after a time, jumps to stage 2 but I am wondering what you experts think.

Thanks
 
I was working on reversible conveyors and sudden change
of direction is not good. In condition that enables FWD
direction, I added bit that REV direction output was off
by 0.5sec. or more. It work(ed) just fine. I added same thing for other output(s) of course...
 
Last edited:
I disagree with your explanation, Thierry.

Here is A-D's description of how stages work (Page 7-7):
[attachment]
When you jump to stage 2, it will not become active until the FOLLOWING scan! Therefore, at the end of the current scan (when the jump occurs), ONLY your clockwise output will be ON. The counter-clockwise output will not turn on until the NEXT scan.

Yes, this can be confusing. I guess that's why A-D says "Please Read Carefully"... :D

You should still add a delay between the CW and CCW outputs as Panic mentioned though... :nodi:

beerchug

-Eric

page7-7.jpg
 
Wait!... I take that back!

Perhaps you're right after all, Thierry... ;)

After re-reading their explanation (carefully, of course!), I noticed the order of stages in the two examples. NOW I think both outputs WILL be on as you described. Reversing the stage numbering (as shown on the right) will make it operate as I explained.

I just looked back at the one program where I used 'Stage' programming, and sure enough, my stages were in reverse order.

I abandoned using A-D's Stage Programming years ago because it wasn't portable to other brands. I have my own 'universal' stage programming method that works with all brands I use. See THIS POST of mine.

beerchug

-Eric
 
"Please read carefully" :D

I agree I should add a delay, but how?
Start a timer when both outputs are on?
And start the same timer when one of the outputs go off?
And then insert that timer-contact in the rung that sets the output?

Damned, my mind is working against me....
 
It is best to not execute two states or stages in one scan but AD RLL plus allows this. To avoid race conditions one must often take snapshots of input data before the stage rungs and the outputs must often be delayed until AFTER the last stage rung like this:

Code:
    S1                        Run Clockwise
---|  |---------------------------(   )
    S2                        Run Counter CLockwise.
---|  |---------------------------(   )

Since S1 and S2 will not be on at the same time you are assured that the two motor outputs won't both be on at the same time.

Notice also that if the Run Clockwise needs to be On during more states then one can just parallel more S contacts like this:

Code:
    S1                        Run Clockwise
---|  |---------------------------(   )
    S3    |
---|  |---+ 

    S2                        Run Counter Clockwise.
---|  |---------------------------(   )
 
Maybe it's just me, and I don't do a lot of stage programming, but I try to avoid putting the outputs directly in the stages themselves. I generally have the stage set coils as flags, and in conjunction with interlocks like Peter shows have an always active main stage that actually manipulates the I/O based on the flags. That way you can easily control what is happening.


S1 Advance Run Clockwise
---| |------| |--------------------------( )
S3 Clear |
---| |------| |-----+

S2 Run Clockwise Run Counter Clockwise.
---| |-------|/|-------------------------( )


 
he who dies with the most stages wins ...

theirry2003 said:

I agree I should add a delay, but how?

just go in between the two existing stages (example: “run clockwise direction” and “run counterclockwise direction”) and insert a NEW stage with the name “pause for belt to stop” ... in this new stage, do NOT program an output to run in either direction ... just a timer which will run for your desired delay ... wait for the timer to run out and then move on to the next stage ...

think about it this way ... program a stage named “go forward” ... then program another stage named “pause for belt to stop” ... then program another stage named “go in reverse” ... that way each and every machine action has its own individual stage ...

I’ve found that the people who don’t like stage programming usually (always?) seem to put “too much” logic in each of their stages ... this is what I meant in another thread when I mentioned the difference between “understanding” stage and “accepting and believing in it” ... programming in regular old ladder logic is sort of like driving a clutch-pedal and stick-shift car ... stage programming (when it’s done right) is like driving an automatic transmission ... sure, you CAN shift an automatic if you want to ... but WHY would you want to? ...

basic secret to stage programming success: use LOTS of stages ... one for each and every machine action ... if you find yourself naming your stages something like: “do this AND ALSO do that” then you’re probably making it harder than it needs to be ... in this example you should have TWO stages ... one named “do this” ... and the other named “do that” ...

and actually, theirry2003, you answered your own question in your very first post ...

I could use a stage between 1 and 2 that, after a time, jumps to stage 2 but I am wondering what you experts think.

well, I’m not sure that I qualify as an “expert” ... but in my opinion, theirry20003, you hit the nail right on the head ... go forth ... do great things ...
 
Well Ron, I agree with your solution but...

In automatic mode I want to pause the belt (for example) between transition from left to right.
Also from right to left.
Also when the user is in manual mode I wan't to pause the belt going from left to right and from right to left.
So where the hell do I put that stage?
Or do I put in stages for all those possibilities?

I normally use something like Tom describes but using stages I am somehow lost :confused:
 
There is nothing that says you can't call the same stage more than once. You could use on PAUSE stage and turn it on after every operation. The disadvantage is you might have to add other logic to keep track of which stage to turn on next after each pause. Or, you could have several stages, PAUSE1, PAUSE2, etc. that have identical logic and are jumped in sequence.

A couple of other tips that make stage programming simpler (you may know these, but they are easy to overlook). Stages don't have top be sequential, or written in the order of execution. For example, Stage 2 may follow Stage 10 in the program execution. Also, JMP isn't the only way to activate stages. You can cause a stage to execute by turning on a bit with SET or as a coil, turn it off with RST, and use the stage contact as an interlock as shown by Peter. Finally, all of your logic doesn't have to be in stages. You can define some interlocks or alarms or whatever ahead of the stages, and this logic will alsways be active.
 

Similar Topics

I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
331
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
158
Good day all! Can someone help me with the procedure to update Beijers E700 firmware? The Panel I am working on is firmware 2.04v and I would...
Replies
1
Views
70
Good evening. I display the step number of a SFC on a display. Sometimes, on a trip, it goes quickly through many steps and I need to prove to...
Replies
1
Views
127
Good morning all. I'm working on a rehab where they had a standalone InTouch 2014 HMI that they called a SCADA, but it's really basic stuff. The...
Replies
4
Views
181
Back
Top Bottom