User Tools

Site Tools


plc:plc_thc_api

THC API - Control THC from PLC procedure

Torch Height Control normally controlled from PLC procedure. THC should be switched ON just after Pierce procedure finished and should be switched OFF before switcheing off cutting process. In some cases switching THC ON/OFF can be made from special M-codes like M14, M15, M50, M51.

THC API offers simple access to THC Control from PLC procedure.

We have two API versions to access to THC.

API #1

Several Global Variables registers are mapped to get access to THC features.

Variable Name Value Comment
THC #0 Registers
GVAR_THC0_CONTROL 7570 THC #0 Control register.
Writing 0 to this register will turn THC off.
Writing 1 - Immediate (No delay) start THC
with pre-defined Reference Value
Writing 2 - Start THC with Delay
(THC on delay parameter in THC settings) and pre-defined Reference Value
Writing 3 - Update Reference Value (Measure ADC channel)
and Immediate Start THC with new Reference
Writing 4 - After Delay update Reference Value
(Measure ADC channel) and Start THC with new Reference
GVAR_THC0_INPUT 7571 Writing to this register will change ADC channel
used for THC control.
ADC numeration starts from 0x10
0x10 - ADC #0
0x11 - ADC #1
0x12 - ADC #2
0x13 - ADC #3
0x14 - ADC #4
0x15 - ADC #5
0x16 - ADC #6
0x17 - ADC #7
GVAR_THC0_VREF 7572 Writing to this register will change Reference Value for THC #0.
Reading register will return THC #0 current Reference Value
GVAR_THC0_OFFSETZ 7573 Reading this register will return current THC #0 Speed. Register value is used to display current speed of THC #0 system
GVAR_THC0_ENABLED 7574 THC #0 Enable Register.
Writing 0 will Disable THC #0. Writing to THC #0 Control register will be ignored.
Writing 1 - will Enable THC #0
THC #1 Registers
GVAR_THC1_CONTROL 7575 See THC #0 above
GVAR_THC1_INPUT 7576 See THC #0 above
GVAR_THC1_VREF 7577 See THC #0 above
GVAR_THC1_OFFSETZ 7578 See THC #0 above
GVAR_THC1_ENABLED 7579 See THC #0 above
THC #2 Registers
GVAR_THC2_CONTROL 7580 See THC #0 above
GVAR_THC2_INPUT 7581 See THC #0 above
GVAR_THC2_VREF 7582 See THC #0 above
GVAR_THC2_OFFSETZ 7583 See THC #0 above
GVAR_THC2_ENABLED 7584 See THC #0 above
THC #3 Registers
GVAR_THC3_CONTROL 7585 See THC #0 above
GVAR_THC3_INPUT 7586 See THC #0 above
GVAR_THC3_VREF 7587 See THC #0 above
GVAR_THC3_OFFSETZ 7588 See THC #0 above
GVAR_THC3_ENABLED 7589 See THC #0 above

Examples. Switch On THC#0 and THC#1 in M03 Oxyfuel Gas Cutting ON procedure (2x gas cutting heads configuration). Pre-defined Reference Value is used, THC will be started after delay, defined in Cfg→Technology→THC configuration dialog, THC delay, s item.

if (thc_enabled!=0)
 {
   gvarset(7570,1); //THC #0 ON
   gvarset(7575,1); //THC #1 ON
 };

Switch Off THC#0 and THC#1 in M05 Oxyfuel Gas Cutting OFF procedure (2x gas cutting heads configuration)

   gvarset(7570,0); //THC #0 ON
   gvarset(7575,0); //THC #1 ON
plc/plc_thc_api.txt · Last modified: 2017/11/10 11:40 by skirillov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki