RobotStudio event

[PC SDK] 'step over' on an interval.

Hello,

My goal is to execute a single line of the selected rapid task on a certain interval (>20ms). as if you clicked the 'step over' button every 20ms.
I'm not sure however how to achieve this using the PC SDK (or within Robotstudio preferably). I can start rapid tasks and start rapid tasks from a certain row but I can't execute a single command at the time like you can with the 'step over' button. I also tried to using the "ProgramPositionEventArgs" event handler to start/stop the task every time the PP position changes but the event didn't trigger after each command.
Therefore, I was wondering if there is a way to achieve this using the PC SDK or if this can be done within robotstudio.


Tagged:

Comments


  • If you have a look in the documentation about the "Start Method", then you will see that one of the parameters is the "ExecutionMode". As "ExecutionMode" you can choose from the following items:
    Continuous Continuous execution.
    StepIn Stepwise execution.
    StepOver Step over instruction.
    StepOut Step out of routine.
    StepBack Backward stepwise execution.
    StepLast Same as last time.
    StepMotion Execute to next motion instruction.
    Undefined Undefined. 

    I think "StepIn" or "StepOver" is what you are looking for. Furthermore the 20 milliseconds..., maybe you can solve this with a timer in your C# code.