good afternoon,everyone,for the JSR INSTRUCTION

Kim Gold said:
Also keep in mind that when using JSR instructions that if you turn an output on or off it will remain in that state while subroutine is not being scanned.


Kim

and with that in mind, I would slightly change my suggestion to remove the stop and instead the stop should be in the sub routine switching off the outputs and completing the sequence
 
geniusintraining said:
Welcome to the other side of the pond Peter :D, remember we drive on the right side of the road


Don't know what they are like in the states, but here they are crazy, if they see a small gap they are straight into it after indicating for 2mSecs.
 
all right, let's discuss your idea

rung 1: first start pb,sequence running, and latch the bit,turn on the sbr-3,now, operator press the stop button, make the sequence stop,and change the position of selector swithc.
and rung 1 still energized.
now, you wanna turn on the rung2 bit,but you can not because B3:0/1 coil still energized, and B3:0/1 contact in the rung-2 will be turned off, can not trigger the B3:0/2 coil
504bloke said:
My Feeble Attempt.

To Stop the Sequence (SUB one or SUB Two from running you will need to unlatch B3:0/0 in rung 0 of MAIN.

MAIN.jpg


SUB1.jpg


SUB2.jpg
 
Put the stop button in the BRANCH on Rung 0 of Main after (or Before) System Started (B3:0/0).

This could be an Input (ie Push Button) or a B3 bit that is turned on/off from within the Subroutine/s from a Stop Input.

Like This

MAIN_1.JPG
 
Last edited:
Try this tested program. It will keep a subroutine running, even if the selector is switched, but the timers will stop each subroutine after 4 seconds. The thing is, each subroutine must have something that stops itself, or it will run forever. I used a timer, because you did not say what was in each subroutine, but if there is a stop or finish function in each subroutine, then use that instead of the timers. If you want them to run forever, then use relays in place of the timers (LIKE THE BOTTOM LADDER. THE "FINISHED" RELAYS ARE LATCHES IN EACH SUBROUTINE).


SEQUENCE_SELECTOR.jpg


SEQUENCE_SELECTOR3.jpg
 
Last edited:
you put stop there, the output will stop also, will not stop at the rest position of current cycle.



504bloke said:
Put the stop button in the BRANCH on Rung 0 of Main after (or Before) System Started (B3:0/0).

This could be an Input (ie Push Button) or a B3 bit that is turned on/off from within the Subroutine/s from a Stop Input.

Like This

MAIN_1.JPG
 
automation.robotics said:
you put stop there, the output will stop also, will not stop at the rest position of current cycle.

Yes putting a stop there will stop the output which will stop either Subroutine.

I am not sure what you mean?

Perhaps you could be a little more clear in what you want exactly ?
 
GIT, Yes, I tried to build on the previous ideas, then I forgot to put in the interlock to prevent both from running at same time....Put me in jail too!

SEQUENCE_SELECTOR2.jpg
 
Last edited:
How about this one...

When I use a method like the OP describes, there is usually at least one more subroutine to update the I/O when there is a transition between modes:

JSR_FlipFlop_000.JPG
 
Automation,

You have a few errors in your posted program. Rungs 000 and 003 are identical. One of them should be deleted. Also on Rung 001, I think the "STEP 1" XIO should be an XIC, assuming that B3:0/0 is "STEP 1". I am not sure if it is or not, because B3:0/0 has no label.

If instead, the "STEP 1" OTE output is in a subroutine, when the subroutine is not active, then "STEP 1 cannot be changed.
 
Last edited:

Similar Topics

Has anyone had experience or tried to run a 1200 siemens plc through tia portal v14, using the SCADA or pc system or pc station to control it from...
Replies
5
Views
2,223
I have a job that I'm working on that needs to have some RFID implemented. I have some experience with RFID from past work, but not quite in this...
Replies
1
Views
1,128
Why does everyone hate Connected Components Workbench? Are there legitimate reasons or is it just because most controls engineers are Luddites...
Replies
28
Views
16,296
So I'm on here a lot and I see a lot of people from all sorts of industries on here posting and from my experience in the field, I've seen PLC...
Replies
37
Views
9,508
I don't get around the forum as much these days, but just wanted to take a moment and wish you all a Happy Thanksgiving. I am at work, thousands...
Replies
0
Views
2,554
Back
Top Bottom