- Posts: 273
- Thank you received: 48
[closed] FreeCAD path, strange movement in Z axis
- ikkuh
- Offline
- Elite Member
-
Using FreeCAD and the Path workbench I made some g-code to flatten my spoilboard. But there are strange things happening. Hopefully somebody can explain.
The beginning of the g-code file contains some movement commands for the height.
When I run the program then only the Z6 and Z4 movements are done, not the G1 X-0.100 Y536.751 Z-0.100 F900.000
this works:
No Z movement for the last 2 lines (all the subsequent lines for that matter):
When I run just the line
What am I doing wrong here?
(remove the .txt extension)
Using FreeCAD linkbranch
LinuxCNC 2.9
gmoccapy 3.1.3.1
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
Please Log in or Create an account to join the conversation.
- ikkuh
- Offline
- Elite Member
-
- Posts: 273
- Thank you received: 48
andypugh wrote: At a guess... Spindle at Speed is not being asserted, so the machine waits at the first G1 statement for that to happen.
I searched and found this:
Spindle at speed only inhibits the first cutting motion immediately after a spindle speed command, until the spindle speed is met. After that it is no longer monitored. That is it's designed operation.
forum.linuxcnc.org/38-general-linuxcnc-q...-quite-working#94069
spindle.0.at-speed - (bit, in) Motion will pause until this pin is TRUE, under the following conditions: before the first feed move after each spindle start or speed change; before the start of every chain of spindle-synchronized moves; and if in CSS mode, at every rapid to feed transition. This input can be used to ensure that the spindle is up to speed before starting a cut, or that a lathe spindle in CSS mode has slowed down after a large to small facing pass before starting the next pass at the large diameter. Many VFDs have an at speed output. Otherwise, it is easy to generate this signal with the HAL near component, by comparing requested and actual spindle speeds.
This is really strange. I never had this error before. Was this introduced in a recent LinuxCNC version?
I am using a simple pwm controlled spindle for the moment. It is at speed in under half a second.
The code segment where the PWM commands are given:
Would it be possible to add the following to my custom.hal file?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
If you see the X and Y move but not the Z, then it is something else.
If you don't have anything driving spindle.0.at speed then change
But, as I said, this was just a guess. It could be something else.
Please Log in or Create an account to join the conversation.
- ikkuh
- Offline
- Elite Member
-
- Posts: 273
- Thank you received: 48
andypugh wrote: The problem can only be spindle.0.at-speed if you see _all_ G1 motion paused.
If you see the X and Y move but not the Z, then it is something else.
That's precisly the problem.
All the movements are correct except the Z axis. And then only the G1 movements, the G0 Z axis movements are working ok.
But when I run a 'non-working' G1 line in the MDI then it works. But as part of a gcode file it does not.
andypugh wrote: If you don't have anything driving spindle.0.at speed then change
toCode:net spindle-at-speed => spindle.0.at-speedCode:net spindle-at-speed => spindle.0.at-speed sets spindle-at-speed 1
But, as I said, this was just a guess. It could be something else.
Will try that anyway, sounds plausible after trying to understand the manual.
Thanks for your help!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
- Posts: 19899
- Thank you received: 4655
In your G-code you have:
The third line is a move only in Z, as the machine is already at that XY point.
The fourth move is a G1 in X and Y at the same Z.
If the program runs to completion, finishing at X5.249 Y542.100 Z4.00 then the problem is _not_ spindle-at speed.
If the program pauses at X-0.100 Y536.751 Z4.000 and does not run to completion then spindle-at-speed seems like a very likely cause.
Please Log in or Create an account to join the conversation.