User Tools

Site Tools


plc:plc_gas_cutting_implementation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
plc:plc_gas_cutting_implementation [2017/06/06 21:39] skirillovplc:plc_gas_cutting_implementation [2017/06/07 00:36] skirillov
Line 290: Line 290:
 {{gas-control-004.png?600}} {{gas-control-004.png?600}}
  
 +  * H1 - Safe Height, defined as distance from cutting height at the end of previous cut. Ignition process started on Safe Height. A system waits 1-2 seconds for stable flame process, then switch to Preheat Process and moves torch down to - 
 +  * H2 - Preheat Height - defined by Capacitory Height Sensor value. After Preheat process finished, valves switched to "Start Pierce" and torch moved to 
 +  * H3 - Pierce Height defined as distance from preheat height. After Pierce is finished, Cutting and toolpath motion started, THC is activated and toch moved down by Torch Height Control to
 +  * H4 - Cutting Height, defined as Torch Height Control Reference value.
 +
 +<code c M03.plc>
 +#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 (adc01<ihc_preheat_height); 
 + //wait in the loop till Current Height from Height Sensor (adc01)
 + //less than given value of ihc_preheat_height;
 + //then stop motion and continue preheat process
 +
 + message=PLCCMD_LINE_STOP;//stop motion
 + do { code=gvarget(6060); } while(code!=0x4d); 
 + //wait till motion finished
 +
 + do{ timer--; 
 + if (break_heating==0) { timer=0; };
 + } while(timer>0);             //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=100; do{ timer--; }while (timer>0); 
 + //after 0.1sec 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<texit);
 + };
 +
 + proc=plc_proc_cutting;
 +
 +exit(99);
 +};
 +
 +</code>
  
plc/plc_gas_cutting_implementation.txt · Last modified: 2021/11/02 17:20 by ivan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki