You can use this code: 38200 Battery Backup Lost.
38200, Battery backup lost
Description
The battery backup to serial measurement board (SMB) arg in
the robot connected to drive module arg on measurement link
arg has been lost.
Consequences
When the SMB battery power supply is interrupted, the robot
will lose the revolution counter data. This warning will also
repeatedly be logged.
Probable causes
This may be due to an SMB battery that is discharged or not
connected. For some robot models, the SMB battery power is
supplied through a jumper in the robot signal cable (refer to the
IRC5 circuit diagram), and disconnecting the cable interrupts
the battery power supply. Some earlier robot versions used
rechargeable batteries, and these must be charged for at least
18 hours before working correctly.
Recommended actions
1) Make sure a charged SMB battery is connected to the board.
2) NOTE! Disconnecting the robot signal cable may disconnect
the SMB battery power supply, triggering the battery warning
to be logged.
3) Reset the battery power warning by updating the revolution
counters as detailed in the Calibration or Product Manual.
4) Replace the battery if discharged.
Then try to create background task to send this code to PLC. You can find nice explenation in this thread:
https://www.robot-forum.com/robotforum/thread/34906-sending-error-code-number-to-plc/