Preview doesn't match actual program path
- Unlogic
- Offline
- Elite Member
- Posts: 202
- Thank you received: 102
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).
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).
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
Attachments:
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3958
- Thank you received: 1714
Attachments:
Please Log in or Create an account to join the conversation.
- Unlogic
- Offline
- Elite Member
- Posts: 202
- Thank you received: 102
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 or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3958
- Thank you received: 1714
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 or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3958
- Thank you received: 1714
Attachments:
Please Log in or Create an account to join the conversation.
- Unlogic
- Offline
- Elite Member
- Posts: 202
- Thank you received: 102
I suspect this bug is related to the implementation of that plot in QtPyVCP.
Please Log in or Create an account to join the conversation.
- TurBoss
- Offline
- Premium Member
- Posts: 135
- Thank you received: 81
Attachments:
Please Log in or Create an account to join the conversation.
- Unlogic
- Offline
- Elite Member
- Posts: 202
- Thank you received: 102
Please Log in or Create an account to join the conversation.
- TurBoss
- Offline
- Premium Member
- Posts: 135
- Thank you received: 81
Attachments:
Please Log in or Create an account to join the conversation.
- Lcvette
- Away
- Moderator
- Posts: 1195
- Thank you received: 619
Please Log in or Create an account to join the conversation.