Jump function (ST)

raticait

Member
Join Date
Jul 2011
Location
on
Posts
4
(Okay, so I know to a lot of you I'm going to sound really stupid for asking this but here goes...)

I want to write a structured text program that uses the jump and lbl functions, but every time i try i get this error almost immediatley when i download the program:

"Error in communication
An error occurred while online:
Time-out error for receive data
Do you want to go offline?
Yes/No"

the functions look like this
JP(?Num_ANY16?);
LBL(?Num_ANY16?);
and i've tried changing up my syntax in case i was doing that wrong, but apparently i just don't have any idea how to use these two in text (or at all). what i want to do is something like this...

if A=B then
<jump to X>

else if A > B then
do something

else if A < B then
<receive jump>
do something else

end if

...(let's assume for the moment that it makes sense for me to have a seperate place for A=B and A<B) is this completely impossible? is there another function i should be using? please help.
 
JMP LBL instructions are not available in ST. You need to structure your program accordingly.



If A=B then
Do This Thing;
Do this Other Thing;
Else_if A<B then
Do That thing;
Do that other thing;
Else
Do some thing;
Do some other thing;
End_IF;

 
goto supported by Siemens SCL:

Code:
FUNCTION FC1 : Void

VAR_TEMP
    // Temporary Variables

END_VAR
LABEL
    End, SomeWhere, SomeWhereElse;
END_LABEL
    
IF I0.0 THEN GOTO SomeWhere;
ELSE GOTO SomeWhereElse;
END_IF;
GOTO End;

SomeWhere:
GOTO End;

SomeWhereElse:         
GOTO End;

End:
;
END_FUNCTION
 
Alaric i think you're right... they are only for the ladder logic... iiiiiiim an idiot. >.<
thanks for your suggestion though i got it working using just else =)
totally forgot you could do that... *facepalm*
 

Similar Topics

Is it true that we can not perform a jump to other rung in concept??
Replies
0
Views
12
Hi all! I have a client requesting quotation for us to install a jump box for remote updating of 3 Siemens S7-300 PLC's using Simatic Manager...
Replies
10
Views
2,546
Good Evening , I have a Powerflex drive that has been running steady at about 39 Hz for years , but is beginning to swing 39.6 Hz , 40.5...
Replies
7
Views
2,832
New to rslogix 5000 and factorytalk view me. Where do I find the Jump to Display #?
Replies
7
Views
1,877
I am accustomed to segregating my program in subroutines in RSLogix 500 and 5000 using the JSR instruction. I assumed the JUMP instruction was...
Replies
15
Views
6,854
Back
Top Bottom