Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Color has a deprecated constructor in /homepages/23/d548214462/htdocs/clickandbuilds/Joomla/MyCMS/templates/rt_chapelco/features/color.php on line 11
myCNC - advanced CNC control, software - How to configure THC

Frequently Asked Question

How to configure THC
Warning: Complete THC configuration is necessary if new Plasma Cutting profile created. Easy way is to use some of default profile made for Plasma Cutting and edit it for your needs. This acticle is for advanced users.

To complete setup THC for Plasma Cutting you will need:

1. Connect Height sensor output to one of Ethernet controller ADC inputs

2. Go to THC configuration widget (Technology->THC tab).

3) Configure THC

a) check "THC enabled"
b) select ADC input that used to connect Height sensor.
c) "Arc voltage ref" is reference value that the THC system will try to keep by control Torch Height.
d) "THC PI-control P-ratio" and "THC PI control I-ratio" can be set separately for moving up and down. The ratios for "move down" are usually lower than "move up" to prevent torch diving.
e) Height sensing signal may be unstable just after piercing. It's possible to deactivate THC for given timeout after piercing by setting "THC start delay"s"
f) At finish of cutting a cut part may fall out  and height sensing may work incorrectly at the moment. To prevent Torch following falling part THC system can be deactivated just before cut is finished. Set "THC time pre-off" to enable this feature. Set "THC time pre-off,s" to 0 to disable it.

4) Enable THC in G-code program.

PLC controller should send a message to THC to start THC working. Normally a message to "START THC" is included in some of cutting ON commands (M02.plc, M20.plc, M71.plc C07.plc etc) and message to THC "STOP THC" is included in cutting OFF and program OFF commands (M05.plc, M21.plc, M74.plc, OFF.plc, M02.plc)

CNC register 0xa4 is used to start/stop THC control.
Write "1" to the register switch ON THC.
Write "0" to the register switch OFF THC.

Sample of code to start THC is shown below-

if (thc_enable!=0)
  //start THC control
  parameter=1; //Start Height sensing


Sample of code to stop THC is shown below-

if (thc_enable!=0)
  //stop THC control
  parameter=0; //Stop Height sensing
  texit=timer+2; do{timer++;}while(timer<texit);

5) Configure DRO for measured Arc voltage.

DRO definition as all screen configuration is situated in "cnc-screen.xml" configuration file of the profile. Arc voltage DRO definition is shown below.

<gitem K="0.075" where="thc-work" type="display" format="%3.1f"  address="adc-inputs" number="0" bgColor="black" fgColor="cyan"
height="30" displayWidth="180" labelWidth="120" fontStyle="bold" labelFont="14" orientation="horizontal"
<message>Arc Voltage, V</message>
<message_ru>Напряжение дуги, В</message_ru>

For given example we use ADC0 input as feedback channel for THC system. So we need to choose ADC0 current value as Arc voltage.

Attributes "address" and "number" define ADC input #0 to DRO.
Attribute "where" defines Widget name to insert the DRO.
Attribute "K" describes ratio to convert 12bit value (0...4095 range) to Volts. This ratio should be set according your plasma power source, voltage divider parameters, THC addon board input attenuation etc.
Attribute "format" defines C-like format to display Arc voltage.
Attributes "height", "displayWidth", "labelWidth" describe height and width for DRO and its label.
Attributes "bgColor" and "fgColor" define Background and Foreground Color for DRO.

Field "message" provides test message for Label.

6) Reference Arc voltage control.

To change Reference Arc voltage from main screen can be used spinbox-like item. The item configuration is shown below.

Attributes "type", "action" "name" define spinbox that show and change current state of CNC-variable #0xa3 (which is actually reference value for THC control). The rest attributes and fields are similar to DRO configuration.

<gitem K="0.075" where="thc-work" format="%3.1f"
type="kspinbox" action="cnc-variable-dec-0xa3;cnc-variable-inc-0xa3" name="display-cnc-variable-0xa3"
fgColor="cyan" bgColor="black"
labelWidth="120" displayWidth="60" height="60"
fontStyle="bold" labelFontSize="14"
<message>Arc Voltage Ref, V</message>
<message_ru>Опорное напряжение дуги, В</message_ru>

 7) Configured spinbox changes CNC variable 0xa3. The variable itself should be defined in cnc-variables.xml configuration file. While pressing "left"(decrement) and "right"(increment) buttons on the spinbox value of the CNC variable is changed according to increment/decrement value ("step" attribute) and range ("min", "max" attribute).

<value suffix="V" type="numpad" min="300" max="4090" step="2" name="cnc-variable-0xa3">1850</value>

If the variable defined inside of <item> section it will be show on Settings dialog as well. See screenshot below.

    <value type="numpad" min="300" max="4090" step="2" name="cnc-variable-0xa3">1850</value>
    <message>Arc Voltage Ref, ADC units</message>
    <message_ru>Установка напряжения</message_ru>
    <message_du>Boog Voltage Ref</message_du>
    <message_kr>ARC 볼트 기준</message_kr>
    <message_pl>Napięcie odniesienia łuku</message_pl>
THC Arc Volatge setup
THC Arc Volatge setup


Screenshot below shows both Arc Voltage DRO and Arc Votage reference spinbox.

THC Arc voltage DRO and Arc volateg Reference spinbox
THC Arc voltage DRO and Arc volateg Reference spinbox


8) Plasma Arc voltage is negative. Differential amplifier/attenuator can be used to convert Plasma Arc voltage to 0...5V rande. Ethernet control boards ET10, ET1(2016 revision) contains differential amplifier to accept signal up to 30V. If Plasma power source doesn't have built-in voltage diveder, some external divider 1:10 should be used.

ET5, ET1(old revision) ADC accept 0...5V signals, so external differential amplifier and voltage divider should be used. On a photo below is possible choice fro differential amplifier - THC add-on board.