// start motion //flags // bit 0 - absolute programming // bit 1 - machine coordinates // bit 7 - delayed start. // axes mask // bit 0 - X axis // bit 1 - Y axis // bit 2 - Z axis // bit 3 - A axis // bit 4 - B axis // bit 5 - C axis do_plasma_probe() { gvarset(7080,ihc_probing_speed);//set speed; timer=5;do{timer--;}while(timer>0); if (ihc_enabled!=0) { message=PLCCMD_TRIGGER2_OFF; timer=5;do{timer--;}while(timer>0); portset(OUTPUT_PROBE); timer=200; do{ timer--; }while (timer>0); sens=portget(INPUT_IHC); if (sens==0) { g0moveA(0x0,0x4,0-30000);//Z axis, timer=200; do{timer--;}while(timer>0);//wait till motion started do { code=gvarget(6060); sens=portget(INPUT_IHC); if (sens!=0) { code=1; message=PLCCMD_LINE_STOP;//skip line }; }while (code==0); do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished }; }; portclr(OUTPUT_PROBE); }; do_move_ignition_height() { speedz=gvarget(7043); gvarset(7080,speedz); //Set speed; if (ihc_enabled!=0) { ihc_current_height=ihc_correction_height+ihc_ignition_height; if (ihc_current_height>5) { g0moveA(0x0,0x4,ihc_current_height);//Z axis, ignition_height timer=200;do{timer--;}while(timer>0);//wait till motion started do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished }; }; }; do_move_pierce_height() { ihc_current_height=ihc_pierce_height-ihc_ignition_height; if (ihc_current_height>5) { g0moveA(0x0,0x4,ihc_current_height);//Z axis, pierce_height timer=200;do{timer--;}while(timer>0);//wait till motion started do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished }; }; do_move_cutting_height() { ihc_current_height=ihc_cutting_height-ihc_pierce_height; if (ihc_current_height!=0) { g0moveA(0x0,0x4,ihc_current_height); //Z axis, cutting_height timer=200;do{timer--;}while(timer>0); //wait till motion started do { code=gvarget(6060); }while(code!=0x4d); //wait till motion finished }; };