Hi there,
I've got the problem finally. I have a sub program running all the time for my custom controls. This prevents the SPS to run. I found that only one sub at the time can run. Then I stopped my sub and enabled the SPS and the $OV_PRO started working.
Now, I found this https://www.robot-forum.com/robotforum/kuk…on-the-sps-sub/ and made a call to my sub inside the SPS. In my sub there is no reference to $OV_PRO or the variables involved in the calculation. But as soon I saved the SPS with the call the $OV_PRO stopped working again and it stay frozen if I change the potentiometer. The call seems working as my sub has got enabled as soon I saved the SPS but maybe I made the call in the wrong manner.
This is my code inside the SPS and ALO-CONTROLLI is my sub (which now I placed inside the same folder of the SPS)
;FOLD USER PLC
;Make your modifications here
ALO_CONTROLLI() ;Call ALO custom subprogram
$OV_PRO = 100-(99*$ANIN[1]) ;Set robot override by potentiometer
;ENDFOLD (USER PLC)
ENDLOOP
Also my sub doesn't work with this call from the SPS.
How can I fix this?