THC for Hypertherm 45XP based on DT-115 / LM393 comparator
- radek_marko
- Offline
- Senior Member
- Posts: 73
- Thank you received: 18
On the product panel I can see the pierce height, cut height etc and I do not see any info re ARC current or ARC voltage.
I'm guessing it does work auto-magically, but what's the source of the magic?
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10738
- Thank you received: 3541
Please Log in or Create an account to join the conversation.
- radek_marko
- Offline
- Senior Member
- Posts: 73
- Thank you received: 18
Please Log in or Create an account to join the conversation.
- radek_marko
- Offline
- Senior Member
- Posts: 73
- Thank you received: 18
From THCAD FO+ to parallel port input, set that input as the encoder A input in hal.
My board arrived and I've connected both sides of the board but I'm struggling with HAL.
My FO+ wire is connected to LPT2 IN PIN 15 (parport.1.pin-15-in), Hypertherm is set to 20:1 voltage divider.
I would appreciate some help or even an example of HAL file with THCAD-10 connected.
I have added my plasma_connections.hal below. I've removed existing UP/DOWN move inpus from my non-functioning DT-115 THC.
# net plasmac:move-up parport.1.pin-13-in => plasmac.move-up
# net plasmac:move-down parport.1.pin-12-in => plasmac.move-down
I have the following questions:
1. Where do I need to connect FO- signal from THCAD-10 board (currently not connected)
2. I was expecting to find ENCODER A commented out in hall file, but I do not see it - where can I find example?
# Keep your plasmac i/o connections here to prevent them from
# being overwritten by updates or pncconf/stepconf changes
# Other customisations may be placed here as well
# This file is built by the configurator in your configuration directory
#***** debounce for the float switch *****
# the lower the delay here the better
# each 1 is a 0.001mm (0.00004") increase in probed height result
loadrt debounce cfg=3
setp debounce.0.delay 5
addf debounce.0 servo-thread
#***** arc voltage lowpass cutoff frequency *****
#***** change to the cutoff frequency you require *****
setp plasmac.lowpass-frequency 0
#***** the joint associated with the Z axis *****
net plasmac:axis-position joint.3.pos-fb => plasmac.axis-z-position
net plasmac:arc-ok-in parport.1.pin-11-in-not => plasmac.arc-ok-in
net plasmac:float-switch parport.1.pin-10-in => debounce.0.0.in
# net plasmac:breakaway {YOUR BREAKAWAY PIN} => debounce.0.1.in
# net plasmac:ohmic-probe {YOUR OHMIC PROBE PIN} => debounce.0.2.in
# net plasmac:ohmic-enable plasmac.ohmic-enable => {YOUR OHMIC ENABLE PIN}
net plasmac:torch-on => parport.1.pin-17-out
# net plasmac:move-up parport.1.pin-13-in => plasmac.move-up
# net plasmac:move-down parport.1.pin-12-in => plasmac.move-down
# a 1 here allows multiple tools to be used
# gcode M3 S1 needs to be changed to:
# M3 $0 S1 for the plasma torch
# M3 $1 S1 for the scribe
# M3 $2 S1 for spotting
setp plasmac.multi-tool 0
# net plasmac:scribe-arm plasmac.scribe-arm => ***YOUR_SCRIBE_ARMING_OUTPUT***
# net plasmac:scribe-on plasmac.scribe-on => ***YOUR_SCRIBE_ON_OUTPUT***
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19409
- Thank you received: 6507
- a base period set as low as it can go without having latency error displayed
- based on that value and the max steps the port can read a calculated decision can be made to use the 1/32 or 1/64 or 1/128 divider on THCAD
- loadrt for the encoder
- addf for the encoder
- Encoder mode
- encoder phase A wired in hal to parallel port input
Attached is a working configuration, but the important parts are in the torchud.hal file.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
- Posts: 17904
- Thank you received: 4774
You need to load an encoder component to use the THCAD's frequency output
with a parallel port
for example:
loadrt encoder
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread
setp encoder.N.counter-mode true
net enca encoder.N.phase-A parport.1.pin-15-in
Please Log in or Create an account to join the conversation.
- radek_marko
- Offline
- Senior Member
- Posts: 73
- Thank you received: 18
I was searching for the phrase ENCODER and found the following in the documentation:
Then I have spotted the sticker at the bottom of THCAD boardThe limit is in the range of 10KHz to 50KHz, depending on the computer speed and other factors
and now with Tommylight's comment
based on that value and the max steps the port can read a calculated decision can be made to use the 1/32 or 1/64 or 1/128 divider on THCAD
It makes perfect sense! I need to find which parameter in the config reflects F/32, F/64 or F/128.
So, I will modify my .ini file to add new torchud.hal - a copy of Tommylight's. In the hal file I will change the input port.
loadrt torchud
loadrt encoder num_chan=1
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread
addf torchud servo-thread
net enc-phase-a <= [b]parport.1.pin-15-in[/b] [strike][b]parport.0.pin-13-in[/b][/strike]
#setp encoder.0.position-scale 300
setp encoder.0.counter-mode 1
net enc-phase-a encoder.0.phase-A
net thc-encoder-vel encoder.0.velocity => torchud.encoder-in
net TorchOn torchud.enable
setp torchud.voltage-offset 1880
#setp torchud.voltage-scale 0.01132877
setp torchud.voltage-scale 0.022855
#setp torchud.setpoint 5
#setp torchud.tolerance 2
Attachments:
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19409
- Thank you received: 6507
And theSo, I will modify my .ini file to add new torchud.hal - a copy of Tommylight's. In the hal file I will change the input port.
Final version should look like this:loadrt motmod base_period_nsec=100000 loadrt encoder num_chan=1 addf encoder.update-counters base-thread addf encoder.capture-position servo-thread net enc-phase-a <= parport.1.pin-15-in setp encoder.0.counter-mode 1 net enc-phase-a encoder.0.phase-A
encoder.0.velocity
has to be added into PlasmaC configurator when setting it up.
Please Log in or Create an account to join the conversation.
- radek_marko
- Offline
- Senior Member
- Posts: 73
- Thank you received: 18
I'm trying to get my head around voltage-offset and voltage-scale.
I've created my calculation for everyone to use if required: docs.google.com/spreadsheets/d/1dGBwp7ia...UeY/edit?usp=sharing
If I apply frequency divider as F/64 then I'm getting voltage-offset close to one from your config file, but my voltage-scale is way off.
I'm guessing your voltage divider at plasma output must be different than mine (I'm using 1:20).
Please let me know if my logic and calculations are correct.
Attachments:
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
- Posts: 5698
- Thank you received: 2081
Please Log in or Create an account to join the conversation.