5.4.5.4 Status of the battery and DIP switches
Both the battery status and the positions of the DIP switch S1 (for details see chapter Settings using DIP switch
S1) can be read out by the application. It is stored in a bit-oriented status register with the IEC address %IW25.
The individual bits for the query are already declared in the controller configuration. The variable BATTERY_OK
indicates the status of the battery:
BATTERY_OK Status
True Battery voltage is above the limit.
False Battery voltage is critical, battery must be replaced.
The variables _DIP1 to _DIP5 indicate the position of the coding switches 1 to 5. The underscore identifies the
variables as low active, i.e. inverted.
_DIPn Status
True Off
False On
In CODESYS, the defined variable name and the associated IEC address can be looked up using the following
path:
Controller configuration → GLT3010_V2 → System → System state → BATTERY_OK
Example in STRUCTURED TEXT:
IF NOT BATTERY_OK THEN
SendLowBat();
END_IF