Author Topic: GCode Command to lock rails in between steps  (Read 154 times)

Troth530

  • Newbie
  • *
  • Posts: 14
    • View Profile
GCode Command to lock rails in between steps
« on: December 28, 2018, 03:34:55 PM »
My engravings have a canvas effect and I think it's related to the detents of the stepper motors.  When approaching the detent it will roll a little forward, then it seems to slip a little back, the result is a canvas effect. 

Is there a gcode command to keep the rails energized.  I'm aware of the "Hold Position" in the advanced menu, but I need to do it in gcode as I'm sending the gcode from another program.


Also, is there a recommended method to tension the G2 belts of an Eleksmaker A3?

Thanks!

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2531
    • View Profile
Re: GCode Command to lock rails in between steps
« Reply #1 on: December 28, 2018, 04:19:04 PM »
It might help if you posted a picture of the problem and have first tried some of the more primitive test patterns. If you are etching from gcode it may help if you posted the source file.

Most of the machines I am familiar with use a micro-step of 16. This mode has the least holding torque.

Which controller and stepper motor driver boards do you have? Which version of firmware?
SARCASM - Just one more service we offer here.

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6397
    • View Profile
    • T2Laser
Re: GCode Command to lock rails in between steps
« Reply #2 on: December 28, 2018, 04:28:16 PM »
No, there is not a G-code command that keeps the motors active. It is usually a function of the controller.

I highly doubt this is the issue as the steppers stay energized while running the G-code. They only “sleep” after no valid inputs on any axis for a few hundred milliseconds.

You are generating the G-code with T2Laser and have an Eleks, why are you not using it to control the machine? (just curious)

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2531
    • View Profile
Re: GCode Command to lock rails in between steps
« Reply #3 on: December 28, 2018, 04:50:44 PM »
I think there is a user parameter to set the hold time. The if you have the dwell time set longer it may be an issue. Even after finishing the burn and releasing the hold I do not notice and change in carriage position.
SARCASM - Just one more service we offer here.

Troth530

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: GCode Command to lock rails in between steps
« Reply #4 on: December 28, 2018, 10:59:24 PM »
Hi guys, I'm using grbl 1.1f on an Mana SE controller.  I get the canvas effect even on a test pattern and I'm sure it's not aliasing or any other phenomenon.  I just increased Vref on the TMC 2130 drivers and increased the engraving speed and it seems to have improved quite a bit.  I had set Y to 0.8V and X to about 0.4V, but basically doubled it.  Motors are not getting hot and the drivers have heatsinks and I'm blowing a fan across them.


With the default setting of 16 microsteps we're using 80 microsteps/mm which means each microstep = 0.012mm.  I have upgraded optics and even then I'm only able to get a spot size at about 0.1mm.  So if it is a torque thing, then moving to 8microsteps still is well within the resolution requirements. 

I'll post some pictures later, but right now I've moved the machine and improved its base, so still working on getting the focus correct.

Thanks.

Lob0426

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1627
  • Let the Magic Blue Smoke out!
    • View Profile
    • Richards RasPi Web Server
Re: GCode Command to lock rails in between steps
« Reply #5 on: January 01, 2019, 06:51:19 PM »
grbl parameters
$1=25 to $1=255
That will lock the steppers. This can cause your steppers to overheat if they are not set properly. And if it sits too long with power on they can get warm too.

https://github.com/gnea/grbl/wiki/Grbl-v1.1-Configuration
Richard
A5 2.5W w/homing switches on L7
A5 2W diode self upgraded from stock 500mw
Printrbot Play. Ext bed, integrated tablet control.
Printrbot Simple Metal
USA

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6397
    • View Profile
    • T2Laser
Re: GCode Command to lock rails in between steps
« Reply #6 on: January 02, 2019, 04:02:22 AM »
That's what hold position does in the menu, he was looking for a G-code solution to lock/unlock which isn't possible.

Troth530

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: GCode Command to lock rails in between steps
« Reply #7 on: January 03, 2019, 10:49:20 PM »
Zax, correct I was looking for G-code soltn.  BTW, can people stream $ settings in a G-code file or does that require real time sending through the console.  Also in general my understanding is that $ settings are stored in EEprom meaning there is a finite program/erase cycles (10k to 100k cycles).
Tim

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6397
    • View Profile
    • T2Laser
Re: GCode Command to lock rails in between steps
« Reply #8 on: January 04, 2019, 04:12:55 AM »
I don't think you can add $ commands in the G-code, and it wouldn't be a good idea as the sender could be confused by the responses.

Yes, the memory has a finite amount of writes - usually it's high enough not to be a problem but these latest Chinese clones are having a lot of memory problems.

Troth530

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: GCode Command to lock rails in between steps
« Reply #9 on: January 04, 2019, 08:39:40 AM »
ok, thanks for clarifying.  I think I need to go back and adjust Vref for the steppers, then use the $1 command.    I'm using the TMC2130 and I think Vref=Imax so I need to set 0.4A (or 0.4V) for X and 0.8A (or 0.8V) for Y. 

Do you know if $1=100 is helpful (i.e. something below 255), not clear how they implemented this command.
Thanks,
Tim