is it possible to use 10W SM laser in a ‘pulse mode’, on/off with the frequency i set manually?
Not sure what you mean… if you mean the PWM frequency of the laser: That’s coded into the firmware. If you can code a bit, you can change this. If you mean switching the laser on and off in a relatively slow pattern: I could think of ways to achieve this, but perhaps you describe what you want to achieve after all - would make suggestions more to the point.
PWM - this is power amplitude of the laser, and when setting M3 P parameter then we regulating the power of the laser. For ex. if we need 50% we set M3 P50 and PWM (of laser driver) give us this 50% but with very high frequency. But i want to control other frequency. for ex., state ON 10ms (with P50), state OFF 10ms, state ON 10ms, state OFF 10ms)
Its like the intensity of the lamp is regulating by PWM, but i want to regulate blink of this lamp. it’s like cycling of a code (M3 Px, G4 x, M5)
If there is no unique g-code command, maybe there is a possibility to cycle part of g-code somehow?
or if i have to blink with the laser 100x times i have to write 300 strings of the g-code?
there’s one more question. does anybody know the working frequency of this laser (and possibility of changing it - if in firmware - where to check)?
The PWM frequency of the 1.6 W and the 10 W laser is ~100 Hz, the 20/40 W are 5 kHz. I looked into the code quite a while ago and think I found the place, it had a comment in the code to that effect. However, if I run a quick search on the Github repository, I cannot quickly find it, I guess you need to research yourself.
Regarding a slower switch on/off, one way would be to create a dash-line in Inkscape, load it in Luban, then calculate the speed of the movement to give you the right frequency. However, that would mean that the head moves - since you do not explain what your actual goal is, what you want to achieve in the end, I’ve no idea if that’s suitable…
Regading the PWM, I had a bit of contact with support, I’ll put the thread below:
I am interested in the 20W or 40W laser module. Can you say which PWM frequency these modules use? In my experience this matters for the quality of the engraving results.
Thanks for any Information!
The PWM frequency that the 20W/40W Laser Module used is 5Khz.
Is this something special to the 20/40W laser module, or will the firmware of Snapmaker 2.0 be updated to support 5 kHz also for the 10 and 1.6 W modules? Which would be highly appreciated!
Yes, this is special for 20/40W laser modules. 10W and 1.6W modules have relatively large hardware filter parameters, so they cannot support higher PWM frequencies.
I’ve difficulties to believe that there’s any filter involved, so I’d actually give it a try…
I guess you are looking for greyscale dot mode in Luban.
Dwell time would be the setting to play with.
I don’t know a other possibility…
thanx for answers.
my goal is to heat to 300 C Deg of 1mm sphere of metal. the laser head should not move. i need pulse on/off of the laser with some rest time. the less time of the pulse is better → because of gauss curve of heating. but i need a lot of pulses.
and how to change 10W laser to higher frequency?
Hmmm… not sure why you need pulses, I mean, if you want to heat it up, full steam ahead
That said, I guess your fastest way to success might be to write GCode yourself - what you want to achieve is not very complicated. If you specify things like pulse frequency, duty cycle and total length of laser time, I might assist you.
thus, it’s impossible to heat the sphere evenly - the outer shell will burn, and the inner part will not reach the desired temperature. writing the code - ok, i’m already experimenting, this isn’t simple.
the question was: is it possible to create cyclicity in the g-code itself without writing 100 lines of the same sequence of commands?
No and yes. You can’t in a file - you indeed would need to copy the same lines over and over (at least I am not aware of any procedural statements in GCode). What you could do is write a small script that sends GCode via serial interface to the Snapmaker - that might be the easier road here.
G-code can be done in a text editor or a word processor. Either should be able to do copy and paste. Do one line of code, copy and paste. Copy the two lines and you have 4. Copy 4 and paste, you have 8. Etc until you get as many lines as you need. Seven copy and pastes gives you 128 lines quickly . There are ways to write a macro or vba code to do one line into many, but unless you need to redo that more than once or twice, copy and paste is the easiest way.