Background logic

  • Hello everyone...

    I am using KUKA robot

    KR300R2700_2 C4 FLR, Robot


    I used an code in SPS. as


    IF (($IN[20]==FALSE)) THEN

    HALT

    ENDIF


    If this condition becomes satisfy, robo stop immediately .

    But i have to press fault reset & cycle start button to start robot again.


    Is there any self-written function to start robot again as condition non-satisfy.

    Please help,

    Thanks in advance....

  • If this condition becomes satisfy, robo stop immediately .

    Are you sure about that? If that code is running in Submit, HALT will affect Submit interpreter.

    But robot program runs in Robot interpreter. In best case this may prevent starting of robot program but for different reason - because there may be check if Submit is running. And once the robot program is running, this will no longer have any effect even on those systems.


    Proper way to pause robot program is to use interrupt and BRAKE command. note that BRKE only has an effect while advance run pointer is still in the ISR.

    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

  • Are you sure about that? If that code is running in Submit, HALT will affect Submit interpreter.

    Sorry Panic mode,

    after your dought, i Crosscheck in SPS, I found that there is $OV_PRO=0 instead of HALT.


    But, i cant use $OV_PRO=100 after non-satisfy of that condition...

    Because , sometimes i have to run robot on 10,30,50,75 or 100 % speed...

  • But, i cant use $OV_PRO=100 after non-satisfy of that condition...

    Because , sometimes i have to run robot on 10,30,50,75 or 100 % speed...

    You can store the actual value of ov_pro before setting ov_pro to zero, and later set it back to the stored value.

    Anyway, imho it's bad programming to change ov_pro during runtime by program. For me it is a good method for manipulating speed for debugging, but not for production.

  • Proper way to pause robot program is to use interrupt and BRAKE command.

    I used BRAKE command instead of $OV_PRO=0, in SPS.

    But it directly shows error, i.e. illegal block.

    Please suggest best way, to stop robot & start without external activities.

  • Maybe also an option:



    Fubini

  • I used BRAKE command instead of $OV_PRO=0, in SPS.

    But it directly shows error, i.e. illegal block.

    Please suggest best way, to stop robot & start without external activities.

    of course... that is not allowed. BRAKE is one of the instructions that only can be used in ISR.

    ISR = Interrupt Service Routine


    So to use that you need to setup interrupt, tell with what ISR to run when triggered and then in the ISR use BRAKE command as well as some sort of logic that will trap and keep instruction pointer in ISR until condition changes back.


    the other option is to copy $OV_PRO value into some backup variable before setting it to zero. then when condition is gone, you can restore THAT value... and only do it ONCE... so that user can still change it if needed. personally i am not fan of this. also this does not seem to work on newer KSS... i prefer things that work on any platforms.


    the best option is to search forum and read the documentation mentioned in READ FIRST

    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

  • the other option is to copy $OV_PRO value into some backup variable before setting it to zero. then when condition is gone, you can restore THAT value... and only do it ONCE... so that user can still change it if needed.


    the other option is to copy $OV_PRO value into some backup variable before setting it to zero. then when condition is gone, you can restore THAT value... and only do it ONCE... so that user can still change it if needed.

    Yes, I think this logic will work as i required.

    Thank you so much for all your suggestions 😃

  • the other option is to copy $OV_PRO value into some backup variable before setting it to zero. then when condition is gone, you can restore THAT value... and only do it ONCE... so that user can still change it if needed.

    I tried this logic yesterday...

    And this works as like I want 😃😃

    Thank you so much😊😊

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now