25.07.2014 Views

1756-PM003H-EN-E, SFC and ST Programming Languages ...

1756-PM003H-EN-E, SFC and ST Programming Languages ...

1756-PM003H-EN-E, SFC and ST Programming Languages ...

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.

Program Structured Text 6-17<br />

The syntax for entering the selector values is:<br />

When selector is:<br />

one value<br />

multiple, distinct values<br />

a range of values<br />

distinct values plus a range<br />

of values<br />

Enter:<br />

value: statement<br />

value1, value2, valueN : <br />

Use a comma (,) to separate each value.<br />

value1...valueN : <br />

Use two periods (..) to identify the range.<br />

valuea, valueb, value1...valueN : <br />

The CASE construct is similar to a switch statement in the C or C++<br />

programming languages. However, with the CASE construct the controller<br />

executes only the statements that are associated with the first matching<br />

selector value. Execution always breaks after the statements of that selector<br />

<strong>and</strong> goes to the <strong>EN</strong>D_CASE statement.<br />

Arithmetic Status Flags:<br />

Fault Conditions:<br />

not affected<br />

none<br />

Publication <strong>1756</strong>-<strong>PM003H</strong>-<strong>EN</strong>-E (excerpt from <strong>1756</strong>-PM001H-<strong>EN</strong>-P) - August 2005

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

Saved successfully!

Ooh no, something went wrong!