RobotStudio event

Starting program after programload [WebWare SDK]

Options

Hi, I would like to know how one should do to start the program from webware after a programchange. I manage to start it with the parameter "main" in the s4start method but not with a empty string "".

We don't want to start the program from main in case someone has moved the robot with the joystick.

It works with:

Helper1.S4Start(0,"main",-1,1,3,ref intResultID)

but not with:

Helper1.S4Start(0,"",-1,1,3,ref intResultID)

This is just a problem after a S4ProgramLoad() call.

Do one have to init the Helper control or something after a programload(change of program)?

Regards

/Sven

 

Comments

  • RussD
    Options

    As I read the documentation, using an empty string parameter in S4Start means to resume from the current location, i.e. program point.

    If you have just loaded the program, then I am guessing that the "current location" is considered empty or undefined before you have executed the program. As a result, I would expect the call to fail.

    I would assume that passing in a <Procedure Name> should work, however.

    Russell Drown
  • What I really wanted to achive was, when start button is pressed: 1.After a programload -start from "main".

    otherwise start from ""(current location).

    So, I simply implemented that... FIXED.

     

  • Hi
    If you load a *.prg (S4ProgramLoad) the program pointer will be lost so you can't start from previous program pointer anymore only from main.

    If you load a *.mod (S4ModuleLoad) and the programpointer isn't in that module you will be able to start from where you where.

    Per Svensson
    Company Specialist
    ABB Automation Technology Products