Steem Train Article #2 [Intro To Ladder Logic (continued)]

in steemtrain •  7 years ago 

SteemTrain.jpg

Steem Train Article #2 Intro To Ladder Logic (continued)


Welcome back fellow Steemians. This is article #2 of the Steem Train. In this continuation article of Intro To Ladder Logic, we will be discussing some more basic commands to control your logic flow. These commands include the GEQ, GRT, EQU, NEQ, LES, and LEQ instructions.

Although you can always break a process down to the yes / no, true / false, on / off, it is sometimes necessary to know a value, and to use that value to control your power flow. How many times did the yes / no, true / false, on / off happen? This would be a very common question in the control of a machine. For this we can use integers and floats. As this article is about the core language of Ladder Logic, and not setting up the PLC, I will not be going into extensive detail on how to set up your variables as this will differ from manufacturer to manufacturer. For the scope of this article just know they exist, as do many other variable types. What to know is that the language is the common factor between manufacturers.

Using float and integer values, we can implement compare instructions to control the power flow through our logic. Using variable or static values to compare our data to, the instruction can determine if the out-come would be a true statement. If the statement reads true, the power will flow through the instruction. In the image below you can see how the instructions would look when assembled within a routine in RSLogix 500.

ladderlogic002.PNG

Each instruction needs 2 values to execute without error, 1 variable value and 1 variable/static value. No matter which combination you use, the first value must be a variable value. A breakdown of each instruction follows.

-[ EQU ]-
Equal To Instruction
If the first value is equal to the second value, this statement will read true.

-[ NEQ ]-
Not Equal To Instruction
If the first value is not equal to the second value, this statement will read true.

-[ GRT ]-
Greater Than Instruction
If the first value is greater than the second value, this statement will read true.

-[ GEQ ]-
Greater Than Or Equal To
If the first value is greater than or equal to the second value, this statement will read true.

-[ LES ]-
Less Than
If the first value is less than the second value, this statement will read true.

-[ LEQ ]-
Less Than Or Equal To
If the first value is less than or equal to the second value, this statement will read true.

Remember, a Ladder instruction is like a gate holding power back when the instruction is false, and when true, the power is free to pass.

In the next Steem Train article I will be discussing the timer instructions, -[ TON ]- / -[ TOF ]- / -[ RTO ]-, and counter instructions, -[ CTU ]- / -[ CTD ]-. I will also disscuss the reset instruction -( RES )-, which works on both the timer and counter instructions.

Until next time, keep it on the rails!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This is all pretty foreign to me but very interesting nonetheless. Nice article.

I'm glad someone is out there reading it!

Takes a little while to get going on Steem but if you have good content and are consistent the readers will come.

Congratulations @jamescash! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!