02.09.2014 Views

ISPSoft User Manual

ISPSoft User Manual

ISPSoft User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ISPSoft</strong> <strong>User</strong> <strong>Manual</strong><br />

• D2 := D0 + D1; (Statement)<br />

This is a statement rather than an expression. The value of the arithmetic expression D0+D1 is<br />

calculated, and the result of the operation is stored in D2. This statement is composed of the<br />

expression D2 and the expression D0+D1.<br />

Please refer to the following example. The program is mainly composed of two IF statements. When<br />

the first IF statement is executed, the system evaluates the expression M0. If M0 is ON, the value of<br />

the arithmetic expression D21+D22 will be calculated, and the result of the operation will be stored<br />

in D20. When the second IF statement is executed, the system judges whether the value of the<br />

arithmetic expression D0* (D1+D2) is equal to the value stored in D20. If the value of the arithmetic<br />

expression D0* (D1+D2) is equal to the value stored in D20, the Boolean value is TRUE, and the<br />

value of M1 is TRUE. If the value of the arithmetic expression D0* (D1+D2) is not equal to the value<br />

stored in D20, the value of M1 is FALSE.<br />

11.1.4 Operand and Operator<br />

Operands and operators are basic elements of an expression. An operand is the object of an<br />

operation, and an operator is a symbol or function representing an operation. For example, in the<br />

expression D0 + D1, D0 and D1 are operands, and + is an operator.<br />

An expression can be composed of operands and operators. It can also be composed of a single<br />

operand. The operands in an expression can be devices, symbols, or constants.<br />

Rules of precedence affect which values form operands for which operators. If the operators in an<br />

expression share the same precedence, the order of the operation is carried out from left to right.<br />

The operands which can be used in a structured text in <strong>ISPSoft</strong> are listed below.<br />

11-4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!