RSlogix 5000 JSR Return Parameter

AidanRosen93

Member
Join Date
Dec 2018
Location
Newcastle Upon Tyne
Posts
1
Hi all,

I have a program which uses 100's of JSR instructions throughout which in theory just controls the opening and closing of valves and start/stop of pumps.
In one of the JSR instructions i have the return parameter which will have a tag name of 'open_valve_' for example and underneath will have the output for said valve. I understand that this return parameter value comes back from somewhere else within the program which when true will operate the output tag named in the return parameter of the JSR.
The problem is i can't locate where the return parameter of the JSR is reading from ... any ideas on how to just find where a return parameter of a JSR comes from ?

Thanks...
 
Aidan:

Attached you will find :
jump to subroutine
First rung of subroutine
Last rung of subroutine.

Hope this will clarify your question.

William

William, your post set alarm bells off with me.. This is almost exactly how we used to do Valve/Pump handlers before AOI's came along.

I said almost exactly, because we used to pass the Valve object as the first parameter, then the open and closed feedbacls as 2nd and 3rd just like you, but the SBR instruction mapped them directly into the Valve object's .OpenFB and .ClosedFB elements.

It all worked perfectly, until one day we tried to use RSL5K Emulate, and discovered that the parameter passing WORKED IN REVERSE ORDER !! o_O

Of course, this meant that our feedback signals were over-written by the Valve object, the LAST to be mapped in.

We had to abandon the use of Emulate, and record for the future that SoftLogix was never going to be an option either (because Emulate is a "cut-down" version of SoftLogix).

It took us ages to discover what was happening, and a complaint was made, to which I got a reply along the lines of "The developers of SoftLogix did not have a design brief to work to, so they didn't do anything wrong....".

Now that means of course, that Emulate it doesn't .....
 
Daba:
This program was the base for me to learn AOI, I did not like so many JSR.
I recalled there was a thread that discussed pros and cons of using JSR or AOI.
Now I have several AOI of my own.
Thanks for your comment.
 
It took us ages to discover what was happening, and a complaint was made, to which I got a reply along the lines of "The developers of SoftLogix did not have a design brief to work to, so they didn't do anything wrong....".


I'd have thought that even without a design brief, a developer could probably have made the first scan bit act like a first scan bit. Put an XIC S:FS in front of an add instruction that increments an integer, run it in an emulator, and watch what happens...
 
I'd have thought that even without a design brief, a developer could probably have made the first scan bit act like a first scan bit. Put an XIC S:FS in front of an add instruction that increments an integer, run it in an emulator, and watch what happens...


One would expect it to add just 1 to the integer, what does it do ?
 
It increments every scan. As always, it is displayed as false (i.e. not green) - but it acts like an always on. Took me a while to work out why everything was stuck at the initialization phase of a test program a while back.
 

Similar Topics

Hello, I please need your help why I cannot get the return parameter from the RET instruction to go into the return parameter in the JSR return...
Replies
6
Views
2,739
Hello all, I have a question in regards to RSlogix 5000. I am having issues with the program force closing when I try to make online edits. We...
Replies
0
Views
95
Greetings ... someone sent me a request for some student handsouts that I developed ... turns out that I had this hosted on my business website...
Replies
0
Views
111
Thank you for any and all responses/help. I have an RSLogix 5000 v20 and a Cognex In-Sight v5.9 spreadsheet (8502P). I can not figure out how to...
Replies
0
Views
103
Hi All, I've been pulling my hair out trying to fix this for a few days and need some advice. I have V19.01, v20.05, V21, V24, V30, V31, V32...
Replies
5
Views
356
Back
Top Bottom