Math Functions; Calculate (Calculate) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

7.5

Math functions

7.5.1

CALCULATE (Calculate) instruction

Table 7- 36
CALCULATE instruction
LAD / FBD
Table 7- 37
Data types for the parameters
Parameter
Data type
IN1, IN2, ..INn
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord
OUT
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Byte, Word, DWord
The IN and OUT parameters must be the same data type (with implicit conversions of the input parameters). For
1
example: A SINT value for an input would be converted to an INT or a REAL value if OUT is an INT or REAL
Click the calculator icon to open the dialog and define your math function. You enter your
equation as inputs (such as IN1 and IN2) and operations. When you click "OK" to save the
function, the dialog automatically creates the inputs for the CALCULATE instruction.
An example and a list of possible math operations you can include is shown at the bottom of
the editor.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
SCL
Description
Use the
The CALCULATE instruction lets you create a math function that
standard SCL
operates on inputs (IN1, IN2, .. INn) and produces the result at OUT,
math
according to the equation that you define.
expressions to
Select a data type first. All inputs and the output must be the same
create the
data type.
equation.
To add another input, click the icon at the last input.
1
Basic instructions
7.5 Math functions
229

Advertisement

Table of Contents
loading

Table of Contents