LBL Instruction

jrbrod1

Member
Join Date
Jul 2004
Posts
1
In the MicroLogic instruction files under the LBL instruction: Why is it labeled Q and where in the Data Tree can I find these? Can you explain how to read the following: Q2:60
 
Labels

The LBL instruction is used in conjunction with one or more JMP instuctions.

The LBL "address" is just a marker for the program to jump to, not unlike a line label in VB (" : myLabel") used with Goto statement (" Goto myLabel")

The tag Q2:60 breaks down as follows:
Q means that this is a label
2 means that the label is in LAD2 - you are not allowed to jump out of the subroutine.
60 is a unique identifier for the label within the LAD 2 file. Presumably there are 59 other labels, but not necessarily (I certainly would hope not!).

HTH
 
Clarification

Received via PM

jrbrod1 wrote on Yesterday 05:56 PM:

Hello Allen, could you assist me with so clarification on the LBL Instruction... such as how to read Q2:60 and where in the data files do I find this?

You won't find it in the data tables. It's not data.

It is only a marker the the PLC uses to figure out where to go to when there is a corresponding JMP instruction. If there is no JMP, then LBL is not doing anything useful, except, perhaps, as annotation.

This could be an interesting use for the instruction. There are times I've wanted to have "Branch Comments", not just "Rung Comments". I hadn't considered using the LBL instruction for that purpose (as opposed to using a "dummy" bit.

You should be able to perform a search for all instances of Q2:60 with a regular Ctrl-F. If that only finds the LBL, then the instruction is doing nothing useful (logically).
 

Similar Topics

We're working on a firmware upgrade on a couple of 1756-L55 processors. The processors are currently running v12.x firmware but since we've...
Replies
2
Views
4,684
HI please open up the PDF file and my question is why LBL instruction is without JMP Many Regards PERSI
Replies
4
Views
1,931
I understand that when the [JMP] instruction is true, it jumps/skips to the [LBL] instruction. I don't understand how the [LBL] is handeled when...
Replies
8
Views
14,917
Hello again, Happy New Year. If the bit controlling this subroutine switches off, causing the JMP and LBL instructions to take effect, will the...
Replies
3
Views
328
Hi everyone, I have a series of 8 or 9 subroutines that are not in the main program file (File 2)..they are all consecutively placed in Ladder 11...
Replies
8
Views
411
Back
Top Bottom