dskplc
Member
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 parameter using structured text. It worked in Ladder Logic but am new to structured text and something is missing in my code to cause it not to return to the JSR. Thanks in advance for any advice for where I am going wrong and how to fix this.
Here is my code for structured text in RSLogix 5000:
----------------------------------------------
In JSR Routine going to RET Routine:
// JSR -> RET: 1 Return Parameter on Both (INT)
JSR(ST_RET_1,1,ST_RET_1_In_Param_1);
RET Routine from JSR Routine:
// RET with 1 parameter
ST_RET_1_Src := 10;
ST_RET_1_Return_Param_a := ST_RET_1_Src; // MOV Value in Source to Destination
RET(ST_RET_1_Return_Param_a);
----------------------------------------------
I need ST_RET_1_Return_Param_1 = ST_RET_1_Return_Param_a.
Thank you.
Here is my code for structured text in RSLogix 5000:
----------------------------------------------
In JSR Routine going to RET Routine:
// JSR -> RET: 1 Return Parameter on Both (INT)
JSR(ST_RET_1,1,ST_RET_1_In_Param_1);
RET Routine from JSR Routine:
// RET with 1 parameter
ST_RET_1_Src := 10;
ST_RET_1_Return_Param_a := ST_RET_1_Src; // MOV Value in Source to Destination
RET(ST_RET_1_Return_Param_a);
----------------------------------------------
I need ST_RET_1_Return_Param_1 = ST_RET_1_Return_Param_a.
Thank you.