- Posts: 270
- Thank you received: 0
[closed] FreeCAD path, strange movement in Z axis
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?
Attachment not found
Attachment not found
Using FreeCAD linkbranch
LinuxCNC 2.9
gmoccapy 3.1.3.1
Please Log in to join the conversation.
Please Log in to join the conversation.
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 to join the conversation.
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 to join the conversation.
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 to join the conversation.
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 to join the conversation.
andypugh wrote: Let's try to be clearer about this.
In your G-code you have:Code:G0 X-0.100 Y536.751 G0 Z4.000 G1 X-0.100 Y536.751 Z-0.100 F900.000 G1 X5.249 Y542.100 Z-0.100 F900.000
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.
Exactly. That is what is supposed to happen.
But.... I ran the whole program. Alle movement commands except the Z movement in the G1 statements are executed.
The spindle does not move from the initial Z4 position, the X and Y movements are correct.
andypugh wrote: If the program runs to completion, finishing at X5.249 Y542.100 Z4.00 then the problem is _not_ spindle-at speed.
Ok, it does run the whole program at z=4. So I will stop pursuing the spindle-at-speed route
andypugh wrote: 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.
There is no pause, the program runs fine after toolchange and toolheight measurement.
The program does the initial xyz movements and they are correct. Until the first G1 command, of the G1 commands only the X and Y positions are executed. The Z value remains at 4.
It might be the speed, or at least thats the only thing left I guess. I will try again with different (slower) speed.
Please Log in to join the conversation.
Please Log in to join the conversation.
andypugh wrote: Does the DRO show 4.0 for the Z, or is it that the Z doesn't move when commanded?
Was just about the post a video about the DRO.
There is something strange going on that might be my fault.
If you look at the DRO in the video you can see that right after the first G1 command the DRO goes to -0.1 But the spindle itself didn't move at all in the Z direction, it is physicaly still at 5 (in this case, I changed the gcode file a little).
I do not know how this is possible. My G54 and homing is correct to my knowledge (all the G0 commands work as they should).
Remove the .txt to watch this .mkv video
Attachment not found
Please Log in to join the conversation.
