User Manual

Siemens Building Technologies CM2N8887en / 26.02.01
Landis & Staefa Division 3/4
A COLBAS instruction usually begins with a keyword followed by a supplementary
element. The keyword tells which actions should be carried out; the supplementary
element gives additional information.
Example: RUN 3 (Start task 3).
RUN = Keyword. 3 = Supplementary element, here the task number.
COLBAS recognizes the following three groups of instructions:
Group Definition / examples
Statements Keyword for deferred mode (entry with line number):
Assign variables and I/O point values: LET
Output statements: PRINT, PLOT.
Entry statements: INPUT, INKEY.
Branchings: GOTO, IF .. THEN .. ELSE.
Program loops: FOR/NEXT, GOSUB/RETURN
Access to data lists: DATA, READ.
Real-time instructions: WAIT, WAIT UNTIL, WAIT FOR.
Functions Rules for calculating a new value from predefined values:
Arithmetic functions: MOD, EXP, LOG.
Trigonometric functions: SIN, COS.
Logical and Boolean functions: AND, OR, x < y
String functions: A$ + B$
Control functions (DDC): CONTROL.
Monitoring functions: IF MW > 20 THEN.
Calendar functions: DAY, DDAY, YEAR.
Operating
command
Keyword for immediate mode (entry without line number):
In addition to the BASIC commands such as COPY, DEL, DIR, END,
LIST, RUN, STOP, etc., COLBAS implements further commands:
They are used chiefly for system configuration, editing tasks and
procedures, and for access to the process variables.
COLBAS programs can be edited (created, modified, deleted) online, i.e. directly from
the BPS or from the DCS. The programs in the BPS are saved in battery-buffered RAM
memories.
A task consists of a maximum of 350 lines. Each line begins with a line number (1 ..
32767), followed by one or more COLBAS instructions. The following problem is solved
using the task given in the example below:
The measured value at I/O point $022 is acquired at intervals of 15 minutes during a
24-hour period.
The time and date of the acquisition are also saved.
TSK 33
5 REM "ACQUIRE TEMPERATURE AT $022.MW"
10 DIM M(97)
20 DIM T(97); DIM D(97)
1000 FOR J=1 TO 97
1100 M(J) := $022.MW
1200 T(J) := TIME; D(J) := DATE
1300 WAIT DURING 00:15
1400 NEXT J
2000 END
The acquired data can now be evaluated using another program.
Instructions
Instruction structure
Available instructions
Task example