Help - Search - Members - Calendar
Full Version: information needed
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
xave
Hi,

I am a beginner with AB, I have a little application to programme using RSlogix 500 with a PLC 1200.

My question is lad 2 being the main programme is it possible (and how) to set another LAD (e.g LAD 3) and when that task is finished LAD 3 is reset or not active then in LAD 2 I can set another LAD ....
I would like to set LAD 3, when LAD 3 is off then I set LAD 4 etc... via LAD 2

I tried with JSR and SBR + return but my subroutine is always active and I would like to have it off when finished.

(This is something I can do uising Festo FST4)

Thanks for your help
Mickey
QUOTE(xave @ Sep 15 2008, 12:58 PM) [snapback]73651[/snapback]
Hi,

I am a beginner with AB, I have a little application to programme using RSlogix 500 with a PLC 1200.

My question is lad 2 being the main programme is it possible (and how) to set another LAD (e.g LAD 3) and when that task is finished LAD 3 is reset or not active then in LAD 2 I can set another LAD ....
I would like to set LAD 3, when LAD 3 is off then I set LAD 4 etc... via LAD 2

I tried with JSR and SBR + return but my subroutine is always active and I would like to have it off when finished.

(This is something I can do uising Festo FST4)

Thanks for your help


To control the subroutine just condition the rung with the JSR instruction. See picture below.
The subroutine will run whenever the rung is true, will not run when false. You ( the programmer) control when the rung is true and for how long it stays true.
BTW there is no need for the SBR or return instruction unless you are passing parameters to the subroutine.
xave
QUOTE(Mickey @ Sep 15 2008, 01:39 PM) [snapback]73652[/snapback]

QUOTE(xave @ Sep 15 2008, 12:58 PM) [snapback]73651[/snapback]
Hi,

I am a beginner with AB, I have a little application to programme using RSlogix 500 with a PLC 1200.

My question is lad 2 being the main programme is it possible (and how) to set another LAD (e.g LAD 3) and when that task is finished LAD 3 is reset or not active then in LAD 2 I can set another LAD ....
I would like to set LAD 3, when LAD 3 is off then I set LAD 4 etc... via LAD 2

I tried with JSR and SBR + return but my subroutine is always active and I would like to have it off when finished.

(This is something I can do uising Festo FST4)

Thanks for your help


To control the subroutine just condition the rung with the JSR instruction. See picture below.
The subroutine will run whenever the rung is true, will not run when false. You ( the programmer) control when the rung is true and for how long it stays true.
BTW there is no need for the SBR or return instruction unless you are passing parameters to the subroutine.



Thank you very much for your help.
Mickey
QUOTE(xave @ Sep 17 2008, 01:38 PM) [snapback]73724[/snapback]
QUOTE(Mickey @ Sep 15 2008, 01:39 PM) [snapback]73652[/snapback]

QUOTE(xave @ Sep 15 2008, 12:58 PM) [snapback]73651[/snapback]
Hi,

I am a beginner with AB, I have a little application to programme using RSlogix 500 with a PLC 1200.

My question is lad 2 being the main programme is it possible (and how) to set another LAD (e.g LAD 3) and when that task is finished LAD 3 is reset or not active then in LAD 2 I can set another LAD ....
I would like to set LAD 3, when LAD 3 is off then I set LAD 4 etc... via LAD 2

I tried with JSR and SBR + return but my subroutine is always active and I would like to have it off when finished.

(This is something I can do uising Festo FST4)

Thanks for your help


To control the subroutine just condition the rung with the JSR instruction. See picture below.
The subroutine will run whenever the rung is true, will not run when false. You ( the programmer) control when the rung is true and for how long it stays true.
BTW there is no need for the SBR or return instruction unless you are passing parameters to the subroutine.



Thank you very much for your help.


Your Welcome
BobLfoot
Word of warning - the instructions ONS, OSR, OSF, FFL, FFU, LFL and LFU can behave erratically when used in conditional subroutines unless special attention to their coding is applied.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.