Inst ToolsInst ToolsInst Tools
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Search
  • Books
  • Software
  • Projects
  • Process
  • Tools
  • Basics
  • Formula
  • Power Plant
  • Root Cause Analysis
  • Electrical Basics
  • Animation
  • Standards
  • 4-20 mA Course
  • Siemens PLC Course
Reading: PLC Math instructions
Share
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • Design
  • PLC
  • Interview
  • Control System
Search
  • Courses
  • Automation
    • PLC
    • Control System
    • Safety System
    • Communication
    • Fire & Gas System
  • Instrumentation
    • Design
    • Pressure
    • Temperature
    • Flow
    • Level
    • Vibration
    • Analyzer
    • Control Valve
    • Switch
    • Calibration
    • Erection & Commissioning
  • Interview
    • Instrumentation
    • Electrical
    • Electronics
    • Practical
  • Q&A
    • Instrumentation
    • Control System
    • Electrical
    • Electronics
    • Analog Electronics
    • Digital Electronics
    • Power Electronics
    • Microprocessor
  • Request
Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Inst Tools > Blog > PLC Tutorials > PLC Math instructions

PLC Math instructions

Last updated: March 4, 2021 4:47 pm
Editorial Staff
PLC Tutorials
No Comments
Share
3 Min Read
SHARE

The IEC 61131-3 standard specifies several dedicated ladder instructions for performing arithmetic calculations. Some of them are shown here:

PLC Math instructions

PLC Math instructions

As with the data comparison instructions, each of these math instructions must be enabled by an “energized” signal to the enable (EN) input. Input and output values are linked to each math instruction by tag name.

An example showing the use of such instructions is shown here, converting a temperature measurement in units of degrees Fahrenheit to units of degrees Celsius.

In this particular case, the program inputs a temperature measurement of 138 deg F and calculates the equivalent temperature of 58.89 deg C:

Ladder Logic Arithmetic Instructions

well as a dedicated variable (X) used to store the intermediate calculation between the subtraction and the division “boxes.”

Although not specified in the IEC 61131-3 standard, many programmable logic controllers support Ladder Diagram math instructions allowing the direct entry of arbitrary equations.

Rockwell (Allen-Bradley) Logix5000 programming, for example, has the “Compute” (CPT) function, which allows any typed expression to be computed in a single instruction as opposed to using several dedicated math instructions such as “Add,” “Subtract,” etc.

General-purpose math instructions dramatically shorten the length of a ladder program compared to the use of dedicated math instructions for any applications requiring non-trivial calculations.

For example, the same Fahrenheit-to-Celsius temperature conversion program implemented in Logix5000 programming only requires a single math instruction and no declarations of intermediate variables:

Rockwell Logix 5000 PLC program

Credits : by Tony R. Kuphaldt – Creative Commons Attribution 4.0 License

PLC Tutorials :

  • What is Programmable Logic Controller  ?
  • What is Ladder Diagram Programming ?
  • History of Programmable Logic Controllers
  • Mis-conceptions of PLC Ladder Logic
  • Contacts and coils in PLC
  • Digital Input and Output Modules
  • Analog I/O and Network I/O
  • PLC Input/Output Modules
  • Memory Mapping in PLC
  • Analog Input Scaling
  • PLC Example with Switches
  • Counter Instructions
  • Timer Instructions
  • Math instructions
  • Data Instructions
  • Ladder Logic Questions

If you liked this article, then please subscribe to our YouTube Channel for PLC and SCADA video tutorials.

You can also follow us on Facebook and Twitter to receive daily updates.

Don't Miss Our Updates
Be the first to get exclusive content straight to your email.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
You've successfully subscribed !

Continue Reading

Single Push button to ON and OFF a Bulb using Ladder Logic
Machine Tool and Coolant Control: PLC Ladder Logic Design
Types of Allen Bradley PLC
Multi-Tank Liquid Level Control System with Fill Priority [PLC]
Single Loop Controller Questions
How to Use Modbus Poll and Modbus Slave Software?
Share This Article
Facebook Whatsapp Whatsapp LinkedIn Copy Link
Share
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

128.3kFollowersLike
69.1kFollowersFollow
210kSubscribersSubscribe
38kFollowersFollow

Categories

Explore More

Concept of Interlocking in PLC
PLC Logic Functions
Door Lock with Delay PLC Exercise Problems
Data Handling Instructions in PLC Programming
What is Thin Client in SCADA? – Purpose, Advantages
Siemens S7 300 and STEP 7 PLC program using SIMATIC Software
Cybersecurity in PLC
PLC Latching Function

Keep Learning

VFD Braking

DC Injection Braking in VFD

Difference Between Microcontroller and PLC

Difference Between Microcontroller and PLC

PID Setup

PID in Studio 5000

Sticker machine with weighing PLC logic

Product Sticker Machine with Weighing PLC Program

TP Timer in CodeSys

Timers in Codesys – Timer ON, Timer OFF, Pulse Timer

Your First Steps Through STL Language

Your First Steps Through STL Language

Multiple Pumps Control using PLC

Multiple Pumps Control using PLC

Compare Servo Motor and Stepper Motor

Compare Servo Motor and Stepper Motor

Learn More

capacitor-filter-ripples

Ripple Voltage in Rectifiers

Orifice Plate Sizing

Orifice Sizing Guidelines and Thumb Rules with Flowchart

Electrical Machines Questions and Answers

Induction Machines Multiple Choice Questions

What is a Tactile Sensor? Principle, Advantages, and Applications

How to Select Right Thermocouple and Thermowell

How to Select Right Thermocouple & Thermowell ?

Linear to Square Root Extraction

Heat Recovery in HVAC System

Heat Recovery in HVAC System

Top Non-PLC Certification Courses for Automation Professionals

Top Non-PLC Certification Courses for Automation Professionals

Menu

  • About
  • Privacy Policy
  • Copyright

Quick Links

  • Learn PLC
  • Helping Hand
  • Part Time Job

YouTube Subscribe

Follow US
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?