User Manual

CM2U8567E / 04.1999 VISONIK DCS Functions and System Messages VVS18 Siemens Building Technologies
2-28 Function CB Landis & Staefa Division
Every line in a COLBAS Task begins with a line number followed by one or more
statements:
TSK11 : 300 C=A+B; PRINT C
--- ----- -------
| | |
| | +---> 2nd statement
| +-----------> 1st statement
+----------------> Line number
Line numbers must lie in the range 1..32767.
After terminating a line entry with <CR> an analysis of the syntax begins. A line
containing errors must be re-entered. Syntax error-free COLBAS statements are
deposited in the relative Task according to line numbers in ascending order.
Such program lines are executed only after the Task is started with RUN or RESTART
instructions. This manner of Task execution is known as DEFERRED MODE.
If line numbers are omitted certain statements can be executed immediately. They are
not written into a Task. This is known as IMMEDIATE MODE operation since the
statements are executed "immediately".
Monitor Task TSK0 can only operate in Immediate Mode.
2.6.4.1 COLBAS Terminology and Rules
Notation Explanation
Statement
Instruction for COLBAS to execute a certain action. e.g.:
RUN, PRINT, GOTO, etc.
Function
Predefined sub-program where the function's name indicates the
result of a calculated operation on input values e.g.: SIN(x),
MOD(x,y), EXP(x), etc
Constant
Element comprising a name and a constant value Constants
cannot be altered. e.g.: A "read-only" point parameter.
Variable
Element comprising a name and a variable value. The name
can have a maximum of two characters (letters/numbers) but
M U S T begin with a letter. e.g.: A, B1, XY, T5, C, etc
Note
There are COLBAS key words which must not be used as
variables, e.g. TO, days MO, TU, WE, TH, FR, SA, SU and PI
(=3,14159).1
Task
Variable
Variables with reserved names related to TSK, e.g. TSKTAB,
TSKTTY, etc.
System
Variables with reserved names related to the system, Variable
e.g. SYSSYS, SYSTTY, etc.
Operator
Arithmetic and mathematical comparison signs. e.g.: +, -, /, *,
<>, <, = and AND, OR, etc.
Expression
Arithmetic or Boolean expression. e.g.: A<B, (5/2)+(7*2),
A*LOG(3.57), etc.
Term
Part of an Expression. May consist of numerical quantities,
Variables and/or addresses with parameters. e.g.: A, 34.5,
@$1'000.FCON, 17:00 etc.
Numerical
Values in various formats. e.g.: 3.34, 7:45, 3-DEC-80, -23E+2
etc.