Multiple Commands - Omron CX-SUPERVISOR - SCRIPT REFERENCE REV2.0 Reference Manual

Script language
Table of Contents

Advertisement

CHAPTER 4 – CX-Supervisor Script Language
Syntax
{Some "string" text}
Typical Example
Message({Error: "Invalid Function" occurred})
The '{' and '}' braces inserted around the whole strings allows the actual text in the string to contain
quotes which will be displayed normally. They can be used in any situation where quotes can be used
whether or not embedded quotes are required. However, for clarity the quote characters should be
used by preference.
Indentation
Typical Examples
IF burner AND fuel > 0 AND rate > 0 THEN
lift = lift + rate/5
ELSE
IF altitude > 140 THEN
lift = lift - 0.2
ENDIF
ENDIF
IF burner AND fuel > 0 AND rate > 0 THEN
lift = lift + rate/5
ELSE
IF altitude > 140 THEN
ENDIF
ENDIF
Both examples provide identical functionality, but the use of indentation, either spaces or tabs to
show the construction of the statements aids readability.
The use of the ELSEIF statement in this example was omitted for clarity.

Multiple Commands

Typical Examples
count = 75
result = log(count)
count = 75 : result = log(count)
Both examples provide identical functionality, but the use of the colon between statements allows
both to reside on the same line.
Page 24
lift = lift - 0.2
OMRON
Revision 2.0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents