plc:plc_gas_cutting_implementation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
plc:plc_gas_cutting_implementation [2017/06/06 21:39] – skirillov | plc:plc_gas_cutting_implementation [2017/06/07 00:44] – skirillov | ||
---|---|---|---|
Line 148: | Line 148: | ||
in Start Cutting PLC procedure should be handler to monitor "break heating" | in Start Cutting PLC procedure should be handler to monitor "break heating" | ||
- | < | + | < |
#include pins.h | #include pins.h | ||
#include vars.h | #include vars.h | ||
Line 288: | Line 288: | ||
=== Gas Cutting Control with Initial Height positioning === | === Gas Cutting Control with Initial Height positioning === | ||
- | {{gas-control-004.png? | + | {{mycnc-plc-gas-control-004.png? |
+ | * 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" | ||
+ | * 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() | ||
+ | { | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | do{ timer--; }while(timer> | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | do{ timer++; }while (adc01< | ||
+ | // | ||
+ | // | ||
+ | // | ||
+ | |||
+ | | ||
+ | do { code=gvarget(6060); | ||
+ | // | ||
+ | |||
+ | do{ timer--; | ||
+ | if (break_heating==0) { timer=0; }; | ||
+ | } while(timer> | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | // | ||
+ | do { timer++; | ||
+ | // | ||
+ | |||
+ | | ||
+ | do{ timer--; }while(timer> | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | do{ timer--; }while(timer> | ||
+ | |||
+ | | ||
+ | |||
+ | if (thc_enabled!=0) | ||
+ | { | ||
+ | command=0xa4;// | ||
+ | parameter=1; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | texit=timer+3; | ||
+ | }; | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | }; | ||
+ | |||
+ | </ | ||
+ | |||
+ | <code c M05.plc> | ||
+ | #include pins.h | ||
+ | #include vars.h | ||
+ | |||
+ | |||
+ | main() | ||
+ | { | ||
+ | |||
+ | portclr(OUTPUT_FUEL); | ||
+ | portclr(OUTPUT_IGNITION); | ||
+ | portclr(OUTPUT_OXY_HEAT_HI); | ||
+ | portclr(OUTPUT_OXY_CUT_LO); | ||
+ | portclr(OUTPUT_OXY_CUT_HI); | ||
+ | |||
+ | if (proc==plc_proc_cutting) | ||
+ | { | ||
+ | portset(OUTPUT_OXY_HEAT_LO); | ||
+ | timer=timeout_purge; | ||
+ | do{ timer--; }while(timer> | ||
+ | portclr(OUTPUT_OXY_HEAT_LO); | ||
+ | |||
+ | if (ihc_lift_height> | ||
+ | { | ||
+ | proc=plc_proc_moveup; | ||
+ | gvarset(7080, | ||
+ | g0moveA(0x0, | ||
+ | timer=300; | ||
+ | do { timer++; | ||
+ | //wait till motion finished(7140 for Multidev) | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | portclr(OUTPUT_OXY_HEAT_LO); | ||
+ | |||
+ | command=0xa4;// | ||
+ | parameter=0; | ||
+ | message=PLCCMD_SET_CNC_VAR; | ||
+ | timer=2; | ||
+ | |||
+ | proc=plc_proc_idle; | ||
+ | |||
+ | exit(99); | ||
+ | }; | ||
+ | |||
+ | </ | ||
plc/plc_gas_cutting_implementation.txt · Last modified: 2021/11/02 17:20 by ivan