hprado
Member
Hey guys. I'm new to plc programming and I'm in trouble here. I apologize in advance if this question is so dumb.
There is a file attached to ilustrate my question.
I've two JSR blocks in the first rung of the main program that leads to two different routines (let's name them as sr_01 and sr_02) in SFC. I've also added two extra rungs with a simple pair of input/output.
My doubt is about the execution cycle in this case. How is it going to happen?
In my mind the plc would proccess the diagram like this:
- Process the first rung reaching on the JSR block on top;
- Jump to sr_01 executing it to the end;
- Reach the second JSR block;
- Jump to sr_02 executing it to the end;
- Process rung number 2;
- Process rung number 3;
How much wrong am I?
I was expecting the JSR calls to block the execution of the main routine until the end of the execution of the sub routine called... But right now I'm not sure about this. Are these routines going to execute in parallel?
Thank you very much.
There is a file attached to ilustrate my question.
I've two JSR blocks in the first rung of the main program that leads to two different routines (let's name them as sr_01 and sr_02) in SFC. I've also added two extra rungs with a simple pair of input/output.
My doubt is about the execution cycle in this case. How is it going to happen?
In my mind the plc would proccess the diagram like this:
- Process the first rung reaching on the JSR block on top;
- Jump to sr_01 executing it to the end;
- Reach the second JSR block;
- Jump to sr_02 executing it to the end;
- Process rung number 2;
- Process rung number 3;
How much wrong am I?
I was expecting the JSR calls to block the execution of the main routine until the end of the execution of the sub routine called... But right now I'm not sure about this. Are these routines going to execute in parallel?
Thank you very much.