User Manual

CM2U8567E / 04.1999 VISONIK DCS Functions and System Messages VVS18 Siemens Building Technologies
2-36 Function CB Landis & Staefa Division
2.6.6 COLBAS Access to Statistics
Each statistics message is made up of various elements. A part of these elements is
always present in every message (e.g. actual time or point address) the rest depends
mainly on the point or message type.
A COLBAS Task can access the Statistics Register through pre-defined variable, STA.
This variable has some specific attributes. The attributes which are available to read
various message elements from Statistics Register, are:
ADR Point address
DATE Statistic message date
TIME Statistic message time
HW Main value
PTYP Point type corresponds to parameter TYP
MTYP Message type. Here, the following definitions apply
0: Normal Point message
1: Parameter change message
2: Statistic Slave message (see "Reactions")
3: Maximum Demand program message
CAUS Reason, if STA.MTYP=1
PAR Parameter, if STA.MTYP=1
PERS Peripheral state, if STA.MTYP<>1
(corresponds to parameter WCON)
PNTS Point status, if STA.MTYP<>1
(corresponds to parameter FCON)
V1 New value, if STA.MTYP=1
V2 Old value, if STA.MTYP=1 or Auxiliary value, if STA.MTYP=0 and value
exists (e.g. limit value in measurement message)
Message elements which cannot be read using parameters (e.g. point text TXI) must be
read from the process image.
100 AD:=STA.ADR ;-- Read Point address
110 PRINT @AD.TXI ;-- Print parameter TXI
The Statistics Register is a circular buffer and is arranged according to message date. If
a specific message is to be read from the buffer then the required date range for
variable STA must be set by a FOR/NEXT loop.
In programming variable STA the following must be observed:
Special variable STA M U S T be programmed as a control variable in a FOR/NEXT
loop as illustrated in the example below.
The start and end values for variable STA in the FOR/NEXT loop are interpreted as
"Date" when executed. (Refer to COLBAS Function "DATE" for date format).
Example for programming with Variable STA
1 -- Connection STA <==> COLBAS 07-11-88/Landis&Gyr
100 FOR STA:=DATE-2 TO DATE
200 IF (STA.MTYP=0) AND (STA.ADR=$177'020) THEN GOSUB 1000
300 NEXT STA
400 END
1000 PRINT STA.DATE!!STA.TIME,STA.ADR,STA.V1,STA.V2; RETURN