Rslogix5000 how to troubleshoot indexing JSR

tarrant79

Member
Join Date
Jun 2020
Location
washington
Posts
23
Hi, I am dealing with a single SBR subroutine thats handed 1 input paramter UDT P.x multiple times: (Pump) P.1/2/3/4/5. I JSR into the same routine for all pumps with handing it INPUT=P.x and RET=P.x so I process the UDT P.x for each index and then update the P.x with the return parameter. The only problem is I can only see the last index into the called subroutine to troubleshoot.


Ive been getting around it by, running all JSRs, and then coming back around to do a 2nd JSR call for whatever Pump I'm trying to troubleshoot. I just figure theres got to be a better way....
Thanks


JSR Pump_xx 1 P[1] P[1]
JSR Pump_xx 1 P[2] P[2]
JSR Pump_xx 1 P[3] P[3]


JSR Pump_xx 1 P[2] P[2] =To see Pump[2] executed in the routine Pump_xx to troubleshoot.
 
Hi, I am dealing with a single SBR subroutine thats handed 1 input paramter UDT P.x multiple times: (Pump) P.1/2/3/4/5. I JSR into the same routine for all pumps with handing it INPUT=P.x and RET=P.x so I process the UDT P.x for each index and then update the P.x with the return parameter. The only problem is I can only see the last index into the called subroutine to troubleshoot.


Ive been getting around it by, running all JSRs, and then coming back around to do a 2nd JSR call for whatever Pump I'm trying to troubleshoot. I just figure theres got to be a better way....
Thanks


JSR Pump_xx 1 P[1] P[1]
JSR Pump_xx 1 P[2] P[2]
JSR Pump_xx 1 P[3] P[3]


JSR Pump_xx 1 P[2] P[2] =To see Pump[2] executed in the routine Pump_xx to troubleshoot.

In the OldenDays (*), we used to put StatusFlagBits in multi-used routines, for situations like this. Its tempting to leave such troubleshooting/de-bugging stuff out, when you develop...but at the first glitch makes it worth it.
(*) FORTRAN 4
 

Similar Topics

Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
124
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
428
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,125
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
872
The machine is running production. When trying to go online with the laptop the whole machine looses communication and faults out. Drives, HMI...
Replies
13
Views
1,943
Back
Top Bottom