How can I tell to a PLC that my UR E-stop is pressed or UR error?

How can I tell to a PLC that my UR E-stop is pressed or UR error?
UR error likes robot hit on something and make itself stop.

Using the Dashboard server is the only way to get specific messages on the fault state of the robot. If you’re looking for something like “let my PLC know any time the robot has stopped” that’s much easier to detect. You can configure any robot output to be High when not running:

Just wire this to a PLC input and any time that’s high, the robot program is not running.

You can set one of the configurable outputs to be high (or low - can’t remember) when the e-stop on the pendant is pressed, this can then be connected to the PLC input.

I think there is a set of bits in the ethernet/IP message that show the safety system, status, and estop condition

Bit #230 (‘RES’) of the ‘output’ from the robot is described as ‘is robot emergency stopped’

Bit #226 (‘PS’) is described as ‘is protective stopped’