omron — CASE program instruction

CASE program instruction CASE program instruction Syntax CASE value OF Function Initiate processing of a CASE structure by defining the value of interest. Usage Considerations This instruction must be part of a complete CASE structure. Parameter value Real value, variable, or expression that defines the value to be matched in the CASE structure to determine which instructions are executed. Details This is perhaps the most powerful structure available with eV+. It provides a means for executing one group of instructions from among any number of groups. The complete syntax is as follows (the blank lines are not required): CASE value OF VALUE value_1,...: group_of_steps VALUE value_2,...:

group_of_steps . . . ANY group_of_steps END The three vertical dots indicate that any number of VALUE steps can be used to set off additional groups of instructions. The ANY step and the group of steps following it are optional. There can be only one ANY step in a CASE structure, and it must mark the last group in the structure (as shown above). Note that the ANY and END steps must be on lines by themselves as shown. (However, as with all instructions, those lines can have comments.) The CASE structure is processed as follows: The expression following the CASE keyword is evaluated. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 118