[Grbl_Esp32 Issue#273] Laser PWM

未分类 bolang 4个月前 (10-14) 39次浏览

Issue #273 | 状态: 已关闭 | 作者: AndyLuz | 创建时间: 2019-10-30

标签: enhancement


Hello
Would it be possible to implement PWM frequency setting for lasers like grbl-LPC
$33? It would be very useful to be able to change the frequency without recompiling the firmware.

Also thank you for great job..


评论 (7)

#1 – bdring 于 2019-10-30

Do you have a link to the documentation on those settings.


#2 – AndyLuz 于 2019-10-30

https://github.com/gnea/grbl-LPC/blob/master/README.md
Under ‘New configuration settings’ you can se $33 for setting PWM frequency.


#3 – bdring 于 2019-10-30

I will look into it. Can you give the variable types for all those values.

Float, int8, int16, etc.


#4 – bdring 于 2019-10-31

Found the information myself. Your link got me close to it….all floats

New configuration settings

$33 is PWM frequency in Hz
$34 is PWM off value in %
$35 is PWM min value in %
$36 is PWM max value in %
$140, $141, $142 are X, Y, Z current (amps)

C++
typedef struct {
// Axis settings
float stepspermm[N_AXIS];
float maxrate[NAXIS];
float acceleration[N_AXIS];
float maxtravel[NAXIS];
float current[N_AXIS];

// Remaining Grbl settings
uint8t pulsemicroseconds;
uint8t stepinvert_mask;
uint8t dirinvert_mask;
uint8t stepperidlelocktime; // If max value 255, steppers do not disable.
uint8t statusreport_mask; // Mask to indicate desired report data.
float junction_deviation;
float arc_tolerance;

float spindlepwmfreq; // Hz
float spindlepwmoff_value; // Percent
float spindlepwmmin_value; // Percent
float spindlepwmmax_value; // Percent
float rpm_max;
float rpm_min;

uint8_t flags; // Contains default boolean settings

uint8t homingdir_mask;
float homingfeedrate;
float homingseekrate;
uint16t homingdebounce_delay;
float homing_pulloff;
} settings_t;


#5 – bdring 于 2019-10-31

I think I will have a way to turn off display of those settings. like…

C++
#define SHOWEXTENDEDSETTING

I am afraid it will break some senders. Non robust GCode senders generate a lot of support questions.

The default will be off. You could send $33=5000 to set PWM frequency in Hz in any mode, but $$ will only show the original settings.


#6 – bdring 于 2019-11-03

This is complete and on the master branch


#7 – AndyLuz 于 2019-11-12

Wow
Sorry for late reply. My computer crashed… That was fast. I will test this on my CO2 laser as soon as possible.


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/273

喜欢 (0)