G28 with laserOn
That sounds a little bit strange, but I use the lasermode for a plotter and laseron=PenUP.
So G28 with penDown is not so good :-)
I changed in commands.cpp:
...
case 28: { //G28 Home all Axis one at a time
#if defined(SUPPORT_LASER) && SUPPORT_LASER
bool oldLaser = LaserDriver::laserOn;
//+++ original LaserDriver::laserOn = false;
LaserDriver::laserOn = true; //home ohne pen
oldLaser= true; //alten zustand setzen
#endif
..
It starts G28 with penUP, but soon penDown (= Laser off) is back.
What else should change?
Or is there a better way to do it? (eg change the homeaxis command with laserOn=true)
So G28 with penDown is not so good :-)
I changed in commands.cpp:
...
case 28: { //G28 Home all Axis one at a time
#if defined(SUPPORT_LASER) && SUPPORT_LASER
bool oldLaser = LaserDriver::laserOn;
//+++ original LaserDriver::laserOn = false;
LaserDriver::laserOn = true; //home ohne pen
oldLaser= true; //alten zustand setzen
#endif
..
It starts G28 with penUP, but soon penDown (= Laser off) is back.
What else should change?
Or is there a better way to do it? (eg change the homeaxis command with laserOn=true)
Comments
regarding homing just invert the laser Signal.
Laser is switched off by Firmware for moves except G1 so it seems you have configured Signal wrong.
In that case go to configuration.h
and Change :
#define LASER_ON_HIGH 1 to #define LASER_ON_HIGH 0 or opposite depending your actual Settings
if you Change commands etc. you should use Event System, makes life easier
The disadvantage is now tht the basic configuration is magnet=on.
So when it moves from G1 to G1 (which would be a continous line) the pen moves shortly up and then comes down again. So on a print the pen jumps back and forth ...
I think I have to stay with LASER_ON_HIGH 1 and better change the G28 command.
Problem you have is that laser is switched off at end of move , what is absolutely correct and wanted by Firmware.
(i guess you just sent single lines for test)
in a flow of several moves you will not have that issue(just write a litte gcode file to see).
to Change this behaviour is a Little more work , but as it´s safety relevant and may be misused by other users
i´ll not support that.
For you i´ll suggest to switch over to cnc mode.
you can handle the pen up/down by M3 /M5 comands and there is nothing changed by Firmware caused by moves.
in CNC mode the spindle always runs.
So my gcode must change: before a penUP comes I add M3 S255 and the first pendown needs M5 (or M3 S0)
correct?
exact.
if you are familiar with HPGL commands the M3 is PD and the M5 is PU
I would not use the M3 S0 , shure it works but not usual in CNC/ Plotter programming.
In my case Power on moves the pen up so that magnet=on means spindle=on means PU=M3 S255.
or did I miss something?
Thanks for your help!
So your are right!
High signal enables spindle (CNC_ENABLE_WITH) that is set 0 then:
pen up: magnet=on means spindle=off(D10 on) means PU=M5
pend down: magnet=off means spindle=on(D10 off) means PU=M3 S255
Wrong.
M3 Enables which means pen down , M5 disables which means Pen up.
set cnc_enable_with to match that.´
if spindle is on when homing send M5 before G28
set it to 0 or 1 , so that M3 (without S...) makes your pen go down and M5 makes it go up.
otherwise you can never run a gcode file generated by a standardized software.
(just meet worldwide used standards )
On the other hand, in my design I need the magnet for PenUp ...
Thanks for your CNC-hint - now it works!
(I wrote my own HPGL-converter, based on that, I came around that M3/M5 issue)
My left issue is to use M3 Sxxx (because the magnet would prefer to get reduced power when the plunger ist in), but this is part of a separate discussion!
Thanks again - your tip was a big help.