A backlash calicration fail issue

214 views
Skip to first unread message

marvin

unread,
Feb 20, 2024, 12:22:57 PM2/20/24
to OpenPnP
HI.I am setting a new openpnp machine and get to the calibration part.when i enable the backlash calibration it will keep roport subject not found error.And here is the log info any idea about the reason why?Thanks

2024-02-20 22:12:13.411 ReferenceActuator DEBUG: LIGHT_TOP.actuate(true)
2024-02-20 22:12:13.411 GcodeDriver DEBUG: [serial://COM9] >> M807 S255, 20000
2024-02-20 22:12:13.412 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.412 GcodeDriver TRACE: [serial://COM9] confirmed M807 S255
2024-02-20 22:12:13.462 Scripting TRACE: Scripting.on Camera.BeforeSettle
2024-02-20 22:12:13.462 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.469 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.472 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.499 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.503 AbstractSettlingCamera TRACE: autoSettleAndCapture t=41 auto settle score: 3.191 compute time: 4
2024-02-20 22:12:13.503 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.530 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.535 AbstractSettlingCamera TRACE: autoSettleAndCapture t=73 auto settle score: 1.231 compute time: 4
2024-02-20 22:12:13.535 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.563 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.567 AbstractSettlingCamera TRACE: autoSettleAndCapture t=105 auto settle score: 1.171 compute time: 4
2024-02-20 22:12:13.567 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.594 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.599 AbstractSettlingCamera TRACE: autoSettleAndCapture t=136 auto settle score: 1.177 compute time: 3
2024-02-20 22:12:13.599 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.626 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.631 AbstractSettlingCamera TRACE: autoSettleAndCapture t=169 auto settle score: 0.179 compute time: 4
2024-02-20 22:12:13.631 AbstractSettlingCamera DEBUG: autoSettleAndCapture in 169 ms
2024-02-20 22:12:13.631 Scripting TRACE: Scripting.on Camera.AfterSettle
2024-02-20 22:12:13.631 ReferenceActuator DEBUG: LIGHT_TOP.actuate(false)
2024-02-20 22:12:13.631 GcodeDriver DEBUG: [serial://COM9] >> M806 S0, 20000
2024-02-20 22:12:13.632 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.632 GcodeDriver TRACE: [serial://COM9] confirmed M806 S0
2024-02-20 22:12:13.717 AbstractHeadMountable DEBUG: Top.moveTo((230.418091, 82.748737, 0.000000, 0.000000 mm), 0.49)
2024-02-20 22:12:13.717 GcodeDriver DEBUG: [serial://COM9] >> M204 S960 G1 X230.4181     F1850 ; move to target, 20000
2024-02-20 22:12:13.719 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.719 GcodeDriver TRACE: [serial://COM9] confirmed M204 S960 G1 X230.4181     F1850 ; move to target
2024-02-20 22:12:13.719 GcodeDriver DEBUG: [serial://COM9] >> M400 ; Wait for moves to complete before returning, 40816
2024-02-20 22:12:13.783 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.783 GcodeDriver TRACE: [serial://COM9] confirmed M400 ; Wait for moves to complete before returning
2024-02-20 22:12:13.783 AbstractHeadMountable DEBUG: Top.moveTo((231.418091, 82.748737, 0.000000, 0.000000 mm), 0.25)
2024-02-20 22:12:13.784 GcodeDriver DEBUG: [serial://COM9] >> M204 S250 G1 X231.4181     F949 ; move to target, 20000
2024-02-20 22:12:13.785 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.785 GcodeDriver TRACE: [serial://COM9] confirmed M204 S250 G1 X231.4181     F949 ; move to target
2024-02-20 22:12:13.786 GcodeDriver DEBUG: [serial://COM9] >> M400 ; Wait for moves to complete before returning, 40816
2024-02-20 22:12:13.912 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.912 GcodeDriver TRACE: [serial://COM9] confirmed M400 ; Wait for moves to complete before returning
2024-02-20 22:12:13.912 ReferenceActuator DEBUG: LIGHT_TOP.actuate(true)
2024-02-20 22:12:13.912 GcodeDriver DEBUG: [serial://COM9] >> M807 S255, 20000
2024-02-20 22:12:13.913 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:13.913 GcodeDriver TRACE: [serial://COM9] confirmed M807 S255
2024-02-20 22:12:13.963 Scripting TRACE: Scripting.on Camera.BeforeSettle
2024-02-20 22:12:13.963 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.967 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.970 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:13.994 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:13.999 AbstractSettlingCamera TRACE: autoSettleAndCapture t=36 auto settle score: 25.620 compute time: 4
2024-02-20 22:12:13.999 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:14.026 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:14.031 AbstractSettlingCamera TRACE: autoSettleAndCapture t=68 auto settle score: 1.208 compute time: 4
2024-02-20 22:12:14.031 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:14.058 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:14.063 AbstractSettlingCamera TRACE: autoSettleAndCapture t=100 auto settle score: 1.173 compute time: 4
2024-02-20 22:12:14.063 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:14.090 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:14.095 AbstractSettlingCamera TRACE: autoSettleAndCapture t=132 auto settle score: 1.188 compute time: 4
2024-02-20 22:12:14.095 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-20 22:12:14.122 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-20 22:12:14.127 AbstractSettlingCamera TRACE: autoSettleAndCapture t=164 auto settle score: 0.193 compute time: 4
2024-02-20 22:12:14.127 AbstractSettlingCamera DEBUG: autoSettleAndCapture in 164 ms
2024-02-20 22:12:14.127 Scripting TRACE: Scripting.on Camera.AfterSettle
2024-02-20 22:12:14.127 ReferenceActuator DEBUG: LIGHT_TOP.actuate(false)
2024-02-20 22:12:14.127 GcodeDriver DEBUG: [serial://COM9] >> M806 S0, 20000
2024-02-20 22:12:14.127 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-20 22:12:14.127 GcodeDriver TRACE: [serial://COM9] confirmed M806 S0
2024-02-20 22:12:14.212 AbstractMachine TRACE: Exception caught, executing pending motion: java.lang.Exception: Subject not found.
at org.openpnp.machine.reference.solutions.VisionSolutions.getPixelLocationShot(VisionSolutions.java:1513)
at org.openpnp.machine.reference.solutions.VisionSolutions.getSubjectPixelLocation(VisionSolutions.java:1480)
at org.openpnp.machine.reference.solutions.VisionSolutions.getDetectedLocation(VisionSolutions.java:1534)
at org.openpnp.machine.reference.solutions.CalibrationSolutions.calibrateAxisBacklash(CalibrationSolutions.java:722)
at org.openpnp.machine.reference.solutions.CalibrationSolutions$1.lambda$setState$0(CalibrationSolutions.java:283)
at org.openpnp.spi.base.AbstractMachine$1.call(AbstractMachine.java:578)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2024-02-20 22:12:14.213 AbstractMachine TRACE: Machine entering idle state.
2024-02-20 22:12:14.223 MessageBoxes DEBUG: Error: java.lang.Exception: Subject not found.

Ben

unread,
Feb 20, 2024, 4:38:40 PM2/20/24
to OpenPnP
did you calibrate the camera home fiducial before running backlash calibration?
Message has been deleted

marvin

unread,
Feb 21, 2024, 3:27:21 AM2/21/24
to OpenPnP
you mean the fiducial homing has to be enabled before backlash calibration?I have recalibrate the primare and secondary fiducial for several times.but still with this error.And i did not use fiducial homing while running those steps

Ben

unread,
Feb 21, 2024, 5:30:14 AM2/21/24
to OpenPnP
comparing to other group members, I am a beginner with openpnp, but I know that when I execute backlash calibration, I am doing it over the homing fiducial  pad, and backlash calibration will return with error if the pad is not recognized or the upper camera pixels was not set correctly. I assume that this is your problem.

marvin

unread,
Feb 21, 2024, 5:40:29 AM2/21/24
to OpenPnP
ok i will try it again.

mark maker

unread,
Feb 21, 2024, 9:57:28 AM2/21/24
to ope...@googlegroups.com

Hi,

difficult to diagnose from afar. 

A first wild guess would be insufficient camera settling.  I see some oscillation in the log (fourth score is higher than third) and scores are still going down a lot when you settle.

https://github.com/openpnp/openpnp/wiki/Camera-Settling

To rule it out:

  1. Go to the camera / Camera Settling tab.
  2. Enable the  Diagnostics? checkbox.
  3. Then redo the backlash calibration.
  4. Then after the fail, go back to the camera and use mouse-over "scratching" to watch the settle frames (the last frame is the one taken for vision).
    (a video that shows how: https://youtu.be/Pxg6g3KI5_E?feature=shared&t=61)
  5. Check whether the frame has really settled and crisp and well lit.
  6. Send a screen shot.
  7. Alternatively: just set to FixedTime and set a large settling time of say 1s and then retry the backlash calibration, and report if it fixes the problem.

If this is in deed the problem, please also report back whether you calibrated Camera Settling with I&S. If that were the case, then my calibration heuristics is not okay, and likely needs fixing.

If this is not the problem, report back too... maybe we will see something else in these images.

_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/683c8a6a-e29a-41ef-bcb8-358ab4d5e863n%40googlegroups.com.

marvin

unread,
Feb 22, 2024, 11:29:26 AM2/22/24
to OpenPnP
Mark thanks for your reply.i find it seems to be the mistake of my Y axis motor.i am using sevor motors for my X and Y axis.when i click jog panel for a 0.1mm movement i can see a obvious motion on x axis but it is different for Y axis.it did not react to some pulses.it will only happen on some short distance movement,so i did not find this before.Maybe this caused the primary and secondary fiducial calibration mistakes and caused all mistakes on backlash calibration and so on.I will use another motor and keep report.

marvin

unread,
Feb 26, 2024, 9:21:54 AM2/26/24
to OpenPnP
Here is the report.i replaced the Y motor but when i running backlash calibration it will stop at the first round of measurement. here is the tarce log and i have set the camera to fixedtime for 1000ms.

2024-02-26 22:18:42.591 ReferenceActuator DEBUG: LIGHT_TOP.actuate(true)
2024-02-26 22:18:42.591 GcodeDriver DEBUG: [serial://COM9] >> M807, 20000
2024-02-26 22:18:42.591 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:42.591 GcodeDriver TRACE: [serial://COM9] confirmed M807
2024-02-26 22:18:42.642 Scripting TRACE: Scripting.on Camera.BeforeSettle
2024-02-26 22:18:43.642 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-26 22:18:43.646 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-26 22:18:43.647 Scripting TRACE: Scripting.on Camera.AfterSettle
2024-02-26 22:18:43.647 ReferenceActuator DEBUG: LIGHT_TOP.actuate(false)
2024-02-26 22:18:43.647 GcodeDriver DEBUG: [serial://COM9] >> M806, 20000
2024-02-26 22:18:43.647 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:43.647 GcodeDriver TRACE: [serial://COM9] confirmed M806
2024-02-26 22:18:43.729 AbstractHeadMountable DEBUG: Top.moveTo((229.002655, 80.527907, -25.500000, 0.000000 mm), 1.0)
2024-02-26 22:18:43.731 GcodeDriver DEBUG: [serial://COM9] >> M204 S1212 G1 X229.0027     F1470 ; move to target, 20000
2024-02-26 22:18:43.732 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:43.732 GcodeDriver TRACE: [serial://COM9] confirmed M204 S1212 G1 X229.0027     F1470 ; move to target
2024-02-26 22:18:43.732 GcodeDriver DEBUG: [serial://COM9] >> M400 ; Wait for moves to complete before returning, 20000
2024-02-26 22:18:43.793 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:43.793 GcodeDriver TRACE: [serial://COM9] confirmed M400 ; Wait for moves to complete before returning
2024-02-26 22:18:43.793 AbstractHeadMountable DEBUG: Top.moveTo((230.002655, 80.527907, -25.500000, 0.000000 mm), 0.25)
2024-02-26 22:18:43.794 GcodeDriver DEBUG: [serial://COM9] >> M204 S76 G1 X230.0027     F370 ; move to target, 20000
2024-02-26 22:18:43.795 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:43.795 GcodeDriver TRACE: [serial://COM9] confirmed M204 S76 G1 X230.0027     F370 ; move to target
2024-02-26 22:18:43.795 GcodeDriver DEBUG: [serial://COM9] >> M400 ; Wait for moves to complete before returning, 20000
2024-02-26 22:18:44.039 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:44.040 GcodeDriver TRACE: [serial://COM9] confirmed M400 ; Wait for moves to complete before returning
2024-02-26 22:18:44.040 ReferenceActuator DEBUG: LIGHT_TOP.actuate(true)
2024-02-26 22:18:44.040 GcodeDriver DEBUG: [serial://COM9] >> M807, 20000
2024-02-26 22:18:44.040 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:44.040 GcodeDriver TRACE: [serial://COM9] confirmed M807
2024-02-26 22:18:44.091 Scripting TRACE: Scripting.on Camera.BeforeSettle
2024-02-26 22:18:45.092 Scripting TRACE: Scripting.on Camera.BeforeCapture
2024-02-26 22:18:45.096 Scripting TRACE: Scripting.on Camera.AfterCapture
2024-02-26 22:18:45.097 Scripting TRACE: Scripting.on Camera.AfterSettle
2024-02-26 22:18:45.097 ReferenceActuator DEBUG: LIGHT_TOP.actuate(false)
2024-02-26 22:18:45.097 GcodeDriver DEBUG: [serial://COM9] >> M806, 20000
2024-02-26 22:18:45.097 GcodeDriver$ReaderThread TRACE: [serial://COM9] << ok
2024-02-26 22:18:45.097 GcodeDriver TRACE: [serial://COM9] confirmed M806
2024-02-26 22:18:45.181 AbstractMachine TRACE: Exception caught, executing pending motion: java.lang.Exception: Subject not found.

at org.openpnp.machine.reference.solutions.VisionSolutions.getPixelLocationShot(VisionSolutions.java:1513)
at org.openpnp.machine.reference.solutions.VisionSolutions.getSubjectPixelLocation(VisionSolutions.java:1480)
at org.openpnp.machine.reference.solutions.VisionSolutions.getDetectedLocation(VisionSolutions.java:1534)
at org.openpnp.machine.reference.solutions.CalibrationSolutions.calibrateAxisBacklash(CalibrationSolutions.java:722)
at org.openpnp.machine.reference.solutions.CalibrationSolutions$1.lambda$setState$0(CalibrationSolutions.java:283)
at org.openpnp.spi.base.AbstractMachine$1.call(AbstractMachine.java:578)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2024-02-26 22:18:45.181 AbstractMachine TRACE: Machine entering idle state.
2024-02-26 22:18:45.191 MessageBoxes DEBUG: Error: java.lang.Exception: Subject not found.

mark maker

unread,
Feb 26, 2024, 9:28:11 AM2/26/24
to ope...@googlegroups.com

Okay then do the diagnostics, as I described earlier.

_Mark

marvin

unread,
Feb 28, 2024, 2:23:31 PM2/28/24
to OpenPnP
ok but i still think that there is something wrong with my motion controller.when running the backlash calibration the machine will keep move 0.01mm  but the motion seems abnormal.i will do some test with my motion controller and keep report.

marvin

unread,
Mar 2, 2024, 1:32:42 PM3/2/24
to OpenPnP

problem has been solved.i am using servor motors for x and y.The motor driver requires a 5v singnal but my mcu is a 3.3v type.So i use some 
photocoupler for the voltage level transform,but for the pulse singnal this type ofphotocouplof can't support such a high frequency.so it caused all those mistakes.And thank you again for your suggestions.Hope this discussion can also help those who want to build the motion controller themselve.Do not forget to choose a photocouplep with high frequency to deal with the pulse singnal of motors.
Reply all
Reply to author
Forward
0 new messages