G92 codes not being generated in PFG file

Help for setting up and using
Post Reply
levelheaded
Posts: 4
Joined: Wed Feb 06, 2019 4:27 pm

G92 codes not being generated in PFG file

Post by levelheaded » Thu Feb 07, 2019 7:12 pm

This is my current configuration
10.png
20.png
For M2002, I have a macro in the active profile directory with

Code: Select all

SetVar(2002,getoemdro(802))
The PFG file is also attached
A snippet of which is pasted below

M40
G0 Z10
G1 X0 Y0 F600
G4 P1
G31 Z-15 F100
M2002 <= (would expect a G92 Z0 after this line)
G0 Z10
G1 X10 Y0 F600
G4 P1

My question is why the G92 codes are not showing up after the M2002 command.
I would expect that after a probe detect the Z should be zeroed? correct?

Secondly, my output log file is showing all the same values
for instance it shouws the same values for x, y and Z through out the file, although I can see it probing correctly but the output file doesnt seem to show that.

I hope someone can shed some light over these issues.

TIA
Attachments
PFG~70x10.nc
(2.78 KiB) Downloaded 3 times

daedelus
Site Admin
Posts: 368
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: G92 codes not being generated in PFG file

Post by daedelus » Fri Feb 08, 2019 11:51 am

Hi,

Yes, I have replicated the problem from your provided settings and am getting the same issue (no G92 output). This should not happen and will issue a fix as soon as I get my licence back from Jetbrains (company that makes my IDE of choice). Not sure why this happens yet.

Thanks for telling me.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James

levelheaded
Posts: 4
Joined: Wed Feb 06, 2019 4:27 pm

Re: G92 codes not being generated in PFG file

Post by levelheaded » Fri Feb 08, 2019 7:21 pm

daedelus wrote:
Fri Feb 08, 2019 11:51 am
Hi,

Yes, I have replicated the problem from your provided settings and am getting the same issue (no G92 output). This should not happen and will issue a fix as soon as I get my licence back from Jetbrains (company that makes my IDE of choice). Not sure why this happens yet.

Thanks for telling me.
Thanks for the reply.

BTW I'm not sure what I'm asking of you is correct.
I had posted a question regarding the same on the CNCZone forum
And user "CitizenOfDream" feels that the existing scheme of things (no G92 codes) is the way it should be.

Please see his answer here https://www.cnczone.com/forums/pcb-mill ... ost2260444
The link is not showing the correct post so I 'm pasting his answer here
It contains one G92 statement just like it should. It only needs to be done once.

And on second thoughts one gets the feeling that what he is hinting at is correct. Because you have already zeroed the Z at the start of the file (your code generates 2 G92 statements at the begining of the probe routine).
And this start point is taken as a reference to log the remaining Z values.

However I am no expert on this topic and leave it to you to judge.

Which brings me to the second issue that I raised.
Why is the output triplet file not logging the correct X,Y,Z values, I get the same values on all the lines logged in that file?
Is it related to this G92 code or is it a seperate issue, the one that plagues USB controllers when used with Mach3.

daedelus
Site Admin
Posts: 368
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: G92 codes not being generated in PFG file

Post by daedelus » Fri Feb 08, 2019 9:12 pm

Will check it out when Jetbrains gets back to me in a few days time hopefully, but im guessing right now that G92 should appear after the M2002 as you say. In the meantime you could try changing G92 to something else just to see if it comes up in the PFG.

The other point is almost certainly a USB one but since you have the code you mentioned, I would have thought you could avoid that issue. Maybe try increasing the G4 dwell time?
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James

levelheaded
Posts: 4
Joined: Wed Feb 06, 2019 4:27 pm

Re: G92 codes not being generated in PFG file

Post by levelheaded » Sat Feb 09, 2019 4:44 am

daedelus wrote:
Fri Feb 08, 2019 9:12 pm
Will check it out when Jetbrains gets back to me in a few days time hopefully, but im guessing right now that G92 should appear after the M2002 as you say. In the meantime you could try changing G92 to something else just to see if it comes up in the PFG.

The other point is almost certainly a USB one but since you have the code you mentioned, I would have thought you could avoid that issue. Maybe try increasing the G4 dwell time?
Thanks again!
I guess it all boils down to how Autoleveller uses the PFG file to generate the autolevelled gcode output.
Does it expect the Z to be zeroed on every touch off or only the 1st touch off. That would probably be the defining factor in including those subsequent G92 commands.
Again, you would know best.

daedelus
Site Admin
Posts: 368
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: G92 codes not being generated in PFG file

Post by daedelus » Sat Feb 09, 2019 11:54 am

Yes sorry you are correct. Was in a rush before and got a bit confused with what GCode does what. Yes, the G92's are for zeroing only and should only appear at the start. This is so the rest of the probe commands (G31's) have 1 zeroed point to relate to. Here is an example of a PFG which I quickly generated:

Code: Select all

M0 (Attach probe wires and clips that need attaching)
(Initialize probe routine)
G0 Z1.5 (Move clear of the board first)
G1 X0 Y0 F500 (Move to bottom left corner)
G0 Z2 (Quick move to probe clearance height)
G4 P1
G31 Z-1 F250 (Probe to a maximum of the specified probe height at the specified feed rate)
M2002
G92 Z0 (Touch off Z to 0 once contact is made)
M5001
G0 Z2 (Move Z to above the contact point)
G4 P1
G31 Z-1 F125 (Repeat at a more accurate slower rate)
M2002
G92 Z0
M5001
G0 Z2

M40
G0 Z2
G1 X0 Y0 F500
G4 P1
G31 Z-1 F250
M2002
G0 Z2
G1 X10 Y0 F500
G4 P1
G31 Z-1 F250
M2002
G0 Z2
G1 X20 Y0 F500
G4 P1
G31 Z-1 F250
M2002
As a side note, the PFG does not do any actual levelling itself. Its just a GCode file which, when run on your CNC will produce the RPF which is the list of triplets you mentioned.

You should also see the Z part of each triplet as a slightly different number to the rest. If they look identical then this is probably a USB issue. Some people have luck with a higher dwell. Try 'G4 P5' (pause for 5 seconds on each probe) just to see if it helps.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James

levelheaded
Posts: 4
Joined: Wed Feb 06, 2019 4:27 pm

Re: G92 codes not being generated in PFG file

Post by levelheaded » Sun Feb 10, 2019 1:48 pm

daedelus wrote:
Sat Feb 09, 2019 11:54 am
Yes sorry you are correct. Was in a rush before and got a bit confused with what GCode does what. Yes, the G92's are for zeroing only and should only appear at the start.
Thanks for the confirmation!
daedelus wrote: You should also see the Z part of each triplet as a slightly different number to the rest. If they look identical then this is probably a USB issue. Some people have luck with a higher dwell. Try 'G4 P5' (pause for 5 seconds on each probe) just to see if it helps.
I didn't want to delay my work any further with the USB CNC controller and thankfully I had a UC400ETH (Ethernet controller) which was waiting to be used. So I wired it up and ran a test run for the PFG file.
And it generated the correct probing co-ordinates for X, Y and Z on first run. No sweat!

I wish I had thought of it earlier.
Yes the ethernet controller is quite expensive when compared to the USB controller and I would have liked the USB controller to work, I will surely give it a try sometime in the future and post my findings if any. But till them I'm happy to get started without any further delays.

Thanks again for the support!

daedelus
Site Admin
Posts: 368
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: G92 codes not being generated in PFG file

Post by daedelus » Mon Feb 11, 2019 11:07 am

Sure. Thats a point worth noting actually. If someone else runs into similar issues with a USB control board, it might be worth using an ethernet or parallel port board instead. If possible.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James

joeaverage
Posts: 28
Joined: Tue Aug 09, 2016 8:55 am

Re: G92 codes not being generated in PFG file

Post by joeaverage » Thu Feb 28, 2019 6:47 am

Hi,
Yes the ethernet controller is quite expensive when compared to the USB controller and I would have liked the USB controller to work, I will surely give it a try sometime in the future and post my findings if any
Not sure why. USB comms are subject to greater delays, more subject to electrical noise and considerably
slower than Ethernet. You have a good Ethernet solution......don't go backwards.

Craig

TomCot
Posts: 1
Joined: Mon Mar 04, 2019 9:49 am

Re: G92 codes not being generated in PFG file

Post by TomCot » Tue Mar 05, 2019 3:08 pm

How's it slower than Ethernet? Is it supposed to be that way?

Post Reply