Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to execute a specific instruction in a program?

What command or method could be used to execute (in simulation) a single specific instruction in a program? Similar to what happens when double clicking an instruction in the GUI tree, or right click>execute instruction.

I'm looking for something like "prog.InstructionExecute(ins_id)", to execute existing instruction number "ins_id" of program "prog".

I found commands InstructionSelect, InstructionDelete, Instruction, setInstruction, RunInstruction, but can't seem to find a command to execute an appointed instruction.

Kind regards,

You can run one instruction like this:
program.setParam("StartOne", ins_id)
This has the same effect as double clicking on that instruction. Only that instruction is executed.

Alternatively, you can start from that instruction and keep moving the program pointer by using the Start parameter:
program.setParam("Start", ins_id)
Thanks Albert, that's what I was looking for!


Users browsing this thread:
1 Guest(s)