About singularity

How to get the singularity state of the robot in real time through the remote interface?

UR does not provide such state output.
But you can read out the joints and note the limits.
According to this you can build your own singularity check.