Preview doesn't match actual program path

More
2 years 5 months ago #299797 by Unlogic
Today I made my first CNC program using multiple work offsets (G54 & G55) and noticed that the preview in Probe Basic doesn't match the actual path of the program.

I have two pieces of stock setup in two vices next two each other with the work offsets probed to the lower left corner of each piece (ignore the black arrows, they are only there for my reference as the parts are mirrored).

 

Attachment not found



I've written a program that does all the operations on the left part first in offset G54 and then switches to G55 and does the operations on the second part.

The preview of the program in Probe Basic adds a line across the second part when switching offset (highlighted by the green arrow).

 

Attachment not found



I scratched my head for a long while trying to figure out what was going on as that line shouldn't exist. Eventually I disabled the spindle and inverted the Z values of the program so it would run just above the parts. When I run the program it run's as expected. It finishes the first part with the end mill located right between the two pieces. It then switches offset and resumes work on the second part without going across the part.

I'm a rookie when it comes to G-code so it might be something in my program that's confusing the preview but I thought I'd mention this here to get some input from the more experienced LinuxCNC users.

Here is the program in question (with spindle disabled and z-height inverted):

G54

;;;;;;;;;;;;;;;;;;;M7 ;mist cooling on
;;;;;;;;;;;;;;;;;;;M3 S1500 ;spindle on CW
G4 P2; Wait for two seconds

F800

G0 X-13 Y61.7
G0 Z1
G1 X125.73
G1 Y-6.4
G1 X-6.2

G1 Y51.7
G1 X132
G0 Y80
G0 X-13

G1 Y43.5
G1 X132
G0 Y80
G0 X-13

G0 X-13 Y61.7
G0 Z2
G1 X125.73
G1 Y-6.4
G1 X-6.2

G1 Y51.7
G1 X132
G0 Y80
G0 X-13

G1 Y43.5
G1 X132


G55

G0 X-13 Y61.7
G0 Z1
G1 X125.93
G1 Y-6.4
G1 X-6.0

G1 Y51.7
G1 X132
G0 Y80
G0 X-13

G1 Y43.5
G1 X132
G0 Y80
G0 X-13

G0 X-13 Y61.7
G0 Z2
G1 X125.93
G1 Y-6.4
G1 X-6.0

G1 Y51.7
G1 X132
G0 Y80
G0 X-13

G1 Y43.5
G1 X132


M5 ;turn spindle off
M9 ;turn mist off
G0 Z50
M30 ;End program

Please Log in to join the conversation.

More
2 years 5 months ago #300004 by Aciera
Not sure as I do not use PathPilot but testing your gcode on my regular LinuxCNC install I cannot reproduce this.
This is what I get with G55 X-offset = 150:


 

Attachment not found

Please Log in to join the conversation.

More
2 years 5 months ago #300010 by Unlogic
Your preview in PathPilot looks exactly like what I expected the preview in ProbeBasic would show.

I dug further into the issue yesterday and it seems that if you are at position X100 Y100 in G54 and switch to for example G55 the plot automatically goes to X100 Y100 G55 even though the machine actually hasn't moved at all.

This causes the first move done i G55 to be incorrectly represented in the preview as the starting point of that line will start in the wrong place.

Please Log in to join the conversation.

More
2 years 5 months ago #300020 by Aciera
I'm sorry I got confused (I thought you are using PathPilot) my preview is in Gmoccapy.

I dug further into the issue yesterday and it seems that if you are at position X100 Y100 in G54 and switch to for example G55 the plot automatically goes to X100 Y100 G55 even though the machine actually hasn't moved at all.


I would have expected that all gui's use the same gremlin preview yet I cannot reproduce this either.
 

Please Log in to join the conversation.

More
2 years 5 months ago #300021 by Aciera
All I see when switching from G54 to G55 is the coordinate system origin moving to the right:

 

Attachment not found



 

Attachment not found

Please Log in to join the conversation.

More
2 years 5 months ago #300022 by Unlogic
Probe Basic uses a different plot called VTK which is why it has higher graphics card requirements than most other user interfaces.

I suspect this bug is related to the implementation of that plot in QtPyVCP.

Please Log in to join the conversation.

More
2 years 5 months ago #300252 by TurBoss
hello, thanks for the report

and yes there is a bug in the plotter

I'll add a quick fix to hide the wrong lines while I figure how to draw the rapids between each path

 

Attachment not found



Thanks!

Please Log in to join the conversation.

More
2 years 5 months ago #300296 by Unlogic
Wow that was quick, big thanks TurBoss!

Please Log in to join the conversation.

More
2 years 5 months ago #300495 by TurBoss
made some progress :)

I hope get it working soon


 

Attachment not found

Please Log in to join the conversation.

More
2 years 5 months ago #300647 by Lcvette
Awesome! Thanks TurBoss!

Please Log in to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum