OV_Pro control in sps.sub

  • Good evening.


    I have a Krc2 that I want to limit the MAXIMUM speed in #Aut or #EXT.

    I introduced the following code in the sps.sub but if I spam the speed button I do manage to raise the speed.


    Code
    IF (($MODE_OP==#EX) OR ($MODE_OP==#AUT)) THEN
    IF $OV_PRO>30 THEN
    $OV_PRO=30
    ENDIF
    ENDIF


    I also tried:


    Code
    IF (($MODE_OP==#EX) OR ($MODE_OP==#AUT) AND ($OV_PRO>30)) THEN
    $OV_PRO=30
    ENDIF


    Both limit the speed as I turn the key, but as mentioned above, I can press the speed key various times and eventually raise the speed (and it stays raised).


    I basically just want to limit the max speed of the robot, but also the operator must also be able to slow it down.


    Thanks :smiling_face:

  • either version should work.

    are you sure the code is scanned continuously?

    how are you checking? maybe just HMI does not display updated value.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • One issue I saw a lot when $OV_PRO was being controlled from the SPS was that, hitting the +/- keys on the KCP fast enough would "decouple" the displayed speed from the actual speed. So the playback speed on the +/- softkey would not longer be correct. But, if you monitor $OV_PRO using the VarCor, you should see that it's always limited to 30, no matter what the softkey display shows.


    Basically, the SPS code works properly, but somehow the refresh between the KUKA HMI and the actual runtime gets broken.

  • SkyeFire this is exactly what is happening.


    When I was finally able to try auto, even though the display marks 100% the speed is actually 30%


    I was worried since I couldn't try auto until late in the shift.

    Its the first night the robot will be working, and the operators have absolutely zero experience.


    Thanks all for your support.

  • either version should work.

    are you sure the code is scanned continuously?

    how are you checking? maybe just HMI does not display updated value.

    Thanks panic mode, it was just the HMI showing a higher speed, but actually the speed was 30%.

    I just couldn't really try it out when I posted.


    Also thanks for helping in other posts, indirectly you have helped me many times.

Advertising from our partners