Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G38.2 Straight Probe - observations #157

Open
masterlefty opened this issue Feb 21, 2016 · 0 comments
Open

G38.2 Straight Probe - observations #157

masterlefty opened this issue Feb 21, 2016 · 0 comments

Comments

@masterlefty
Copy link

I’ve been working on developing some new widgets to control the TingG through the Chilieppr hardware fiddle. To these means, I’ve been reviewing the firmware to help with my widget developments.

In reference to G38.2, I believe the best case practice is to run under G21, the machine's base unit. However, the block is correctly interpreted and executed in G20 units. Overall I believe that TinyG has implemented and follows the gcode definitions, with a couple of minor exceptions.

Minimum travel - there are many conditions where the requirement that min probe travel >
0.254mm.
Feed Rate - must be specified in block

Below are the results of my findings:


Minimum probe travel - defined in cycle_probing.c to be 0.254
In testing, the G38.2 will execute with the difference between pb.start_position and pb.target values < 0.254 under certain conditions
minimum_probe_travel_data.pdf

The only time the controller will log an error is if pb.target < .0254" and,
In G20 [inch] - error reports only if mX=0, mY=0, mZ=0
and, if target value <0.254" (which is 6.35mm)
G20 G38.2 Z0.254 F25 - no error
G20 G38.2 Z0.25 F25 - ":"Probing error - invalid probe destination"

In G21[mm] - error reports only if mX=0 and mY=0
and, if difference pb.target and pb.start_position < 0.254mm
G21 G38.2 Z0.254 F25 - no error
G21 G38.2 Z0.253 F25 - ":"Probing error - invalid probe destination"
minimum_probe_travel_data_2.pdf

Through the different scripts, it appears the min travel error works in the following conditions:
G21: mX = 0, mY = 0, any start/target mZ.
G20: mX = 0, mY = 0, mZ = 0; pb.target < 0.254" (value is read before conversion to base units)
The only explanation I can think for this behavior, that mX=mY=0, is pb.target is read as a 3-dimensional point, pb.start_position is read as mX=0, mY=0, mZ=Zn. The vector difference between the two points in 3D space is greater than 0.254.


Feed Rate - defined in cycle_probing.c that Fn must be defined in the block
(Note: feed rate is modal, and if defined in a previous line of code it will be accepted by G38.2)
In testing, on startup, if G38.2 Zn is called as the first block of code the TinyG will execute but with no external signals sent to motors. G0 moves do not store a feed rate

Issuing a G1 Xn Fn block will store the feed rate, and is used by the G38.2 block.
probe_feed_rate_data.pdf

I believe best practice is to always define Fn, but I was unable to find a test condition that would call STAT_GCODE_FEEDRATE_NOT_SPECIFIED

System Parameters:
Hardware:
Synthetos_ TinyG CNC controller, v8, ID 3X3566-2WT, Firmware: build 440.20, version 0.97
Controller is not connected to a physical machine, but to a test stand
Software:
Serial Port JSON server v1.86 for Windows – AMD64
ref: http://github.com/johnlauer/serial-port-json-server
chilipeppr.com – Hardware Fiddle
Widget / Serial Port Console { com-chilipeppr-widget-spconsole}
http://fiddle.jshell.net/chilipeppr/rczajbx0/show/light/
Widget / Serial Port JSON Server { com-chilipeppr-widget-serialport }
http://fiddle.jshell.net/chilipeppr/vetj5fvx/show/light/

Regards,
Kenny

P.S. I've drafted information on the use of G38.2 to be added to the wiki site. What is the best way to propose or submit the changes? I'm not sure if this should be a new page, or addition to Gcode Support and/or Coordinate Systems. TinyG wiki - G38_2 Probe.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant