Executes a command by either its ID or name. Optionally, additional parameters can be passed depending on the command requirements.
Execute a command by ID or name, optionally with up to three parameters
cmd_exec(command) cmd_exec(command, parameter) cmd_exec(command, int_value, double_value) cmd_exec(command, int_value, double_value1, double_value2)
Open “File Open” dialog.
cmd_exec("File.Open_...");
id = cmd_get_id("File.Open_..."); cmd_exec(id);
Open G-code for small square.
cmd_exec("File.Open_Code", "G00 X0 Y0\nG01 X30\nG01 Y30\nG01 X0\nG01 Y0");
Set jogging speed to 100.
cmd_exec("Jog.Jog_Speed.Set", 100.0/60);
Turn output pin 3 on.
cmd_exec("Machine.Output", 3, 1);
Set output pin 6 to PWM to duty cycle 25% at frequency 10kHz.
cmd_exec("Machine.Output_PWM", 6, 25, 10000);
Set spindle override value to 120%.
cmd_exec("Machine.Override.Spindle.Reset", 1.2)
Set feed override value to 80%.
cmd_exec("Machine.Override.Feed.Reset", 0.8)