Welcome! Log In Create A New Profile


Bug in Marlin command G92

Posted by Kimi 
Bug in Marlin command G92
February 22, 2014 05:13PM
When you give the command G92 X0 Y0 Z0, current position should be the new zeropoint.
When you give the command G01 X0 Y0 Z0, nothing should happen, but the sled picks the position from the bed
ee-prom cordinates.
If you have the lower left as x0 y0, you have no issues, because it will add 0. But if you change in the eeprom so that the lower left is x0 y-90, you get errors.

G0 X0 Y0, moves to position that is ok, about middle of the bed in y direction, now when you give G92 x0 y0 nothing should change.
Then you give the command G0 X0 Y0, and the bed will move 90 mm along the y-axis.
Here I think the bug is.
case 92: // G92
for(int8_t i=0; i < NUM_AXIS; i++) {
if(code_seen(axis_codes)) {
if(i == E_AXIS) {
current_position = code_value();
else {
current_position = code_value()+add_homeing; <---------------- add_homing should be removed.
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);

I'm using my K8200 also to mill PCB cards. The negative values is needed because when you mirror the pcb, you get negative values from eagle PCB-Gcode.
My system works fine, but I think this is a bug needed to be fixed. With current setup I must move the bed by hand to the pcb boards corner and the G92 command is useless.

Re: Bug in Marlin command G92
March 11, 2014 02:31PM
Was actually about to create a post on almost the same thing, as I just stumbeled upon it when looking at the code, looking for another problem.

Homeing offsets shouldn't be added to G92, my problem is however that with auto bed leveling, homeing offsets doesn't gets added.

Anyway I had the same problem as you with negative coordinates and PCB milling, I found that there are 2 workarounds, besides modifying the code.
For both workarounds you'll need to set all your homeing offsets to 0, in order to get G92 to work as expected.

Then either:
Disable minimum software endstops:
#define min_software_endstops false
In Configuration.h, this will allow you to move to negetive positions.

Move the BCB in Eagle, so all coordinates are negative, this way they will be positive, when the board is mirrored, but this will only work for singlesided boards.
Sorry, only registered users may post in this forum.

Click here to login