Inst ToolsInst ToolsInst Tools
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
      • Instrumentation
      • Electronics
      • Electrical
      • Practical Questions
    • MCQ
      • Instrumentation MCQ
      • Electrical MCQ
      • Electronics MCQ
      • Control Systems MCQ
      • Analog Electronics MCQ
      • Digital Electronics MCQ
      • Power Electronics MCQ
      • Microprocessor MCQ
      • Multiple Choice Questions
  • EE
    • Electronics
      • Electronics Q & A
      • Electronic Basics
      • Electronic Devices & Circuits
      • Electronics Animation
      • Digital Electronics
    • Electrical
      • Electrical Basics
      • Electrical Q & A
      • Power Electronics
      • Electrical Machines
      • Electrical Animation
      • Power Systems
      • Switchgear & Protection
      • Transmission & Distribution
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
Search
All rights reserved. Reproduction in whole or in part without written permission is prohibited.
Reading: PLC Math instructions
Share
Notification Show More
Font ResizerAa
Inst ToolsInst Tools
Font ResizerAa
  • Courses
  • PLC Tutorials
  • Control Systems
Search
  • Ask
  • Courses
  • Videos
  • Q & A
    • Interview
    • MCQ
  • EE
    • Electronics
    • Electrical
  • Measure
    • Control Valves
    • Calibration
    • Temperature
    • Pressure
    • Flow
    • Level
    • Analyzers
    • Switches
    • Vibration
    • Solenoid Valve
  • Control
    • PLC Tutorials
    • Control Systems
    • Safety Instrumented System (SIS)
    • Communication
    • Fire & Gas System
  • More
    • Design
    • Tools
    • Animation
    • Basics
    • Formulas
    • Standards
    • TextBooks
    • Common
    • Software
    • Excel Tools
    • Erection & Commissioning
    • Process Fundamentals
    • Videos
    • Books
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:

Contents
PLC Math instructionsPLC Tutorials :

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 !
SCADA System Vulnerabilities
PLC Programming Example for Motor Forward and Reverse Control
PLC Program for Ceramic Burning Oven Conveyor System
Instrumentation and Control Project Packages – Detail Engineering
Start Stop of one Motor from the same Push button PLC program
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
208kSubscribersSubscribe
38kFollowersFollow

Categories

Recent Comments

  • Kamli on Top Free PLC Software
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • Guifty Shimica on Top Non-PLC Certification Courses for Automation Professionals
  • MIHARITSOA Aina Sitraka on Top Non-PLC Certification Courses for Automation Professionals

Related Articles

Alarm and Trip Documentation

PLC Alarm and Trip Documentation

Readings Mismatch between Field & Control Room

Readings Mismatch between Field & Control Room ? Why

Upgrading and Migration of PLC Systems

Upgrading and Migration of PLC Systems

Count the Number of Bottles

Count the Number of Bottles in Packaging Carton PLC Logic

different PLC brands of Distributed IO

What is Distributed IO? – Decentralized Peripherals in PLC

Allen Bradley Powerflex VFD

Allen Bradley Powerflex VFD

Masked Move Instructions

How to use Masked Move Instruction in PLC

Industrial Control Systems Security

Comparing ICS and IT Systems Security

More Articles

Pressure Gauges with Zero Adjustment

Pressure Gauges Zero Adjustment

Interview Questions and Answers on Load Cell

Electrical Networks Objective Questions

Electrical Networks Objective Questions

Two Wire Transmitter Working Principle

Basics of Two, Three & Four Wire Transmitters

Light ON OFF Control using PLC

Light ON OFF Control using PLC

Absorber in absorption chiller

What is an Absorption Chiller? – Working Principle

Power Systems Questions & Answers

Power Systems MCQ Series 20

Top 100 Microcontrollers Project Ideas

Top 100 Microcontrollers Project Ideas

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?