Rockwell Automation / Allen-Bradley ControlLogix / CompactLogix (Logix 5000) fault T04:C31: Program fault: JSR/RET parameter count mismatch
The parameters of a JSR instruction do not match those of the associated SBR or RET instruction: fewer parameters were passed than expected. Rockwell’s corrective action is to pass the appropriate number of parameters, and notes that passing too many is ignored without an error.
Diagnose this with AI
Try Free PLC Fault Diagnostic Upload a keypad photo, the fault history or a parameter export from your Rockwell Automation / Allen-Bradley ControlLogix / CompactLogix (Logix 5000). InduQT compares the evidence and suggests the next useful checks.
When it happens
- When the JSR or RET executes in Run
Likely causes and checks
1Subroutine changed (SBR/RET parameters added) without updating every JSR
- Points to it
- Fault started after an edit to the subroutine; several callers exist.
- Check
- Cross-reference every JSR to that routine and compare parameter counts with its SBR and RET.
2JSR edited online with a parameter missing
- Points to it
- Fault right after an online edit of the calling rung.
- Check
- Compare the calling rung with the last known good program export.
Telling it apart
- Only too few parameters fault; extra parameters are silently ignored, so a mismatch can exist on some calls without faulting.
- Index or array faults inside the subroutine show as T04:C20, not C31.
Evidence to collect
- Major Faults tab screenshot
- Program export showing the JSR, SBR and RET instructions
- Online edit history or the last good program version
Work on fuel trains, burners, pressure vessels and electrical equipment must be done by qualified personnel following the manufacturer’s documentation and local codes. Never bypass a safety device or interlock.
Related
- Rockwell Automation / Allen-Bradley ControlLogix / CompactLogix (Logix 5000) T04:C16: Program fault: unknown instruction encountered
- Rockwell Automation / Allen-Bradley ControlLogix / CompactLogix (Logix 5000) T04:C20: Program fault: array subscript too large, or CONTROL POS/LEN invalid
- All Rockwell Automation / Allen-Bradley ControlLogix / CompactLogix (Logix 5000) fault codes