What is the "JUMP" "GOTO" Programming instruction in Staubli

  • Hello everyone !


    I bought 3 RX160 Staubli and I'm still adapting with the programming language.


    I've done projects with Fanuc, Yaskawa, Yasnac and Comau. I've already managed to find several instructions, but I can't find one in specific: The ones that create loopings.


    In Yaskawa it would be the JUMP instruction, in Comau it would be the GOTO instruction and in Fanuc it would be JMP.


    Could you help me?


    Thank you !

  • Hello Joao,


    You can do loops with these instructions:

    1. For (if the step is 1)
    2. For (if the step is different to 1)
    3. While
    4. Do-until
    Code
    for i=0 to 9
        // Code to repeat
    endFor
    Code
    for i=9 to 0 step -1
        // Code to repeat
    endFor
    Code
    while nVal>0
        // Code to repeat
    endWhile
    Code
    do
        // Code to repeat
    until nVal<=0

    The difference between theory and practice is greater in practice than in theory.

  • Not conversant with Staubli, however I believe the language is based on VAL and Kawasaki also is too.

    In addition to what Psyril has already written.

    Staubli may also use 'labels' (which is a word followed by colon or just a number) and 'goto' as the link to the label.


    Where a label could be:

    10

    or

    retry:


    and you would then just require:

    GOTO 10

    GOTO retry


    As I said, not conversant with Staubli, but worth a try...…:top:

  • Thank you, psyril and kwakisak!


    I will show you what I want to do in Comau's language, and it is very similar to what the kwakisaki told us!

    Most of the projects I do are for handling raw and machined parts, and the looping I always use for when the robot is unable to pick up the part, either on the entry table or at the CNC itself. If he doesn't get it, he tries to get it again.


    Look:


    Part_1 ::

    MOVEFLY TO (pz_mesa) ADVANCE

    MOVEFLY TO (ri_mesa_1_aprox) ADVANCE

    $ DOUT [1]: = OFF - OPEN CLAW

    $ ARM_OVR: = 50

    MOVE LINEAR TO (ri_mesa_1_pega)

    DELAY 200

    $ DOUT [1]: = ON --- Close Claw

    DELAY 200

    MOVE LINEAR TO (ri_mesa_1_aprox)

    $ ARM_OVR: = 100

    IF $ DIN [3] = ON THEN

    HOLD

    $ DOUT [4]: = ON --- Buzzer On

    HOLD

    $ DOUT [4]: = OFF --- Turn Buzzer off

    GOTO Part_1

  • Staubli is a "programmer's robot" and the language is much more sophisticated than most robot programming languages. It would help if you had a C++ programmer's mindset.


    It's been a while since I used the Staubli VAL3 language. I checked my old VAL3 Language Reference to confirm. I don't see that the VAL3 language supports simplistic JMP-LBL or GOTO language constructs. The language was developed to perform highly complex actions beyond simple technician-level programming. In large, complex programs JMP-LBL & GOTO commands will make the code unsupportable because it will be difficult to follow the logic and program flow for diagnostics.


    In addition to the constructs provided by Psyril, you also have available the CALL-RETURN constructs. For me, that is what takes the place of JMP-LBL & GOTO constructs. My programs would have many subroutines.

  • Usually I program Staubli robots creating a state machine inside a switch-case statement, this way I can structure the program more like a FANUC robot.

    With you Comau as an example, something like unloading 2 parts, with the robot trying to pick each one again, would look like this:

    Of course, as TygerDawg pointed out, VAL3 is much more powerful compared to the languages used by the other robots.

    I would try to take advantage of the many features it offers.

Advertising from our partners