CLSID = 16#100x – 16#17FF
LVL1 (process variables) are technological variables for complete process data handling, including channel linking, filtering, scaling, inversion, etc.; simplifying process debugging; simulation functions; process alarming functions, and more.
It is recommended to use consistent identification (ID) of process variables within LVL1 to simplify symbolic referencing in the HMI.
The process variable level is represented by four classes:
If needed, separate classes for network variables can be defined. It is recommended to process network variables using the same functions as standard technological variables.
A single buffer with the structure VARBUF is used.
A variable with ID = 0 is reserved as an empty, inactive variable.
An example of diagnostics and configuration of analog variables on the HMI is shown below. Windows displaying the list of all process variables within the framework are referred to as process variable maps.

Fig. Example of using analog input variable functions on the HMI.

Fig. Example of configuring discrete input variable functions on the HMI.
Variable statuses (alarms, faults, forced state) accompany the display of variables on all HMI mimic diagrams. The following image shows an example of warning display for variable PT102 on a panel with limited functionality (Simatic Basic Panel).

Fig. Example of displaying variable status on the HMI.
The structures must contain:
| Name | Type | Description |
|---|---|---|
| ID | UINT | Unique identifier |
| CLSID | UINT | 16#10xx |
| STA | INT | Status bits |
| PRM | UINT | Configuration parameters, must be retained after power-off |
| CHID | UINT | Logical channel number to which the variable is linked, 0 = not linked |
| CHIDDF | UINT | Default logical channel number |
| prm1 | Parameters according to the technological variable class | |
| prm2 | Parameters according to the technological variable class | |
| prm3 | Parameters according to the technological variable class | |
| STEP1 | UINT | Step number |
| T_STEP1 | UDINT | Elapsed step time in ms |
| T_PREV | UDINT | Time in ms since the previous call, taken from PLC_CFG.TQMS |
Level 1 CMs (process variables) can be linked to a channel of the same type (e.g., a discrete input to a discrete input process variable) by their number. This allows dynamic linking of a process variable to a channel, enabling physical reallocation of a specific sensor/actuator in case part of the system fails. Additionally, this switching can be done programmatically.
Process variables are higher in the control hierarchy than channels. All diagnostic information is transmitted from the channels to the variables. The implementation of this level is hardware-independent since all platform-specific details are handled at the channel level, whose interface is standardized within the framework.
Process variables provide the following functionalities:
A classic buffer handling function must be implemented.
CLSID and ID of the process variable.VARBUF.STA = VAR_CFG.STAIVAR_CFG.CMD = VARBUF.CMD if it is not zero (to allow commands from other sources)VARBUF.CH_STA = CHCFG.STA.STA.CMDLOAD = TRUEVARBUF.CMD = 16#0100VARBUF.CMD = 16#0101A function for bidirectional buffer handling (VARBUFIN <-> VARBUFOUT) should be implemented.
VARBUFIN: used for processing commands (when CLSID and ID match) and writing information into the process variable.VARBUFOUT: used for reading information from the process variable upon receiving a read command in VARBUFIN.VARCFG.CLSID = VARBUFIN.CLSID, VARCFG.ID = VARBUFIN.ID, and VARBUFIN.CMD = 16#100VARCFG.CLSID = VARBUFIN.CLSID, VARCFG.ID = VARBUFIN.ID, and VARBUFIN.CMD = 16#101The interface should pass the following parameters:
If direct access to external variables from inside functions is not possible, PLC_CFG, VARBUF, VARBUFIN, and VARBUFOUT should be passed. Alternatively, other interfaces may be used to access PLC_CFG internally.
Within the general program (outside the class function implementation):
Within the class function implementation:
CHID = 0.PRM_DSBL := FALSE.T_PREV := PLC_CFG.TQMS.T_STEP1 := 0.| No. | Name | When to check | Notes |
|---|---|---|---|
| 1 | Assigning ID and CLSID on startup | After function implementation | |
| 2 | Buffer write commands | After function implementation | |
| 3 | Parameter modification and writing from the buffer | After function implementation | |
| 4 | Changing the logical channel number | After function implementation | |
| 5 | Writing CHID values by default on startup or single command | After function implementation | |
| 6 | Operation of built-in time counters | After function implementation | |
| 7 | Effect of PLC time counter overflow on step time | After function implementation | |
| 8 | Ping-Pong algorithm | After function implementation | |
| 9 | Operation in non-forced mode | After function implementation | |
| 10 | Operation in forced mode | After function implementation | |
| 11 | Sending broadcast commands to clear forcing | After function implementation |