THC for Hypertherm 45XP based on DT-115 / LM393 comparator

More
31 Oct 2020 10:47 - 31 Oct 2020 10:48 #187885 by radek_marko
It looks like my calculations are correct.

Next question - in my INI file, do I need to load torchud.hal and thc.hal of the hall files as per Tommylight's example below?

Tommy's file
[HAL]
# HALUI to interact with NML
# Run before any other HALFILE
HALUI =		halui
# list of hal config files to run through halcmd
#+ files are executed in the order in which they appear
HALFILE = stepper.hal
HALFILE = torchud.hal
HALFILE =	thc.hal
HALFILE =	IO.hal

# A file to hook pyvcp to hal signals
POSTGUI_HALFILE =	thc_vcp.hal

My INI file
[HAL]
# required
TWOPASS = ON
# the base machine
HALFILE = plasma.hal
# the plasmac component connections
HALFILE = plasmac.tcl
# the plasmac machine connections
HALFILE = plasma_connections.hal
# THC following Tommylight's 
HALFILE = torchud.hal
HALFILE =	thc.hal
# use this for customisation after GUI has loaded
POSTGUI_HALFILE = postgui.hal
# required
HALUI = halui
Last edit: 31 Oct 2020 10:48 by radek_marko.

Please Log in or Create an account to join the conversation.

More
31 Oct 2020 11:09 - 31 Oct 2020 11:11 #187887 by phillc54
If you are using PlasmaC then you wouldn't use thcud.hal, you would just run the Configurator as per the user guide.

Edit: you wouldn't need thc.hal either.
Last edit: 31 Oct 2020 11:11 by phillc54.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
31 Oct 2020 11:59 #187892 by radek_marko
Hi Phill,
I have tried to run through configurator with RECONFIGURE option, but I'm getting an error as per photo attached.

Searching for a solution right now.
Attachments:

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Oct 2020 16:55 #187924 by tommylight
No need for thc.hal and torchud.hal as Phill mentioned, and i was using a THCAD300 in that case so the math will differ.

Please Log in or Create an account to join the conversation.

More
31 Oct 2020 22:57 #187953 by phillc54
What Linux distro are you using.

Try:
sudo apt install libcanberra-gtk-module
The following user(s) said Thank You: radek_marko

Please Log in or Create an account to join the conversation.

More
31 Oct 2020 23:37 - 31 Oct 2020 23:45 #187956 by radek_marko
Phill
I'm still in a bit of struggle. I have installed PlasmaC v0.169. I've selected mode to 1 and put encoder.0.velocity in ark voltage as per manual.
Now LinuxCNC complains about missing input called encoder.0.velocity...
Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.0
Machine configuration directory is '/home/cnc/linuxcnc/configs/plasma'
Machine configuration file is 'plasma.ini'
INIFILE=/home/cnc/linuxcnc/configs/plasma/plasma.ini
VERSION=1.1

check_config: (trivkins kinematics) WARNING:
  INCONSISTENT coordinates specifications:
               trivkins coordinates=XYYZ
               [TRAJ]COORDINATES=XYZ

PARAMETER_FILE=metric_parameters.txt
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYYZ kinstype=BOTH
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
twopass:invoked with <> options
twopass:found ./plasma.hal
twopass:found ././plasmac/plasmac.tcl
twopass:found ./plasma_connections.hal
twopass: Error in file ./plasma_connections.hal:
    Pin 'encoder.0.velocity' does not exist
Shutting down and cleaning up LinuxCNC...
config string '0 out 1 out'
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
980
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime



-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file:    /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
     http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.

                Date: Sat 31 Oct 23:44:35 GMT 2020
            UTC Date: Sat 31 Oct 23:44:35 UTC 2020
        this program: /usr/bin/linuxcnc_info
              uptime: 23:44:35 up 6 min, 1 user, load average: 1.31, 0.85, 0.40
     lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
      which linuxcnc: /usr/bin/linuxcnc
                 pwd: /home/cnc/linuxcnc/configs/plasma
                USER: cnc
             LOGNAME: cnc
                HOME: /home/cnc
              EDITOR: 
              VISUAL: 
            LANGUAGE: en_GB:en
                TERM: dumb
           COLORTERM: 
             DISPLAY: :0.0
             DESKTOP: lightdm-xsession
        display size: 1920x1080 pixels (508x285 millimeters)
                PATH: /usr/bin:/home/cnc/linuxcnc/configs/plasma/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
         nodename -n: PlasmaCNC
      kernel-name -s: Linux
      kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.146-1 (2020-09-17)
          machine -m: x86_64
        processor -p: unknown
         platform -i: unknown
      oper system -o: GNU/Linux

/proc items:
             cmdline: BOOT_IMAGE=/vmlinuz-4.19.0-11-rt-amd64 root=UUID=db97749c-79f6-49f7-9f7a-eebe59d40acc ro initrd=/install/gtk/initrd.gz quiet
          model name: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
               cores: 4
             cpu MHz: 1597.881
             parport: 0000-0000 : parport0 0000-0000 : parport0 0000-0000 : parport1
              serial: 

Versions:
                 gcc: gcc (Debian 8.3.0-6) 8.3.0
              python: Python 2.7.16
                 git: not_in_PATH
          git commit: NA
                 tcl: 8.6
                  tk: 8.6
               glade: not_in_PATH
          glade-gtk2: not_in_PATH

linuxcnc_var all:

     LINUXCNCVERSION: 2.8.0
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
            REALTIME: /etc/init.d/realtime
                 RTS: uspace
          HALLIB_DIR: /usr/share/linuxcnc/hallib

dpkg -l '*linuxcnc*':
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                Version      Architecture Description
+++-===================-============-============-=====================================================================
un  linuxcnc            <none>       <none>       (no description available)
un  linuxcnc-dev        <none>       <none>       (no description available)
un  linuxcnc-doc        <none>       <none>       (no description available)
ii  linuxcnc-doc-cn     1:2.8.0      all          motion controller for CNC machines and robots (Chinese
ii  linuxcnc-doc-en     1:2.8.0      all          motion controller for CNC machines and robots (English documentation)
ii  linuxcnc-doc-es     1:2.8.0      all          controlador de movimiento para máquinas CNC y robots (Español).
ii  linuxcnc-doc-fr     1:2.8.0      all          motion controller for CNC machines and robots (French documentation)
un  linuxcnc-sim        <none>       <none>       (no description available)
un  linuxcnc-sim-dev    <none>       <none>       (no description available)
ii  linuxcnc-uspace     1:2.8.0      amd64        motion controller for CNC machines and robots
ii  linuxcnc-uspace-dev 1:2.8.0      amd64        PC based motion controller for real-time Linux

Last edit: 31 Oct 2020 23:45 by radek_marko.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 Oct 2020 23:51 #187958 by tommylight
Did you add the lines pertaining to encoder in the plasma.hal file ?
The following user(s) said Thank You: phillc54, radek_marko

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 00:05 - 01 Nov 2020 14:23 #187959 by radek_marko
Tommylight - I didnt modify any part of it as I was expecting that configurator.py will take care of it.



I've added the following to plasma_connections.hal
loadrt encoder num_chan=1
setp encoder.0.counter−mode 1
setp encoder.0.position−scale -1
addf encoder.update-counters base-thread
addf encoder.capture-position servo-thread
net arc-voltage-raw parport.1.pin-15-in encoder.0.phase-A
net plasmac:arc-voltage-in encoder.0.velocity => plasmac.arc-voltage-in

and now LinuxCNC starts.

I have PC at home and will try to connect to CNC machine tomorrow and see if THCAD-10 will work.

Thx for all your support and help.
Last edit: 01 Nov 2020 14:23 by radek_marko.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
01 Nov 2020 22:53 #188063 by tommylight

and now LinuxCNC starts.

:)
The following user(s) said Thank You: radek_marko

Please Log in or Create an account to join the conversation.

More
03 Nov 2020 09:23 #188197 by radek_marko
I've updated Linux to Debian 10, updated PlasmaC to v0.169 and with all your help I've managed to get THC acting as expected.

Thank you again!
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.095 seconds
Powered by Kunena Forum