How to run gcode on a machine without Z-axis?

More
22 Jun 2012 03:38 #21186 by Cree
good day,

first post from me here, so hello!

i have done quite some reading on these forums and in the manual, but i just can not find the information i need.
i have built a laser engraver. the machine (minus the laser unit) is complete, and does work very well when i manually jog the axis with the cursor keys.

HOWEVER: my setup does not have a Z axis, as i will be using the laser to engrave even surfaces (focussing will be done manually, if necessary).
i have gaffa-taped a pen to the Y axis, this allows me to draw on paper. now i would like to run the demo gcode (the emc2 logo).

X and Y axis go through proper homing routines, the Z axis of course does not - it is nonexistent and thus completely unconfigured.
when i try to run the gcode, linuxcnc will give me an error message saying something like "can not execute program without homing" (i have a german install, so this is not the exact wording of the message... but i think you get the drift).

how do i steer around that problem? how do i have to change my configuration? i have a feeling that this is a basic obstacle that lots of people must have overcome. thanks for your help!

christian

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

More
22 Jun 2012 07:52 #21189 by ArcEye
Hi

I have to assume that you have made a configuration through stepconf, which has resulted in a X, Y , Z configuration
(stepconf will only make XZ , XYZ and XYZA configs by default)

You just need to remove the stuff related to the Z axis.
Rather than try to talk someone completely new to Linuxcnc through that, attach a zip of your entire config folder for your machine and I will edit them.

For now all you have to do is select the Z axis you don't actually have, home it and them forget about it thereafter.

regards

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

More
22 Jun 2012 08:27 #21190 by Cree
thank you for the quick reply.
i am writing this from a different computer, so i can not attach the files requestet at the moment.

yes, configuration was made with stepconf.
homing Z and then forgetting about it was my idea too, but i got the same error message. i assume this is because the software expects feedback from a homing switch.
the Z axis does not get the "homed" mark next to it, no matter what i do. X and Y do get the mark immediately after homing (which is great - worked first time!).
i will try again when i get back to the workshop.

christian

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

More
22 Jun 2012 10:23 #21191 by ArcEye
OK I'll check again later

homing Z and then forgetting about it was my idea too, but i got the same error message. i assume this is because the software expects feedback from a homing switch.

I assume you must have HOME_LATCH_VEL or HOME_SEARCH_VEL set to non zero, or it should just home when clicked, but all will be revealed soon no doubt.

regards

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

More
24 Jun 2012 10:40 #21246 by ArcEye
Hi

Assume you are trying to figure it out yourself, always a good way to learn.

If you need a clue, I created a test config from stepconf and converted it to a working XY only config in about 2 minutes, so its quite simple.

[TRAJ]
AXES=2
COORDINATES = X Y
and delete
[AXIS_2]
about does it for the .ini file

.hal file
Change
loadrt stepgen step_type=0,0,0
to
loadrt stepgen step_type=0,0
Comment out
loadrt pwmgen output_type=0
and every reference to pwm , spindle and z axis thereafter
(assume you are not using spindle for something else)

regards

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

More
25 Jun 2012 17:10 #21311 by Cree
ArcEye,

thank you for your efforts.
I did not have as much time on my hands as I would have liked to, but I managed to spend about an hour on the machine.
Creating a new configuration with stepconf got rid of the "infinite homing" problem - so now I just had to home Z and then I could finally run the gcode.
Quite a view to see the machine do something useful for the first time!

I will edit the file to get rid of the Z-axis - so thanks again for pointing out what parts need to go!

One thing though: as I intend to use the machine with a laser I will inevitably have to decide how I want to turn that thing on/off. Should I maybee keep
the Z-axis for that purpose? I am aware that this is a new topic altogether and will make a new post accordingly, when the time comes.

Christian

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

More
25 Jun 2012 19:27 #21319 by andypugh
Cree wrote:

One thing though: as I intend to use the machine with a laser I will inevitably have to decide how I want to turn that thing on/off. Should I maybee keep
the Z-axis for that purpose?

No, because acceleration limits on the phantom Z axis cause the motion in the other directions to stutter.
M67 ought to work better.
www.linuxcnc.org/docs/html/gcode/m-code....ec:M67-Analog-Output

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

More
25 Jun 2012 22:24 #21325 by Cree
I have edited the .ini and .hal to include only 2 axes.
However, when I try to open a .ngc I will get an error message saying "[...] Bad character z used" - which makes sense, since the gcode files will have instructions for the z axis in them.

Now, do I a) learn how to make .ngc files without any Z-axis information (I am using Inkscape and the gcodetools plugin),
OR do I just get used to having to home my phantom Z axis every time?
I can generate my .ngc to have a Z travel of 0.1mm, which should not slow things down too much...

Thanks, Christian

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

More
26 Jun 2012 09:51 - 26 Jun 2012 09:51 #21340 by ArcEye
Hi

As Andy said, I would not have an axis that doesn't do anything, no point, never mind any other issues.
Presumably even 0.1mm will have some effect on laser focus.

If you cannot set your CAM package to have a Safe Z and working Z of the same height so that it does not bother generating the commands, you will probably need to write a post processor script to remove the references to Z moves.

If they are all on separate lines it would be very easy, but even if all mixed in with other code, once the formatting is known should be quite simple to remove with sed or similar.

I very seldom use CAM (save occasional image2gcode for engraving) but I am sure others will be able to point you in the right direction.

regards
Last edit: 26 Jun 2012 09:51 by ArcEye.

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

More
26 Jun 2012 09:55 #21341 by andypugh
ArcEye wrote:

If they are all on separate lines it would be very easy, but even if all mixed in with other code, once the formatting is known should be quite simple to remove with sed or similar.

It is also relatively easy to set up LinuxCNC to pass all files through a filter before running them.

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

Time to create page: 0.141 seconds
Powered by Kunena Forum