EasyManua.ls Logo

Emerson DSM314 - Relational Operators

Emerson DSM314
519 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
User Manual Chapter 11
GFK-1742F Jan 2020
Local Logic Tutorial 278
P005: = Torque_Limit_1 * P004;
11.4.2 Relational Operators
Relational operators compare two operands in a conditional statement. The < (less than), >
(greater than), <= (less than or equal), >= (greater than or equal), = (equal), and <> (not
equal) operators are valid relational operators. The IF statement body execution takes place
when the conditional expression is a true. In the example, the variable Torque_Limit_1 is set
to 10000 if the variable Block_1 equals 3. If the Block_1 value is not equal to 3 then the
expression evaluates to false and program execution continues after the END_IF program
statement.
Example:
IF Block_1 = 3 THEN
Torque_Limit_1 := 10000; (* Set Torque Limit = 100% @ Block 3 *)
END_IF;
Complex relations may be solved by nesting IF statements. For example, to set Axis 1 torque
limit (Torque_Limit_1) to 10000=100% (i.e. same scaling as in AQ command processing)
when the motion program block 3 is active and axis 1 commanded velocity
(Commanded_Velocity_1) is less than 1000, the following construct is valid:
IF Block_1 = 3 THEN
IF Commanded_Velocity_1 < 1000 THEN
Torque_Limit_1 := 10000; (* Set Torque Limit = 100% @ Block 3 *)
END_IF;
END_IF;

Table of Contents

Related product manuals