How to stop spindle 3 mm before end of the line ?
Well not quite, if you delay the motion commands (with a HAL delay comp) you can see "future" motion before the delay
and so look-ahead
Please Log in or Create an account to join the conversation.
thanks in advance
W
Please Log in or Create an account to join the conversation.
would have a circular buffer of N samples (N would be a parameter)
To avoid motion discontinuities at startup , the delay parameter would probably need to be adjusted by
a step per sample time so for example, the initial delay is always 0, and if you set the delay for 100 samples
(100 ms at 1 KHz servo thread) the delay would increase from 0 to 100 one step per sample
(basically following the input data in the buffer)
Please Log in or Create an account to join the conversation.
In two words, we've added path's length to Gcode in Gcodetools (CAM extension for Inkscape).
it was like
(path len XXX.XXXmm)
then we change it with the filter to
M64 P0 (to reset integ)
M68 E0 Q... (to set path length)
M65 P0 (to reset integ's reset)
then we net motion.current-vel with integ's input and put it's output to wcomp with motion.analog-out-00 with sum2 -3mm. Thus wcomp will turn the spindle off 3mm before the path end. But you have to use Gcodetools, or any other CAM that adds trajectory length into Gcode.
Please Log in or Create an account to join the conversation.
thanks to you I'm close to solve the problem. According to NICK's advice I am using inscape's Gecodetools to generate gcode. I replace (path len XXX.XXXmm) into M64 P0,M68E0Q( path length),M65 P0
and move it after G01 (Penetrate).
I did custom.hal to stop pump 3mm before end.It works but there is no delay at the start .I was tring to put G04 P.. after M65 but there is delay of the move ( pump starts when move is beginning). Is there any way to turn on the pump, than set delay , than start the movement of the machine.
Thanks for help
W
Please Log in or Create an account to join the conversation.
If you use synchronised then pin turns on at the time next motion starts. Use immediate M code. Some thing in M 64-67
Please Log in or Create an account to join the conversation.
Thanks
W
Please Log in or Create an account to join the conversation.
M62 P- - turn on digital output synchronized with motion. The P- word specifies the digital output number.
M63 P- - turn off digital output synchronized with motion. The P- word specifies the digital output number.
M64 P- - turn on digital output immediately. The P- word specifies the digital output number.
M65 P- - turn off digital output immediately. The P- word specifies the digital output number.
So
M64 P0
G04 P3.0
G01 x10
Should work. Check it once again.
May be you define g4p3 instead of g4p3.0. In some cnc if you define integer P (with out dot) delay is in micro seconds. I am not sure about how it works in Linuxcnc.
Please Log in or Create an account to join the conversation.
JT
Please Log in or Create an account to join the conversation.
M68 E0 Q323.36218
G4 P0.1
M65 P0
G4 P0.7
G01 X10
(part of my gcode - above I attached custom.hal and sample of gcode)
Spindle is turned on when move starts (G01 X10). G4 works fine I just thinking why pump is off before G04 ( pump is waiting for move)
Please Log in or Create an account to join the conversation.