Plasma Table HAL example, in git and a 9-part video series

More
23 Feb 2020 07:25 - 23 Feb 2020 07:29 #158277 by swolebro
Hey guys! I checked in here last about a year and a half ago, when i was mulling over doing a plasma table. Well, it's done (enough) now, and I went through the PITA of documenting build and shooting a step-by-step video series on how I put the HAL together.

Not to self-promote too hard or anything, but I wanted to share them here, because the reception has been very positive so far. This was a (metric) shit-ton of work which I'm hoping will help some more people jump along the LinuxCNC bandwagon.

It's a fairly budget set-up, using RTAI LinuxCNC 2.7, a parport board, AXIS GUI, 10yr old Dell desktop, DQ542MA steppers, HSS rails, a kitchen pan for a water table... Well, and a Hyptertherm PM65, which cost 3x the amount of everything else in the build. Hahah. Fancy features include a laser crosshair for positioning, an XBox 360 control pendant, ohmic sensing, a self-cobbled Arduino THC, and a bug-fixed version of thcud (for which I have a bugfix to submit).

Future upgrades are going to be a real water basin, real rails, 7i76E, gmoccapy, evaluating plasmac, etc.

Here's the HAL in GitHub, and yes, it even has commits breaking it into sensible parts:
github.com/swolebro/swolebro-youtube/tree/master/linuxcnc

The full build playlist:
www.youtube.com/playlist?list=PL9xPdBFt5...TkuhhfQmQNm6TdvNkPuX

Just the playlist LinuxCNC (HAL starts with video #4):
www.youtube.com/playlist?list=PL9xPdBFt5...n3ZY2wYh7L2yzZ377UwI

The HAL videos alone are about 5hrs of content. I really tried to go through it step by step and explain it in a way where I hope a non-programmer will be able to grok it. Each video lines up with a tag in the git repo, and I also put an timetable/index in each video description - for reference, I'll post all of those here so you can browse through them without clicking around.

I will check back here again to keep up with feedback/questions/corrections in this thread (not disappearing for another year and a half), though I don't have terribly much time for social media. Comments on any of the videos or issues on the GitHub project also work.

Thanks for helping make the thing that made it possible to make this thing.
Last edit: 23 Feb 2020 07:29 by swolebro.
The following user(s) said Thank You: BigJohnT, phillc54, tommylight, Clive S, thefabricator03, CNCFred, Sadmeatball

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

More
23 Feb 2020 07:27 #158278 by swolebro
And here's the full content index. If you view it on the YouTube description, then you can click the timestamps to jump to that point.


LinuxCNC HAL #1: The Basics
Topic index:
00:00 - Intro, what's HAL for, lesson plan
04:56 - other docs, resources, and YouTube channels
07:10 - file layout
09:25 - the stepconf file, what the Stepconf Wizard misses
12:15 - what's in the INI
13:58 - the base HAL file, loadrt for HAL components
17:37 - addf, servo and base threads
19:24 - net commands, signal names, HAL is like a PCB
21:18 - types of HAL pins
21:47 - spindle-on, net arrows, parport pins
23:56 - setp, paport invert, my relays are backwards
25:16 - quick example: a safety interlock on a mill enclosure
28:23 - further changes to the Stepconf Wizard's HAL


LinuxCNC HAL #1(b): Using Linux efficiently
Topic index:
00:00 - Intro, what's LinuxCNC based off, what makes it special, security notes
04:30 - basic commandline tools, shortcuts, command history, make your life easier
10:16 - find shit fast, grep, manpages, locate
15:08 - kicking off GUI programs from the command line
17:24 - installing extra software, sudo
22:00 - git basics, github, gitk, keep track of your shit
25:46 - symlinks so you can keep your shit where you want it
28:22 - git example from scratch
34:05 - git for backups
36:59 - wrap-up


LinuxCNC HAL #2: INI improvements
Topic index:
00:00 - intro, summary, reviewing changes in gitk
01:59 - no stepconf header, startup gcodes, grid view and jog increments
05:43 - default jog velocity, auto-open different gcode file,
08:09 - gcode subroutines
09:35 - halui, MDI command shortcuts, improving homing
12:07 - user command file (change AXIS key bindings)
16:25 - moving things for organization, listing HAL files in the INI


LinuxCNC HAL #3: laser crosshairs, gcode triggered relays
Topic index:
00:00 - intro, demo, laser mount, physical wiring
05:11 - the magic 2 lines of HAL
07:17 - a look at the manpage for the motion component
09:15 - debugging with halmeter
11:44 - this is a silly example, here's a better one
13:22 - example for M66 (waiting on input pins)


LinuxCNC HAL #4: PyVCP
Topic index:
00:00 - intro, pyvcp demo, where to get these files
02:10 - pyvcp vs real buttons
04:01 - INI changes, loadusr commands for pyvcp
05:33 - including the postgui HAL file
06:35 - halui and all the GUI pins
07:45 - the custompanel.xml, debugging, xmllint
11:30 - HAL to tie in pyvcp to our crosshairs, or2 component
15:58 - order of HAL commands
17:03 - the postgui HAL, pyvcp HAL pins
17:45 - debugging with halmeter
18:48 - limitations of this method, improvements using mux2, halui, and not
23:26 - wrap-up



LinuxCNC HAL #5: XBox controller, hal_input, and subroutines
Topic index:
00:00 - intro, demo, summary
00:25 - XBox 360, official Microsoft vs knockoffs
03:57 - QJoypad for keyboard emulation
07:26 - drawbacks of QJoypad
08:26 - adding xbox.hal
09:22 - loadusr vs loadrt, user components are Python scripts
11:37 - hal_input component
13:00 - looking at pins provided by hal_input with halmeter
14:16 - changes to the laser.hal file, logic component
16:38 - MDI shortcuts
19:52 - setting up a subroutine file
21:10 - gcode for adjusting laser offset
24:02 - wrap up


LinuxCNC HAL #6: ohmic probing & more subroutines
Topic index:
00:00 - intro, uses for ohmic probing
01:45 - probing with computer vision and a webcam
02:21 - demo
03:27 - physical wiring
07:31 - HAL for probing
11:50 - preparing a subroutine for probing
13:44 - gcode for a probe subroutine
21:14 - cutting subroutine, passing arguments
26:05 - adding more to pyvcp
26:52 - a complex HAL example, checking your current motion mode
33:58 - where are HAL components stored? (find undocumented components)
37:06 - putting these components together
37:58 - wrap-up


LinuxCNC HAL #7: plasma cutter manual THC
Topic index:
00:00 - intro, what makes torch height control special
03:18 - demo
05:17 - thcud bugs
06:59 - changes to our steppers HAL in order to use thcud
09:32 - alternatives to thcud
13:27 - HAL for thcud
20:32 - wrap-up


LinuxCNC HAL #8: inside a component, fixing thcud
Topic index:
00:00 - intro, why would you want to write a real time component
01:33 - all the components, ko's, comp's, and getting the code
04:00 - digging into the LinuxCNC source
05:25 - looking at and2.comp
08:05 - the main part of the comp, how it's like Arduino code
09:50 - redoing the messy ohmic probing HAL in a single line of a comp
11:10 - compiling and installing a comp file
13:44 - looking at thcud.comp, header, and the straightforward bugs
15:07 - the main function
21:43 - the more difficult bug
24:59 - getting the fix, the gist, and fucking lawyers
26:46 - the fix applied
27:29 - wrap-up


LinuxCNC HAL #9: overview, halscope, final thcud
Topic index:
00:00 - intro, rundown of everything we've learned
02:52 - halcmd, for interactively issuing HAL as you build your configs
03:52 - debugging with halmeter
04:17 - advanced debugging with halscope
08:53 - going through the THC HAL and pyvcp
17:03 - a look at the physical board
19:20 - test with bad THC firmware, and halscope evaluation
21:12 - for fuck's sake
21:42 - test with the good THC firmware
22:36 - contributions from you
23:45 - upcoming stuff
The following user(s) said Thank You: phillc54, tommylight, Clive S, Plasmaguy, thefabricator03, CNCFred, Sadmeatball

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

More
23 Feb 2020 09:36 #158286 by tommylight
Very nice, indeed ! Thank you.

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

More
23 Feb 2020 10:11 #158288 by Clive S
Brilliant, this will be very useful :)

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

More
23 Feb 2020 10:43 #158290 by tommylight
Made it a sticky.
Adding a link to plasma section and making that a sticky.
The following user(s) said Thank You: swolebro

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

More
14 Mar 2020 17:41 - 14 Mar 2020 17:42 #160197 by CNCFred
Thank you for:
introducing git !! saved me from a lot of work after destroying configs :-)
some of the how to use Linux basics (learned new stuff which makes things easier)
great OR and AND examples (advanced stuff I would say)
and your time and effort !!
Last edit: 14 Mar 2020 17:42 by CNCFred.

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

More
28 Jan 2021 17:37 #196976 by freemoore
Stumbled on your youtube channel before I saw you here. Much appreciated; your intro to working efficiently in linux (particularly to using git) taught me about as much again as I've managed to pick up hacking blindly at it for several years. Great stuff.

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

Time to create page: 0.090 seconds
Powered by Kunena Forum