#include pins.h #include vars.h #include func_ihc.h main() { portclr (OUTPUT_MARKER1); portclr (OUTPUT_MARKER2); do_plasma_probe(); if (marker_ihc_dot_height<10) {marker_ihc_dot_height=10;}; //fix dot height parameter is not correct gvarset(7080,ihc_move_down_speed);//set speed; g0moveA(0x0,0x4,marker_ihc_dot_height); //Z axis, ignition_height timer=200;do{ timer--; }while(timer>0); //wait 0.1sec till motion started do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished portset(OUTPUT_PLASMA); //PLASMA ON portset(OUTPUT_MARKER1); timer=marker_dot_time; //dot time timer=timer+marker_dot_delay; do{ timer--;}while(timer>0); //dot time delay portclr(OUTPUT_PLASMA); //PLASM OFF portclr(OUTPUT_MARKER1); g0moveA(0x0,0x4,2000); //Z axis, ignition_height 20mm up timer=200;do{timer--;}while(timer>0); //pause 0.1sec for motion starts do { code=gvarget(6060); }while(code!=0x4d);//wait till motion finished proc=plc_proc_idle; exit(99); };