Different speed for each subprogram

  • Hello, I needed your help.

    Krc2 v5.5

    I have a main program that calls several subprograms.

    How can I set a speed for the main program and different speeds for each subprograms.

    if I define the value in Bas.src does it change everything in all subprograms?.

    What I intended was, at the beginning of each subprogram, to define the speed of the robot for that subprogram. For example, is it possible to define $vel.cp=0.3 at the beginning of the program and it accepts it?.

    What's the best method? I can't do a lot of trial and error because the Robot is in production.

    Thanks

  • a good programming practice is to initialize ALL variables that your program is going to use. then you don't care if this program is run standalone or if it is called as a subprogram from something else (main or whatever).

    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

  • .. What I intended was, at the beginning of each subprogram, to define the speed of the robot for that subprogram. For example, is it possible to define $vel.cp=0.3 at the beginning of the program and it accepts it?...

    That highly depends on how the subprogram is written. If you use inline movements: NO.

    If you use expert commands: may be, if there is no other command that affects the speed.

  • As hermann says, if you are using Inline Form (ILF) programming on the pendant, each motion command sets the velocity itself. There is no way to control the PTP or LIN speeds for the entire program. You would have to change the speed of each individual ILF point.


    There is a partial workaround, by setting $OV_PRO at the start of each subprogram, but this is not a very robust solution.


    If you are not using ILFs, and instead programming "raw" KRL motion commands, then it's fairly simple to set the various VEL variables at the top of each subprogram.


    ADDENDUM: for KSS 8 and higher, setting $OV_APPL may be a better option than tampering with $OV_PRO.

Advertising from our partners