Replies: 4 comments
-
Hi @schrec, Sorry for the late reply, I'm traveling very far from home. Have you tried to invert the $33 and $34 values? @++; |
Beta Was this translation helpful? Give feedback.
-
Yes I tried that and it didn’t make any difference. It is a zbaitu f20-vf. For now I just created a conversion sheet and correct the code before running. Thanks for your response. I appreciate it SchrecOn Jul 24, 2024, at 4:46 AM, Gauthier Brière ***@***.***> wrote:
Hi @schrec,
Sorry for the late reply, I'm traveling very far from home.
I suppose than you have enabled the #define SEPARATE_SPINDLE_LASER_PIN line in config.h to use spindle on D8 and laser pin on D9.
So, the max and min laser values are defined by (respectivelly) the $33 and $34 settings codes (sorry, the wiki is not up to date for those settings).
Have you tried to invert the $33 and $34 values?
@++;
Gauthier.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Oh, my mystake ! Effectively, the laser power management code is written considering that the power must be managed linearly from the smallest value S which corresponds to the smallest power of the laser towards the largest value S which corresponds to the highest power of the laser. The code that handles laser power is located in the spindle_control.c file, between lines 213 and 235. Since I'm not at home, I can't try this, tell me if you can do it by yourself and if it work. @++; |
Beta Was this translation helpful? Give feedback.
-
Thank you so much. Not able to get to my machine until the weekend but I will give it a try. Thanks again!!On Jul 24, 2024, at 1:22 PM, Gauthier Brière ***@***.***> wrote:
Oh, my mystake !
Effectively, the laser power management code is written considering that the power must be managed linearly from the smallest value S which corresponds to the smallest power of the laser towards the largest value S which corresponds to the highest power of the laser.
It's strange that your laser driver doesn't work like this...
The code that handles laser power is located in the spindle_control.c file, between lines 213 and 235.
If you want, you must be able to modify the management conditions of the max power (line 216 to 220) and the min power (line 220 to 228), the correction to then apply to have an inverted PWM output value could be to add (after line No. 232 which calculates the intermediate value between LASER_PWM_MAX_VALUE and LASER_PWM_MIN_VALUE) the line:
pwm_value = LASER_PWM_MAX_VALUE - pwm_value
Since I'm not at home, I can't try this, tell me if you can do it by yourself and if it work.
@++;
Gauthier.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
My laser is defined on D9. M3s255 the laser is off, m3s10 the laser is on full power. My spindle output is on D8 and woks correctly. How can i invert just pin D9? Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions