UR5 PLC Joint states

Did you consider to use either the RTDE or Real Time interface, for reading the joint states.
These interfaces are explained here.