Wednesday 13 December 2017

PLC Programming how to write excellent programs

PLC programming JMP and LBL code

Sometimes in plc programming you want to change how the plc scanner behaves. You may want to allow it to move to different goto points of the ladder diagram. For this we make use of JMP and LBL. LBL allows us to name a certain rung on the left and hand side and JMP allows us to specify a label which we want to jump to. This is very similar to how it works in assembly language. It is important to note that any rung which has a label and does not contain some type of jmp instruction somewhere may never be executed. So these rungs usually will be completely ignored. It’s always good practice to try and avoid this scenario as jmp and lbl can make your ladder program really messy and hard to debug if things are jumping around all the time.

Below is an example of how JMP and lBL works.

Eg: of JMP and LBL

img_58b022f55c0aa.png

plc programming jmp and lbl

Word of caution when using JMP and LBL functions

Remember that having this sort of command can make it nice and easy to change the jumps. However the complexity can quickly outweigh the benefits when using this instruction too much in your plc programs. Try and keep jmp and lbl to a bare minimum when implementing in your programs. It will just simplify things and avoid lots and lots frustration which you may encounter later on. It is better to manage your programs in a structured way where it is easy to view and easy to grasp for any future projects which you may encounter. However jmp and lbl can be quite easily utilized in smaller programs, but word of caution to the less wise.

Citations :


plc programming
plc supplier
industrial automation

No comments:

Post a Comment