#include pins.h #include vars.h main() { portset(OUTPUT_FUEL); //On Valves for ignition portset(OUTPUT_IGNITION); portset(OUTPUT_OXY_HEAT_LO); proc=plc_proc_ignition; timer=timeout_ignition; //Set Ignition process do{ timer--; }while(timer>0); //wait ignition portclr(OUTPUT_IGNITION); portset(OUTPUT_OXY_HEAT_HI); proc=plc_proc_preheat; break_heating=1; timer=timeout_preheat; gvarset(7080,2000); //setup Z axis Speed h=0-30000; g0moveA(0x0,0x4,h); //Z axis, move down do{ timer++; }while (adc010); //heating loop portset(OUTPUT_OXY_CUT_LO); //add Oxygen Cutting Lo pressure gvarset(7080,2000); g0moveA(0x0,0x4,ihc_pierce_height); //Z axis, move up timer=200; do{ timer--; }while (timer>0); //after 0.2sec delay motion is definetely started do { timer++;code=gvarget(6060); }while(code!=0x4d); //then ait till motion finished timer=timeout_soft_start; do{ timer--; }while(timer>0); //wait for Soft Oxygen start portset(OUTPUT_OXY_CUT_HI); //add Oxygen Cutting Hi pressure timer=ihc_pierce_time; do{ timer--; }while(timer>0); //wait for Pierce portclr(OUTPUT_OXY_HEAT_HI); //add Oxy Cutting Hi pressure if (thc_enabled!=0) { command=0xa4;//Start Height sensing parameter=1; message=PLCCMD_SET_CNC_VAR; texit=timer+3;do{timer++;}while(timer