02.09.2014 Views

ISPSoft User Manual

ISPSoft User Manual

ISPSoft User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

11.2.2 Conditional Structure─IF<br />

• Format<br />

• Description<br />

If the value of Boolean expression 1 is TRUE, Sub-statement 1 will be executed. If the value of<br />

Boolean expression 1 is FALSE, Boolean expression 2 will be evaluated. If the values of all the<br />

Boolean expressions are FALSE, Other sub-statement will be executed.<br />

• Rules and limits<br />

‣ A Boolean expression can be a device, a symbol, or an arithmetic expression. It can not be a<br />

constant.<br />

‣ A sub-statement can be a legal statement, or an IF statement.<br />

‣ There is no limit on the number of sub-statements following THEN or ELSE.<br />

‣ The ELSIF sections and the ELSE section can be omitted. If the ELSE section is omitted, and<br />

the values of all the Boolean expressions are FALSE, no sub-statement will be executed.<br />

‣ <strong>User</strong>s can add ELSIF sections to a conditional structure at will. There is only one ELSE section<br />

in a conditional structure. The ELSE section in a conditional structure is at the last section of<br />

the conditional structure.<br />

• Example<br />

Example 1: If M0 is ON, M1 will be set to ON, and M2 will be set to OFF. If M0 is not ON, the step<br />

will end. No matter what the value of M0 is, the value of M0 will be assigned to M0.<br />

Example 2: If the value of DT is larger than 5, OUT_0 will be set to ON, and OUT_1 will be reset<br />

to OFF. If the value of DT is not larger than 5, the value of OUT_2 will be assigned to<br />

OUT_0 and OUT_1.<br />

11-10

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

Saved successfully!

Ooh no, something went wrong!