Search found 41 matches

by amowry
Thu Jul 23, 2020 4:27 am
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Re: Change laser power based on feedrate?

Okay, thanks Tom! I may try a few options and see what works best.
by amowry
Tue Jul 21, 2020 3:41 pm
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Re: Change laser power based on feedrate?

I guess my thinking is this: Typically my G code will have a single feed rate for cuts (F word) and a single spindle speed (S word, in this case representing laser power) that is optimized for that feed rate and a particular material. So, all is well when the machine has fully accelerated to that fe...
by amowry
Mon Jul 20, 2020 9:35 pm
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Re: Change laser power based on feedrate?

Okay, thanks, I understand all that except where you said "compute the desired Power based on S Word Power", does that refer to the spindle speed that has been stored in a persist variable by the S action? If I wanted to calculate the current velocity as a percentage of the feedrate commanded by the...
by amowry
Mon Jul 20, 2020 9:12 pm
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Re: Change laser power based on feedrate?

Also, is it possible to get the current commanded feed rate? it probably makes sense to monitor actual velocity as a percentage of the commanded feed rate, and reduce laser power proportionally.
by amowry
Mon Jul 20, 2020 9:04 pm
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Re: Change laser power based on feedrate?

Sorry, if it wasn't clear, when I mentioned spindle speed I was referring to PWM/laser power in this case.
by amowry
Mon Jul 20, 2020 9:03 pm
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Re: Change laser power based on feedrate?

Oh, great, thanks! I hadn't seen that example. That looks easier than I expected. Would a reasonable approach be to add a similar for(;;) loop to my existing spindle speed program, which gets compiled/downloaded/run when it receives an M Code with the spindle speed? The program would set the initial...
by amowry
Mon Jul 20, 2020 7:54 pm
Forum: C Programs
Topic: Change laser power based on feedrate?
Replies: 10
Views: 446

Change laser power based on feedrate?

After experimenting with vector laser engraving a little bit, I think it would be ideal to be able to vary the laser power based on velocity, because otherwise as the machine decelerates around curves the laser burns deeper, with wider line width. Has anyone done something like this? Is there a meth...
by amowry
Fri Jul 17, 2020 11:41 pm
Forum: C Programs
Topic: Setting PWM prescale
Replies: 20
Views: 553

Re: Setting PWM prescale

I moved the serial code to the driver program and reflashed it, and all seems to be working great now. Thanks again for all your help. I must say, although K2 made some mistakes in terms of documentation and customer service (lack of both) I think they made a great decision choosing KFLOP, and I rea...
by amowry
Fri Jul 17, 2020 7:26 pm
Forum: C Programs
Topic: Setting PWM prescale
Replies: 20
Views: 553

Re: Setting PWM prescale

Thanks Tom-- I've attached the CallBack Servo.c file that is included in the driver program. That program, K2MC_driver.c, is the only thing flashed (thread 6, which runs at startup). Then, when I open KMotionCNC I run the K2_Init Servo.c program on thread 1. I don't want to waste your time looking t...
by amowry
Fri Jul 17, 2020 6:27 pm
Forum: C Programs
Topic: Setting PWM prescale
Replies: 20
Views: 553

Re: Setting PWM prescale

One thing that is confusing to me is that the K2MC_driver.c program, which is flashed to KFLOP and runs at startup, includes a program called Init_Servo.c, which in turn has a function called init_board();. The driver program appears to call that function. The program that initializes the servos, wh...