Installing PLASMAC - Another Plasma Component
The plasmac manual is now available here: linuxcnc.org/docs/devel/html/plasma/plasmac-user-guide.html
Only read on if you would like to install from source but instead, just install master branch from source as plasmac is now included.
This configuration will allow installation of a full featured Plasma control using LInuxcnc for any hardware or any THC:
Any Hardware: Parallel port / Mesa /your hardware. You name it
Any THC: Mesa THCAD plasma voltage reader internal to Linuxcnc, Proma 150 or any other external THC with UP/Down signals
One day this will become part of the mainstream distribution but for now there is a bit of work to get it going but it will be worth it as this will rival any commercial software on the market!
Join myself Tommylight, Islander261 and others who have thrown out hundreds if not thousands of hours of our own development effort to get behind the Plasmac config developed by master coder PhillC who has picked the eyes out of the work we've done and put it all together into a complete cohesive simple to install config on several of your favourite LinuxCNC GUI interfaces,
So lets get started!
See this thread for the development of this system:
This post will get you up and running with the plasmac simulator and a further post will document my experience getting it to run on a live machine.
The first step is to be able to install linuxcnc master branch from source. Really this is pretty easy once you get all of the dependencies installed. The process is described in the docs here:
Its been quite a few months since I have built my system from source so i found I got an error about yapps being missing. I guess it must have been added since I last compiled. This command fixed it
plasma@plasma ~ $ sudo apt_get install yapps2
If you are starting from scratch, thefabricator03 says, this is a useful list of dependencies
libudev-dev libmodbus-dev libusb-1.0-0-dev libgtk2.0-dev yapps2 Intltool tcl-dev tk-dev bwidget libtk-img tclx libreadline-gplv2-dev python-tk libboost-python-dev freeglut3-dev libxmu-dev python-glade2 python-gnome2 python-gtkglext1 python-gtksourceview2
You should be able to install all of these with the one
sudo apt-get install ...
We are really only doing this so we can confirm that everything is working. If you run into problems up until this point, please ask elsewhere on the forum as building linuxcnc is out of scope of this thread.
So then it is just a matter of following these commands which will install Phills Plasmac branch into a folder called ~/plasmac (where the ~ symbol is linux shorthand for your home directory).
Lets get going!
If you have got this far, you can ignore this step as if you have installed master branch you have a copy of Plasmac already installed on your PC, but if you wish to install from the master branch source, read on
From a terminal window opened in your home directory (~). Note in this example my machine name iis plasma and my user name is also plasma!
plasma@plasma ~ $ git clone https://github.com//phillc54/linuxcnc-plasmac plasmac plasma@plasma ~ $ cd plasmac/src plasma@plasma ~/plasmac/src $ ./autogen.sh plasma@plasma ~/plasmac/src $ ./configure --with-realtime=uspace plasma@plasma ~ $ make plasma@plasma ~/plasmac/src $ sudo make setuid [sudo] password for plasma: plasma@plasma ~/plasmac/src $cd .. plasma@plasma ~/plasmac $ plasma@plasma ~/plasmac $ . ./scripts/rip-environment plasma@plasma ~/plasmac $ linuxcnc
Thats all there is to it except for the bit where I went and got a coffee while make was churning away!
So this will install the sims Phill has built and you can drill down into one of the many example plasmac configs for say axis GUI.
Then run it!
So we are using rin in place. there is no deb install nor do we want one with a developmental branch like this one. To run linuxcnc, open a new terminal window and type the last two lines.
plasma@plasma ~/plasmac $ . ./scripts/rip-environment plasma@plasma ~/plasmac $ linuxcnc
note that if you leave the window open, you only ever need to run the rip-environment script once
If you have your machine set up on an earlier version of Linuxcnc, you have a bit more work to do as there are significant differences in configuration of the machine between V 2.7 to V 2.8. There is a conversion program that should sense you've upgraded when you first run your old config. I have never run v 2.7 so can't really guide you. If all else fails, rebuild a working config using stepconf or pncconf and make sure it works before proceeding.
Assuming you want to use the Gmoccapy SIM as a base, open a file browser window and navigate to
Right click on the plasmac folder and select copy.
So then navigate to the ~/linuxcnc/configs folder and paste it in.
So now if you rerun linuxcnc, the chooser will show you the plasmac machine under the My Configurations Tree. Sweet! now we just need to edit the config files to insert the real config for our hardware and we'll be away. As a first start its useful to copy your existing config files into this new folder so we don't muck up any existing configs
So then I made a copy of the default ini file and renamed it to spaceship_plasma.ini once again checking I could open it and I could!
So the next thing to do is to carefully review your existing working ini file and paste in the relevant sections from my existing known good config replacing what was provided. So now all of my step timings etc should be perfect. Once again I checked, it would open and it did!
So now all I have to do is fold in the specific config form my machine into the plasmac hal files. Not looking forward to that as I have a lot in there!
CONTINUED: Well it was pretty painless in the end. If you are using a Mesa THCAD board, I found there were some bugs in the plasmac configuation screen which I'm sure Phill will fix but n the meantime, you might be better off using this component I wrote previously with scaling of 1.0 and an offset of 0. forum.linuxcnc.org/plasma-laser/32585-scalethcad-component Thats what I did.
Set the mode in the ini file to the one that suits you. If you are using a Mesa THCAD card, use mode 1.
# sets the operating mode, if not specified the default is 0 # 0 = use arc-voltage-in for arcOK and THC (no need to connect arc-ok-in, move-up-in and move-down-in) # 1 = use arc-ok-in for arcOK and arc-voltage-in for THC (no need to connect move-up-in and move-down-in) # 2 = use arc-ok-in for arcOK and move-down-in + move-up-in for THC (no need to connect arc-voltage-in) MODE = 1
# this section only required if using the sim testing panel [APPLICATIONS] DELAY = 3 APP = ./test/plasmac_test.py
Swap the comments around in this block. You need to comment out the TCL file and uncomment the line with machine.hal on it so your ini file knows how to load your hal file.
#HALFILE = machine.hal HALFILE = LIB:basic_sim.tcl
Also its worth discussing these settings for the Z axis in the ini filewhich are specific to the external offsets Plasmac uses. I forgot to mention them earlier because I've been using them for so long.
[AXIS_Z] OFFSET_AV_RATIO = 0.5 MAX_VELOCITY = 120 MAX_ACCELERATION = 1400
External offsets was designed that a percentage of velocity and acceleration was devoted to external offsets on the assumption that offsets would be applied while motions was occurring. In the case of plasma standard Z axis motion and external offset motion are mutually exclusive. You are either jogging around or you are cutting. So we want to devote 100% of velocity and acceleration to the Z axis while its under THC control. So by doubling your machine settings and applying a ratio of 0.5 (50%) we actually trick external offsets into using 100% of the axis machine settings for THC control. Cool hey! It did my head in working that out the first time.
Here is my completed ini file for guidance.
File Attachment:File Name: spaceship_...4-29.ini
File Size:9 KB
Create a new file in your config called machine.hal
Copy all of your basic configuration stuff from your existing working file into this file and save it.
Here is a basic example of what your machine.hal might look like (note this file will need renaming).
This file was prepared by Islander261 for JTknives later in this thread. (My hal file has a lot more in it so it would only confuse you if I shared it).
File Attachment:File Name: machine1.hal
File Size:9 KB
Edit plasmac.hal and add your specific pins and signals. I think with the benefit of hindsight, this procedure should be changed and the custom part should be moved into another hal file that is loaded after plasmac.hal. This will make life easier on upgrades. I will come back and revise these instructions once I have done it.
See if you can open the config in Linuxcnc and note any errors.
I found I was already using some of the signals so I had a few errors so I edited the plasmac defaults to use my already defined signals until eventually it opened. Thats it, you are done
Actually a lot easier than I expected!
pl7i92 wrote: Question does this component interfere standard G-code
so no height torch height pierce height needs to be in
Yes thats right. There are several modes you can select from but all the probing happen with a M3 (not that I've got that far yet). It also includes PID based torch height control and auto torch voltage sampling. Phill has incorporated everything people have discovered over the lastcople of years into one repo. A few people have run into problems trying to get this up and running (mainly because it requires compiling a private clone of LinuxCNC) so I decided I'd write a bit of a guide on how to install it while I was installing it on my machine. I have not cut anything with it yet. Its actually been put together very well and is the simplest plasma config I've seen to get up and running.
git pull make sudo make setuid
This usually takes less than a minute as make only compiles what has changed. git pull will pull down any changed files from git.
Now I found that this did not update my working config on ~/linuxcnc/configs/plasmac
so what I did ir rename this folfer to ~/linuxcnc/configs/plasmac1 and copy the sim folder again to be sure I got everything that had changed.
Then all I had to do is to copy over 4 files. machine.hal, plasmac.hal (only becasue I changed it) my .ini file and my .mat file.
We have not talked about that one but there is a text file ending in.mat that you can edit for all of your cut settings for the materials you cut that will then appear in the drop downs. Editing it will be self explanatory when you open it.
Here is a workflow from Islander261 using plasmac and Gmoccappy.
islander261 wrote: Here is my typical work flow as it may help clear things up. Using Gmoccapy in the Plasmac branch.
1.Start terminal session.
2.Set Plasmac RIP environment
3. Start LinuxCNC
4. Pick configuration I want to run
5. Take program out of estop
6. Switch machine on with GUI button
7. Press the Homing button in bottom left corner of GUI
8. Press Home All button in bottom left corner of GUI and wait for homing to finish
9. Press Load Material button on buttons panel and wait for gantry to clear table
10. Place work piece on table and square to table motion using laser crosshairs
11. Jog to work piece origin
12. Press Touch Off button on bottom of GUI (second from left)
13. Press X Set button
14. In popup window set X offset to 0 (should be default choice)
15. Repeat 13 & 14 for Y axis
16. Press return button on bottom right of GUI to clear Touch Off Tab, you should see G54 offset label displayed in DRO
17. Check settings
18. Load program
19. Enable Torch
20. Start program