0% found this document useful (0 votes)
112 views4 pages

PLC Math Instructions

This document discusses PLC math instructions. It describes common arithmetic instructions like add, subtract, multiply and divide. An example is given to convert temperature from Fahrenheit to Celsius using individual instructions. The document also mentions that some PLCs support computation functions to directly enter equations in one instruction instead of multiple arithmetic instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views4 pages

PLC Math Instructions

This document discusses PLC math instructions. It describes common arithmetic instructions like add, subtract, multiply and divide. An example is given to convert temperature from Fahrenheit to Celsius using individual instructions. The document also mentions that some PLCs support computation functions to directly enter equations in one instruction instead of multiple arithmetic instructions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Instrumentation Tools

Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com

Author: Instrumentation Tools

Categories: PLC Tutorials

PLC Math instructions

om
s .c
ol
To
i on
at
nt
me
ru
st
In

PLC Math instructions

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

InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com

om
s .c
ol
To
i on
at
nt

As with the data comparison instructions, each of these math instructions must be enabled by
me

an “energized” signal to the enable (EN) input. Input and output values are linked to each math
instruction by tag name.
ru
st

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,
In

the program inputs a temperature measurement of 138 deg F and calculates the equivalent
temperature of 58.89 deg C:

InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com

om
s .c
ol
To
i on
at
nt
me
ru
st
In

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:

InstrumentationTools.com
Instrumentation Tools
Learn Instrumentation and Control Engineering. Inst Tools covers topics of Industrial
Instrumentation, PLC, DCS, SCADA, Field Instruments, Analyzers and so on.
https://instrumentationtools.com

om
s .c
ol
To
i on
at
nt

Also Read : PLC Data Comparison Instructions


me
ru

Credits : by Tony R. Kuphaldt – under the terms and conditions of the Creative Commons
Attribution 4.0 License
st
In

InstrumentationTools.com
Powered by TCPDF (www.tcpdf.org)

You might also like