-

READ_UPS_DIAGNOSTICS

TypeFunction block
DescriptionThe function block can be used to retrieve diagnostic data from the UPS (Uninterruptable Power Supply). The diagnostic data includes the charge level of the UPS in percent and the health status of the UPS.

The output of the diagnostic data is triggered with a rising edge at the REQ input. When the FB is instantiated or reset with a falling edge at REQ, the BUSY, DONE, and ERROR outputs are set to FALSE and STATUS, CHARGE_LEVEL and HEALTH are set to the value 0.

If an error occurs during execution, the ERROR output is set to TRUE and the DONE output is set to FALSE. While ERROR = TRUE, the STATUS output contains the error code.
NotesFunction blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
ParametersInput

REQ

Outputs

DONE

ERROR

BUSY

STATUS

CHARGE_LEVEL

HEALTH
Timing Diagram