CHAPTER 4 – CX-Supervisor Script Language
OMRON
Page 24
Revision 2.0
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
lift = lift - 0.2
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.
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...