I have a situation whereby I need to know the robot position relative to robroot continuously. Currently when $ACT_BASE is set to an assigned base the $POS_ACT position is relative to the origin of the base.
I have the below code in the SPS, but occasionally the SPS stops. This is due to the fact that $POS_ACT, $ACT_TOOL or $ACT_BASE can have a state where they are uninitialised (i.e. null) and also the SPS and Robot Program run with different interpolations.
I have looked at doing this via an interrupt but as stated previously I need it to run continuously.
I need to try reading the variables into local SPS variables, and perform my checks on the local variables, this may improve things?
I was thinking about getting a handle on the variable $ACT_BASE and performing the calculation in my plugin?
Does anyone know of a different approach to this?