A Progressing and Working Setup

More
07 Jan 2016 01:37 - 20 Jan 2016 22:10 #67998 by wl888
One Man’s way to set up Linuxcnc

Revision Log
Section1 07/01/2016 Main install and setup. with 2 custom buttons.
Section 2 19/01/2016 Custom buttons revised and extras added using oCode
Section 3 21/01/2016 Cleaned up some script and added a few more buttons. section 2 files replaced with updated ones.

This is a good place to start
forum.linuxcnc.org/forum/index

I am posting this to give back just a little for all the support I have received.

Section 1

Firstly, I make NO claims to originality or, at time of writing, knowledge of Linux, everything below is a result of many hours researching on the web and inquiries made on the forums. I would like to thank all the people who have freely added their information to enable people like myself, to be able to use this software, particularly the Moderators and Members of this forum….Andypugh, Cncbasher, Geoffs and Rickg, without whose help would not have made it so far.

What follows is a series of steps and mods that I used to get my setup working, all in one location, it is not a how to on building the machine, plenty of that else ware.

From entering the Forum to the point of writing this has been 7 days, I came in as a total nube with no knowledge of Linux at all, but with some CNC (Mach3) and some programming experience behind me. I state this, not to brag, but to give fellow Nubes some hope.

Be aware, as with any software, there is a learning curve you will have to go through. This will not only involve the cnc software operation but also may involve the scripting language, but don’t be put off by this as with a bit of patience and help you will be able to pick this up and can make it through.

The Hardware:
Generic DIY 3 axis mill with milling head and laser attachments (3W blue diode)
Software:
Linuxcnc Wheezy 2.7.3 with some mods added.
Method:
Download and install latest version of Linuxcnc from the web, There are instructions on installing here
linuxcnc.org/docs/2.7/html/getting-start...etting-linuxcnc.html
There are option for this, read carefully, once installed I downloaded and installed the system updates, these included the latest version of Linuxcnc 2.7.3, don’t forget to run the Latency test, this will tell you if your computer is capable of running the software effectively, once installed, follow the configuring instructions to set up your machine.

NB: Learn from my mistakes…MAKE A BACKUP OF ALL YOUR CONFIG FILES AND KEEP THEM IN A SEPARATE FOLDER…why, because if you stuff something up you can copy them back and start over. I now keep a separate backup copy after each successful modification.

Using the software
There is a mass of Utube videos and other entries out there, I encourage you to invest some time on these as it will make your progress easier. If you intend to use any mods that are out there just make sure the information is relevant to your version of the software as there have been many changes over the years .

Some early challengers I faced:-
Setup wizard: pretty straight forward, some points I had challenges with:- Printer Port, a “0” in this box will connect to the on board printer port automatically, I had a add in LPT card on my first computer, gave me no end of trouble, went to a box with a built-in LPT, worked straight up. That being said, there are ways to configure an add-on card, see the web. Thanks Geoffs (If your parallel port is a PCI plugin card, then you can get the address of the I/O using the command:

lspci -v

Check here:
forum.linuxcnc.org/forum/49-basic-config...t-card-address# )
.
I assigned “Digital outputs” to run my Laser and also will be using one to run a (I hope) A Red Dot Laser for assistance with work head location, for this there were entries that had to be made in the laser.hal file that I had to add manually as it wasn’t part of my initial set up. Thanks to Rick G for the following:-
Info on hal and LPT can be found here and elseware
linuxcnc.org/docs/2.5/html/hal/basic_hal.html

You may also look here at parallel port index...
linuxcnc.org/docs/html/hal/parallel-port.html

Also found this on homing that was helpful :
linuxcnc.org/docs/html/config/ini-homing.html

NB: if you change the sign on the velocity setting in the .ini file, it will change the axis direction. (This would normally be done during setup.)

The Estop took some understanding, but with some help got it to work. Thanks to CNCbasher for this :- (do you have a estop , linuxcnc expects a estop pin to ground under normal use , and open for the estop condition. I think you have a few pins that need inverting by what you are saying .
most io pins are normaly open and close situations , but the estop is the only one that expects a closed circuit)


Then turn the Machine on, top Left, second button.

Next press “HOME ALL” button and start using the machine. Some tuning will probably be required, I now do this directly into the files themselves, but you can use the configwizard to adjust your settings, just be aware that some files will be modified each time you do this.

From here on notes relate to Mods I have made to the standard setup.
Adding a Probe for Zero setting of the Z Axis on the work surface
I like to work from the surface of my material, as such +Z is up and –Z is down, to accurately do this a Touch Probe is required. Basically a ground wire is connected to the cutting tip and a plate with a positive supply is placed under it, when the two touch the machine goes through a series of steps resulting in a zeroed tool. There are many ways to do this, choose one. See the following for the version I used :
forscience.nl/?cat=8
Parts 1 and 2 are relevant. At this time it is probably important to note that I am using METRIC settings and that a lot of what is out there is in IMPERIAL, don’t forget to convert and adjust where necessary, otherwise some very interesting/dangerous results can happen.
• Operating the Laser
My laser is, at this stage set up to cut/engrave at a single power intensity with variations in the F… part of the Gcode to change cutting depth as a factor of feedrate. It is good for “vector” cutting and simple engraving work but not yet for “raster” art.

Thanks to Andypugh for direction on this:
Andypugh: If you are not looking to do raster engraving then look at the M62. M63 and M67 commands.
Me: Is it really that simple..just edit the gcode to incorporate :

M62 P- - turn on digital output synchronized with motion. The P- word specifies the digital output number.

M63 P- - turn off digital output synchronized with motion. The P- word specifies the digital output number.

M64 P- - turn on digital output immediately. The P- word specifies the digital output number.

M65 P- - turn off digital output immediately. The P- word specifies the digital output number.

Just edit the -Z +Z entries out for the appropriate M code

while having the correct digital output linked to laser trigger pin in the initial setup.

Depth of cut would be controlled by feed rate F100 etc.
from the other posts it seemed more complex, but yes, they mainly talked about raster engraving.


(Sometime I overlooked the obvious for the complex.)

I am using the following settings in my code: M3/M5 as trigger and Coolant-flood M8/M9 as safety interlock.

As I mentioned before there is a multitude of info out there, look and learn, people are helpful but it’s up to you .

This is where I am up to at this stage. Further plans include:
• Finishing the mods for the Red Dot location laser.
• Working out how to use the PWM or other function to control the laser intensity better (this may take some time)
• Incorporate a short pulse signal button for the laser trigger at reduced power.
• Replace my DIY control boards with pre-built components.(I will be using some Arduino boards and linking straight to the new Printer breakout board. This is similar to my DIY.

As I said at the beginning I am just a Nube at this and do not profess to have all the answers, this is just what I did to get up and running. As I make more progress I will update this post. Good luck and check everything first for compatibility with your individual requirements.

The links are currently active, some just didn't go blue??? :huh:

Copies of all my files are attached.
I hope this helps You, it’s not all the answers, but it’s a start. :cheer:

Section 2
Ok ..customladder proved to be too complicated, I did receive a lot of help and guidance while attempting this approach, but we hit a brick wall. I had read in one of the posts a way of scripting Gcode to react to a custom button using Ocode, so i did some more research and within an hour had the 4 buttons up and running with multiple actions under each.
Customladder may be a better way of doing this but i just needed a working button and with my limited understanding on Linux code, this was the best way for me.
Thanks to those who put the oCode info and examples up.
Button Summary:
Z Touch off
Laser move to required offset
Mill move to required offset
Turn ON Red dot laser for targeting

Next step is to pretty the GUI up via Glade....we'll see how that goes.

I have attached all files for those who are interested.
NB: you will need to place the ngc files into you NC folder and make any other adjustments such as path and axis settings to suit your setup.
Check everything before you use on your machine.

Section 3
Cleaned out some unused script and added some more buttons, didn't bother with Glade as the format works for me and looks OK.
Have replaced the section 2 files with updated ones.
This is the last update unless i find something i stuffed up, but at this time it all works on my machine. :cheer:
Attachments:
Last edit: 20 Jan 2016 22:10 by wl888. Reason: Updated history and added updated file folder

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

Time to create page: 0.183 seconds
Powered by Kunena Forum