Homeing: ResetToFicucialLocation : Wrong coordinates if Y home is max (e.g. 350), not min (0)

107 views
Skip to first unread message

Marko Hoepken

unread,
Sep 7, 2021, 3:13:17 PM9/7/21
to OpenPnP
Hi,

Machine / Setup.

Literplacer with TinyG (TMC mod)

0/0 left bottom corner.

On my table I want:

1. No blocking by CNC after Home
2. Aviod collision with feeders when homing
3. Mark's feeders on bottom
4. Stripe right
5. Tools left
6. Possible short way for bottom camera, since it is in the middle

Planned table, see attached image.

What works fine:

Home left bottom 0/0 
Fiducial left top 10/330

Homeing: ResetToFicucialLocation

All works fine (but I wanti t different)

1. Home left bottom  (0/0) (what I do not what...) agains switches
(TinyG  ysn = 3, ysx = 2, )
G28.2 X0 Y0 Z0
G92 X0 Y0 Z0
2. Than moved to fiducial, does its camera thing. 
3. Finale the machine is calibrated at 10/330 left top.
4. Coordinates are:  10/330


What FAILS
Home left bottom 0/0 
Fiducial left top 10/330

Homeing: ResetToFicucialLocation

All works fine (but I wanti t different)

1. Home left TOP (0/350) agains switches
(TinyG  ysn = 2, ysx = 3, )
G28.2 X0 Y0 Z0
G92 X0 Y350 Z0
2. Than moved to fiducial, does its camera thing. 
3. Finale the machine is calibrated at 10/330 left top.

BUT: 

4. Coordinates are:  10/680 (instead of 10/330)

680 =  350 + 330

The  potential bug:

After the Home to Fiducial the machine coordinates should be the coordinates of the Fiducial ONLY.

The software seems to do:

X = Last G92 + Ficucial x
Y = Last G92 + Ficucial Y

In case X and Y of last G92 are "0", all is fine.

In my case I did an offset of Y to 350 (Max Y home).

Do I miss something?


PS: I thought... I can find and fix it in the code... after doing a clone, I found: WOW, that is a is a lot of code...  Help welcome ;-)


ATTACHMENT: My tablelite_placer_thump.JPG



Marko Hoepken

unread,
Sep 7, 2021, 3:15:43 PM9/7/21
to OpenPnP
Wrong in post:

What FAILS
Home left TOP 0/350 
Fiducial left top 10/330

ma...@makr.zone

unread,
Sep 7, 2021, 3:45:56 PM9/7/21
to ope...@googlegroups.com

For TinyG I'm not the expert. Is there no other way to home Y to max i.e. not to zero?

The behavior of OpenPnP is well tested there, what you describe is basically what I do on my machine, so I'm reluctant to believe it is such a simple (680 =  350 + 330) bug.

You best set logging to TRACE level and do a homing, then send the log, so we see what OpenPnP sends.

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/9a11835d-7056-4148-b56a-c3a5ceab663en%40googlegroups.com.

Marko Hoepken

unread,
Sep 7, 2021, 4:47:13 PM9/7/21
to OpenPnP
Hi Mark,

I did the trace...

You may be right: Looks like a problem in TinyG.

.
After switch home... it finds fidcucial... (move to target), 

After that the  G28.3 X10.0000 Y330.0000  seems to cause: posx:10.000,posy:680.000,

What is strange.... 

But: What is G28.3 ? I did not find the meaning of .3 here...


CLIP
.
2021-09-07 22:29:34.924 GcodeDriver TRACE: [serial://COM3] confirmed G1  Y326.0924   F2000.00 ; move to target
2021-09-07 22:29:34.924 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G28.3 X10.0000 Y330.0000   ; reset coordinates
2021-09-07 22:29:34.940 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.940 GcodeDriver TRACE: [serial://COM3] confirmed G28.3 X10.0000 Y330.0000   ; reset coordinates
2021-09-07 22:29:34.940 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.987 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:10.000,posy:680.000,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3
2021-09-07 22:29:34.987 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.987 GcodeDriver TRACE: [serial://COM3] confirmed M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.987 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M114 ; get position
2021-09-07 22:29:35.018 GcodeDriver$ReaderThread TRACE: [serial://COM3] << X:10.0000 Y:680.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
.
.

Full Dump:


2021-09-07 22:29:17.781 ReferenceMachine DEBUG: homing machine
2021-09-07 22:29:17.781 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G28.2 X0 Y0 Z0, -1)...
2021-09-07 22:29:17.781 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G92 X0 Y350 Z0, -1)...
2021-09-07 22:29:17.781 GcodeDriver TRACE: [serial://COM3] confirmed M5
2021-09-07 22:29:17.781 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(;G92 X0 Y0 Z0, -1)...
2021-09-07 22:29:17.781 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M400 ; Wait for moves to complete before returning, -1)...
2021-09-07 22:29:17.781 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M114 ; get position, -1)...
2021-09-07 22:29:17.781 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G28.2 X0 Y0 Z0
2021-09-07 22:29:17.812 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:17.812 GcodeDriver TRACE: [serial://COM3] confirmed G28.2 X0 Y0 Z0
2021-09-07 22:29:17.812 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G92 X0 Y350 Z0
2021-09-07 22:29:17.812 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:0.000,posz:0.000,posa:0.000,feed:0.00,vel:0.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:18.144 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:0.000,posz:4.246,posa:0.000,feed:1000.00,vel:0.24,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:18.646 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:0.000,posz:3.449,posa:0.000,feed:100.00,vel:100.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:19.131 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:0.000,posz:2.641,posa:0.000,feed:100.00,vel:100.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:19.532 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:0.000,posz:1.986,posa:0.000,feed:100.00,vel:0.51,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:19.732 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:0.000,posz:110.000,posa:0.000,feed:1000.00,vel:0.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:20.233 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:-14.167,posy:0.000,posz:0.000,posa:0.000,feed:2000.00,vel:2000.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:20.719 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:-30.333,posy:0.000,posz:0.000,posa:0.000,feed:2000.00,vel:2000.00,unit:1,coor:0,dist:1,frmo:1,stat:9
...removed
2021-09-07 22:29:26.165 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:-112.239,posy:0.000,posz:0.000,posa:0.000,feed:100.00,vel:0.51,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:26.318 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:-699.000,posy:0.000,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:26.819 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:13.107,posz:0.000,posa:0.000,feed:1800.00,vel:1800.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:27.305 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:27.807,posz:0.000,posa:0.000,feed:1800.00,vel:1800.00,unit:1,coor:0,dist:1,frmo:1,stat:9
... remvoved
2021-09-07 22:29:32.365 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:98.443,posz:0.000,posa:0.000,feed:100.00,vel:0.51,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:32.519 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:499.000,posz:0.000,posa:0.000,feed:1800.00,vel:0.00,unit:1,coor:0,dist:1,frmo:1,stat:9
2021-09-07 22:29:32.519 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:32.519 GcodeDriver TRACE: [serial://COM3] confirmed G92 X0 Y350 Z0
2021-09-07 22:29:32.534 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> ;G92 X0 Y0 Z0
2021-09-07 22:29:32.534 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:0.000,posy:350.000,posz:0.000,posa:0.000,feed:0.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3
2021-09-07 22:29:32.534 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:32.534 GcodeDriver TRACE: [serial://COM3] confirmed ;G92 X0 Y0 Z0
2021-09-07 22:29:32.534 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M400 ; Wait for moves to complete before returning
2021-09-07 22:29:32.550 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:32.550 GcodeDriver TRACE: [serial://COM3] confirmed M400 ; Wait for moves to complete before returning
2021-09-07 22:29:32.550 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M114 ; get position
2021-09-07 22:29:32.581 GcodeDriver$ReaderThread TRACE: [serial://COM3] << X:0.0000 Y:350.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:32.581 GcodeDriver TRACE: Position report: X:0.0000 Y:350.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:32.581 GcodeDriver TRACE: GcodeAsyncDriver got lastReportedLocation (x:0.000000, y:350.000000, Z:0.000000, A:0.000000)
2021-09-07 22:29:32.581 GcodeAsyncDriver TRACE: GcodeAsyncDriver confirmation complete.
2021-09-07 22:29:32.581 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:32.581 AbstractMotionPlanner DEBUG: Reported location changes current location from (x:0.000000, y:0.000000, Z:0.000000, A:0.000000) to (x:0.000000, y:350.000000, Z:0.000000, A:0.000000)
2021-09-07 22:29:32.581 ReferenceHead DEBUG: H1.home()
2021-09-07 22:29:32.581 ReferenceFiducialLocator DEBUG: Looking for FIDUCIAL-HOME at (10.000000, 330.000000, 0.000000, 0.000000 mm)
2021-09-07 22:29:32.581 ReferenceHead DEBUG: H1.moveToSafeZ(1.0)
2021-09-07 22:29:32.581 AbstractHeadMountable DEBUG: ContactProbeNozzle.moveToSafeZ(1.0)
2021-09-07 22:29:32.581 AbstractHeadMountable DEBUG: OpenCvCamera.moveToSafeZ(1.0)
2021-09-07 22:29:32.581 AbstractHeadMountable DEBUG: VAC1.moveToSafeZ(1.0)
2021-09-07 22:29:32.581 AbstractHeadMountable DEBUG: PUMP.moveToSafeZ(1.0)
2021-09-07 22:29:32.581 AbstractHeadMountable DEBUG: OpenCvCamera.moveTo((10.000000, 330.000000, 0.000000, 0.000000 mm), 1.0)
2021-09-07 22:29:32.581 AbstractHeadMountable DEBUG: OpenCvCamera.moveTo((10.000000, 330.000000, 0.000000, 0.000000 mm), 1.0)
2021-09-07 22:29:32.597 Scripting TRACE: Scripting.on Camera.BeforeSettle
2021-09-07 22:29:32.597 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M201.3, 15000)...
2021-09-07 22:29:32.597 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G1 X10.0000 Y330.0000   F2000.00 ; move to target, 15000)...
2021-09-07 22:29:32.597 GcodeDriver TRACE: [serial://COM3] confirmed M114 ; get position
2021-09-07 22:29:32.597 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M400 ; Wait for moves to complete before returning, 15000)...
2021-09-07 22:29:32.597 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M114 ; get position, -1)...
2021-09-07 22:29:32.597 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M201.3
2021-09-07 22:29:32.597 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:32.597 GcodeDriver TRACE: [serial://COM3] confirmed M201.3
2021-09-07 22:29:32.597 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G1 X10.0000 Y330.0000   F2000.00 ; move to target
2021-09-07 22:29:32.619 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:32.619 GcodeDriver TRACE: [serial://COM3] confirmed G1 X10.0000 Y330.0000   F2000.00 ; move to target
2021-09-07 22:29:32.619 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M400 ; Wait for moves to complete before returning
2021-09-07 22:29:33.113 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:6.409,posy:337.181,posz:0.000,posa:0.000,feed:2000.00,vel:2000.00,unit:1,coor:1,dist:0,frmo:1,stat:5
2021-09-07 22:29:33.398 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:10.000,posy:330.000,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3
2021-09-07 22:29:33.398 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:33.398 GcodeDriver TRACE: [serial://COM3] confirmed M400 ; Wait for moves to complete before returning
2021-09-07 22:29:33.398 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M114 ; get position
2021-09-07 22:29:33.420 GcodeDriver$ReaderThread TRACE: [serial://COM3] << X:10.0000 Y:330.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:33.420 GcodeDriver TRACE: Position report: X:10.0000 Y:330.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:33.420 GcodeDriver TRACE: GcodeAsyncDriver got lastReportedLocation (x:10.000000, y:330.000000, Z:0.000000, A:0.000000)
2021-09-07 22:29:33.436 GcodeAsyncDriver TRACE: GcodeAsyncDriver confirmation complete.
2021-09-07 22:29:33.436 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:33.699 Scripting TRACE: Scripting.on Camera.BeforeCapture
2021-09-07 22:29:33.699 Scripting TRACE: Scripting.on Camera.AfterCapture
2021-09-07 22:29:33.699 Scripting TRACE: Scripting.on Camera.AfterSettle
2021-09-07 22:29:33.784 ReferenceFiducialLocator DEBUG: FIDUCIAL-HOME located at (10.049917, 326.193277, 0.000000, 0.000000 mm)
2021-09-07 22:29:33.784 AbstractHeadMountable DEBUG: OpenCvCamera.moveTo((10.049917, 326.193277, 0.000000, 0.000000 mm), 1.0)
2021-09-07 22:29:33.799 Scripting TRACE: Scripting.on Camera.BeforeSettle
2021-09-07 22:29:33.799 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M201.3, 15000)...
2021-09-07 22:29:33.799 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G1 X10.0499 Y326.1933   F2000.00 ; move to target, 15000)...
2021-09-07 22:29:33.799 GcodeDriver TRACE: [serial://COM3] confirmed M114 ; get position
2021-09-07 22:29:33.799 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M400 ; Wait for moves to complete before returning, 15000)...
2021-09-07 22:29:33.799 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M114 ; get position, -1)...
2021-09-07 22:29:33.799 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M201.3
2021-09-07 22:29:33.815 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:33.815 GcodeDriver TRACE: [serial://COM3] confirmed M201.3
2021-09-07 22:29:33.815 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G1 X10.0499 Y326.1933   F2000.00 ; move to target
2021-09-07 22:29:33.821 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:33.821 GcodeDriver TRACE: [serial://COM3] confirmed G1 X10.0499 Y326.1933   F2000.00 ; move to target
2021-09-07 22:29:33.821 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.070 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:10.050,posy:326.193,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3
2021-09-07 22:29:34.070 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.070 GcodeDriver TRACE: [serial://COM3] confirmed M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.070 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M114 ; get position
2021-09-07 22:29:34.101 GcodeDriver$ReaderThread TRACE: [serial://COM3] << X:10.0499 Y:326.1933 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:34.101 GcodeDriver TRACE: Position report: X:10.0499 Y:326.1933 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:34.101 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.101 GcodeDriver TRACE: GcodeAsyncDriver got lastReportedLocation (x:10.049900, y:326.193300, Z:0.000000, A:0.000000)
2021-09-07 22:29:34.101 GcodeAsyncDriver TRACE: GcodeAsyncDriver confirmation complete.
2021-09-07 22:29:34.354 Scripting TRACE: Scripting.on Camera.BeforeCapture
2021-09-07 22:29:34.354 Scripting TRACE: Scripting.on Camera.AfterCapture
2021-09-07 22:29:34.354 Scripting TRACE: Scripting.on Camera.AfterSettle
2021-09-07 22:29:34.423 ReferenceFiducialLocator DEBUG: FIDUCIAL-HOME located at (10.000000, 326.117647, 0.000000, 0.000000 mm)
2021-09-07 22:29:34.423 AbstractHeadMountable DEBUG: OpenCvCamera.moveTo((10.000000, 326.117647, 0.000000, 0.000000 mm), 1.0)
2021-09-07 22:29:34.423 Scripting TRACE: Scripting.on Camera.BeforeSettle
2021-09-07 22:29:34.423 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M201.3, 15000)...
2021-09-07 22:29:34.423 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G1 X10.0000 Y326.1176   F2000.00 ; move to target, 15000)...
2021-09-07 22:29:34.423 GcodeDriver TRACE: [serial://COM3] confirmed M114 ; get position
2021-09-07 22:29:34.423 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M400 ; Wait for moves to complete before returning, 15000)...
2021-09-07 22:29:34.423 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M114 ; get position, -1)...
2021-09-07 22:29:34.423 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M201.3
2021-09-07 22:29:34.439 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.439 GcodeDriver TRACE: [serial://COM3] confirmed M201.3
2021-09-07 22:29:34.439 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G1 X10.0000 Y326.1176   F2000.00 ; move to target
2021-09-07 22:29:34.454 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.454 GcodeDriver TRACE: [serial://COM3] confirmed G1 X10.0000 Y326.1176   F2000.00 ; move to target
2021-09-07 22:29:34.454 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.523 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:10.000,posy:326.118,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3
2021-09-07 22:29:34.523 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.523 GcodeDriver TRACE: [serial://COM3] confirmed M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.523 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M114 ; get position
2021-09-07 22:29:34.555 GcodeDriver$ReaderThread TRACE: [serial://COM3] << X:10.0000 Y:326.1176 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:34.555 GcodeDriver TRACE: Position report: X:10.0000 Y:326.1176 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:34.555 GcodeDriver TRACE: GcodeAsyncDriver got lastReportedLocation (x:10.000000, y:326.117600, Z:0.000000, A:0.000000)
2021-09-07 22:29:34.555 GcodeAsyncDriver TRACE: GcodeAsyncDriver confirmation complete.
2021-09-07 22:29:34.555 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.818 Scripting TRACE: Scripting.on Camera.BeforeCapture
2021-09-07 22:29:34.818 Scripting TRACE: Scripting.on Camera.AfterCapture
2021-09-07 22:29:34.818 Scripting TRACE: Scripting.on Camera.AfterSettle
2021-09-07 22:29:34.902 ReferenceFiducialLocator DEBUG: FIDUCIAL-HOME located at (10.000000, 326.092437, 0.000000, 0.000000 mm)
2021-09-07 22:29:34.902 AbstractHeadMountable DEBUG: OpenCvCamera.moveTo((10.000000, 326.092437, 0.000000, 0.000000 mm), 1.0)
2021-09-07 22:29:34.902 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M201.3, 15000)...
2021-09-07 22:29:34.902 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G1  Y326.0924   F2000.00 ; move to target, 15000)...
2021-09-07 22:29:34.902 GcodeDriver TRACE: [serial://COM3] confirmed M114 ; get position
2021-09-07 22:29:34.902 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(G28.3 X10.0000 Y330.0000   ; reset coordinates, -1)...
2021-09-07 22:29:34.902 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M201.3
2021-09-07 22:29:34.902 ReferenceNozzle DEBUG: ContactProbeNozzle.home()
2021-09-07 22:29:34.902 Scripting TRACE: Scripting.on Machine.AfterHoming
2021-09-07 22:29:34.902 ReferenceMachine INFO: setHomed(true)
2021-09-07 22:29:34.902 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M400 ; Wait for moves to complete before returning, 15000)...
2021-09-07 22:29:34.902 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M114 ; get position, -1)...
2021-09-07 22:29:34.918 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.918 GcodeDriver TRACE: [serial://COM3] confirmed M201.3
2021-09-07 22:29:34.918 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G1  Y326.0924   F2000.00 ; move to target
2021-09-07 22:29:34.924 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.924 GcodeDriver TRACE: [serial://COM3] confirmed G1  Y326.0924   F2000.00 ; move to target
2021-09-07 22:29:34.924 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> G28.3 X10.0000 Y330.0000   ; reset coordinates
2021-09-07 22:29:34.940 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.940 GcodeDriver TRACE: [serial://COM3] confirmed G28.3 X10.0000 Y330.0000   ; reset coordinates
2021-09-07 22:29:34.940 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.987 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:10.000,posy:680.000,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3
2021-09-07 22:29:34.987 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:34.987 GcodeDriver TRACE: [serial://COM3] confirmed M400 ; Wait for moves to complete before returning
2021-09-07 22:29:34.987 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M114 ; get position
2021-09-07 22:29:35.018 GcodeDriver$ReaderThread TRACE: [serial://COM3] << X:10.0000 Y:680.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:35.018 GcodeDriver TRACE: Position report: X:10.0000 Y:680.0000 Z:0.0000 A:0.0000 B:0.0000 C:0.0000
2021-09-07 22:29:35.018 GcodeDriver TRACE: GcodeAsyncDriver got lastReportedLocation (x:10.000000, y:680.000000, Z:0.000000, A:0.000000)
2021-09-07 22:29:35.018 GcodeAsyncDriver TRACE: GcodeAsyncDriver confirmation complete.
2021-09-07 22:29:35.018 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:35.018 AbstractMotionPlanner DEBUG: Reported location changes current location from (x:10.000000, y:330.000000, Z:0.000000, A:0.000000) to (x:10.000000, y:680.000000, Z:0.000000, A:0.000000)
2021-09-07 22:29:35.018 ReferenceActuator DEBUG: PUMP.actuate(false)
2021-09-07 22:29:35.025 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M5, 15000)...
2021-09-07 22:29:35.025 GcodeDriver TRACE: [serial://COM3] confirmed M114 ; get position
2021-09-07 22:29:35.025 ReferenceActuator DEBUG: VAC1.actuate(false)
2021-09-07 22:29:35.025 GcodeAsyncDriver DEBUG: serial://COM3 commandQueue.offer(M9, 15000)...
2021-09-07 22:29:35.025 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M5
2021-09-07 22:29:35.025 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:35.025 GcodeDriver TRACE: [serial://COM3] confirmed M5
2021-09-07 22:29:35.025 GcodeAsyncDriver$WriterThread TRACE: [serial://COM3] >> M9
2021-09-07 22:29:35.056 GcodeDriver$ReaderThread TRACE: [serial://COM3] << tinyg [mm] ok>
2021-09-07 22:29:35.056 GcodeDriver$ReaderThread TRACE: [serial://COM3] << posx:10.000,posy:680.000,posz:0.000,posa:0.000,feed:2000.00,vel:0.00,unit:1,coor:1,dist:0,frmo:1,stat:3


Thanks Marko

tonyl...@gmail.com

unread,
Sep 7, 2021, 5:04:40 PM9/7/21
to OpenPnP
TinyG does strange things with G92 if you set non-zero offsets.  In your HOME_COMMAND you may want to change back to G92 X0 Y0 Z0 and add a line following it with a g28.3 X0  Y350 Z0.

james.edwa...@gmail.com

unread,
Sep 7, 2021, 5:07:35 PM9/7/21
to ope...@googlegroups.com

I had a similar case, when I restarted Openpnp without power cycling the Tinyg, there seemed to be a “waiting command” that after homing would drive the head to the “park” location. I haven’t figured it out, I just power cycle each time.

--

You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/9a11835d-7056-4148-b56a-c3a5ceab663en%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.

ma...@makr.zone

unread,
Sep 7, 2021, 5:08:19 PM9/7/21
to ope...@googlegroups.com

Tony Luken originally proposed the use of G28.3 instead of G92. perhaps he can explain the difference. I wonder, if when used in addition to G92 in homing, it actually adds the offset (from G92) on top of the machine coordinate system.

I propose using G28.3 instead of G92 in homing too.

So after

G28.2 X0 Y0 Z0

use

G28.3 X0 Y350 Z0 A0 B0 C0

also adding the rotational axes, because I believe TinyG will initialize them at garbage positions and it will then take an eternity to rotate them back to zero.

_Mark

tonyl...@gmail.com

unread,
Sep 7, 2021, 5:17:58 PM9/7/21
to OpenPnP
I'd keep the G92 with every offset set to zero (protects against TinyG "remembering" or power-up with a non-zero offset) and then add a G28.3 line after that.

tonyl...@gmail.com

unread,
Sep 7, 2021, 5:31:26 PM9/7/21
to OpenPnP
Oh, and G28.3 resets the absolute axis coordinate(s) to whatever is specified.  G92 sets the offset between the working and absolute coordinate system.  The problem with using G92 offsets is that TinyG sometimes does things in the working coordinate system and other things (like probing) in the absolute coordinate system.  If you keep the G92 offsets all at zero, then the working and absolute coordinate systems are the same and it can safely switch between the two.

Marko Hoepken

unread,
Sep 7, 2021, 6:30:26 PM9/7/21
to OpenPnP
SOLVED!

The solution:

HOME_COMMAND

G28.2 X0 Y0 Z0 A0 B0 C0
G92 X0 Y0 Z0 A0 B0 C0
G28.3 X0 Y350 Z0 A0 B0 C0

instead of:

G28.2 X0 Y0 Z0 A0 B0 C0
G92 X0  Y350   Z0 A0 B0 C0


Fixed! Thanks.

So bottom line:

On TinyG:  

Do not offset G92 ;-)

Use G28.3 instead

Thanks Marko



tonyl...@gmail.com

unread,
Sep 21, 2021, 6:08:57 PM9/21/21
to OpenPnP
Hey, I just found a bug/feature that was sometimes causing my nozzle rotation to be 180 degrees off from where OpenPnP thought it was.  I believe it would manifest itself after I performed a homing cycle after I'd been doing something in openpnp that left the nozzle at +/-180 degrees (possibly other angles as well).  It turns out that the G28.2 homing command leaves the rotation axis unchanged (makes sense since it doesn't have a homing switch) and the following G92 command then locks-in the difference between where the absolute axis was and the setting in the G92 command.  See below: 

2021-09-21 16:12:36.233 GcodeAsyncDriver$WriterThread TRACE: [serial://COM5] >> G92 X0 Y0 Z0 A0 B0 C0
2021-09-21 16:12:37.382 GcodeDriver$ReaderThread TRACE: [serial://COM5] << tinyg [mm] ok>
2021-09-21 16:12:37.382 GcodeDriver TRACE: [serial://COM5] confirmed G92 X0 Y0 Z0 A0 B0 C0
2021-09-21 16:12:37.383 GcodeAsyncDriver$WriterThread TRACE: [serial://COM5] >> G28.3 X0 Y0 Z0 A0 B0 C0
2021-09-21 16:12:37.423 GcodeDriver$ReaderThread TRACE: [serial://COM5] << tinyg [mm] ok>
2021-09-21 16:12:37.423 GcodeDriver TRACE: [serial://COM5] confirmed G28.3 X0 Y0 Z0 A0 B0 C0
2021-09-21 16:12:37.424 GcodeAsyncDriver$WriterThread TRACE: [serial://COM5] >> M400 
2021-09-21 16:12:37.434 GcodeDriver$ReaderThread TRACE: [serial://COM5] << tinyg [mm] ok>
2021-09-21 16:12:37.434 GcodeDriver TRACE: [serial://COM5] confirmed M400 
2021-09-21 16:12:37.434 GcodeAsyncDriver$WriterThread TRACE: [serial://COM5] >> M114 
2021-09-21 16:12:37.457 GcodeDriver$ReaderThread TRACE: [serial://COM5] << X:0.0000 Y:0.0000 Z:0.0000 A:180.0000 B:0.0000 C:0.0000
2021-09-21 16:12:37.457 GcodeDriver TRACE: Position report: X:0.0000 Y:0.0000 Z:0.0000 A:180.0000 B:0.0000 C:0.0000

You can see here that even though a G92 A0 was sent above, TInyG keeps an offset of -180 degrees:
[g92x] g92 x offset               0.000 mm
[g92y] g92 y offset               0.000 mm
[g92z] g92 z offset               0.000 mm
[g92a] g92 a offset            -180.000 deg
[g92b] g92 b offset               0.000 deg
[g92c] g92 c offset               0.000 deg

The solution is to only issue the G92 command for axis when you know they have their absolute coordinate at zero.  For X, Y, and Z, that's after the G28.2 homing command.  For A, B, and C, that's after the G28.3 command:

So change your TinyG HOME_COMMAND from:
G28.2 X0 Y0 Z0 A0 B0 C0
G92 X0 Y0 Z0 A0 B0 C0
G28.3 X0 Y350 Z0 A0 B0 C0

to:
G28.2 X0 Y0 Z0 A0 B0 C0     ;For LitePlacer, the A0 B0 C0 do nothing here and can be removed
G92 X0 Y0 Z0                ;Only include axis here that were actually homed (absolute coordinate set to zero) by G28.2 (X and Z could be moved below the G28.3)
G28.3 X0 Y350 Z0 A0 B0 C0   ;Force the absolute coordinates to these values (really only need Y, A, B, and C here)
G92 A0 B0 C0                ;Only include axis here that were set to zero by G28.3, so don't include Y here!

Note that splitting the G92 is only necessary because the OP wanted to home to a non-zero Y coordinate, most can just use the simplified case with G92 after the G28.3:
G28.2 X0 Y0 Z0 A0 B0 C0     ;For LitePlacer, the A0 B0 C0 do nothing here and can be removed
G28.3 X0 Y0 Z0 A0 B0 C0     ;Force the absolute coordinates to these values (really only need A, B, and C here)
G92 X0 Y0 Z0 A0 B0 C0       ;Set all G92 offsets to zero


ma...@makr.zone

unread,
Sep 22, 2021, 2:26:07 AM9/22/21
to ope...@googlegroups.com

@tonyluken,

So if I change the HOME_COMMAND Issues & Solutions suggestions to this:

    else if (isTinyG) {
        commandBuilt = "G28.2 ";
        for (String variable : gcodeDriver.getAxisVariables(machine)) {
            if ("XYZ".indexOf(variable) >= 0) {
                // In TinyG you need to indicate the axis and only 0 is possible as coordinate.
                commandBuilt += variable+"0 "; 
            }
        }
        commandBuilt += "; Home all axes\n";
        commandBuilt += "G28.3 ";
        for (ControllerAxis axis : gcodeDriver.getAxes(machine)) {
            if (!axis.getLetter().isEmpty()) {
                commandBuilt += axis.getLetter()+axis.getHomeCoordinate()+" ";
            }
        }
        commandBuilt += "; Set all axes to home coordinates\n";
        commandBuilt += "G92 ";
        for (ControllerAxis axis : gcodeDriver.getAxes(machine)) {
            if (!axis.getLetter().isEmpty()) {
                commandBuilt += axis.getLetter()+axis.getHomeCoordinate()+" ";
            }
        }
        commandBuilt += "; Reset all offsets to home coordinates\n";
    }

Do you think this is universally right?

It can then handle non-zero home coordinates (home to max) as set on the axis:

_Mark

tonyl...@gmail.com

unread,
Sep 22, 2021, 1:52:17 PM9/22/21
to OpenPnP
Yes, I tried that on my TinyG and it appears to work fine.

tonyl...@gmail.com

unread,
Sep 24, 2021, 3:29:14 PM9/24/21
to OpenPnP
I just noticed that TinyG supports G92.1 (Reset origin offsets)  so that is an even simpler option.  Just replace the G92 Xnnn .... line with G92.1 so the HOME_COMMAND would look something like:

G28.2 X0 Y0 Z0 ; Home all axes
G28.3 X0 Y600 Z0 A0 ; Set all axes to their home coordinates
G92.1 ; Reset all offsets

ma...@makr.zone

unread,
Sep 25, 2021, 9:15:25 AM9/25/21
to ope...@googlegroups.com

I will do that, thanks!

ma...@makr.zone

unread,
Oct 27, 2021, 3:09:29 PM10/27/21
to OpenPnP
Hi all,

There is now even a better solution using variable substitution in the HOME_COMMAND, i.e. that will dynamically adapt to the home coordinates, when they are later changed on the Axes:

27-10-2021 18-05-28.png

See here (with Instructions):

This is available as new testing version (in about 10 minutes):

_Mark
Reply all
Reply to author
Forward
0 new messages