Either you switched off the default machine coordination Before
Actuation switch on the Actuator...
https://github.com/openpnp/openpnp/wiki/Motion-Planner#actuator-machine-coordination
... or you re-used the actuator as a contact probe (you would not be the first one to confuse these two):
https://github.com/openpnp/openpnp/wiki/Contact-Probing-Nozzle
_Mark
I have a stock LitePlacer. I'm testing the placement of parts with OpenPnP and I've run into a bit of a problem. The part of picked from the feeder and checked with the bottom camera and moved over to its placement on the board. As the nozzle is lowering to place the part the vacuum turns off before the part touches the board. This is causing the part to fall, rather than be placed, causing a misplaced part.
I've looked all over the UI for a setting for when the vacuum is to be turned off during placement. Does this have something to do with the Place Dwell Time? I tried adjusting that but no joy.
--
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/e2992cb8-c7d0-49a3-931a-d510912ae218n%40googlegroups.com.

I just saw that you actually included the machine.xml in the OP,
good!
It seems to be a a contact probe problem. You seem to have an extremely large probe offset of 13 mm and probe depth of 23 mm!
And I guess the probing does not work correctly, i.e. it seems to immediately trigger. Maybe the probe switch is not configured right (polarity?).
Note also, that the direction of Z changes between the
Liteplacer Software and OpenPnP:
OpenPnP uses the standard right-handed Cartesian coordinate
system (Z axis is pointing up), while the Liteplacer uses a
non-standard left-handed coordinate system (Z is pointing down).
This means that the motor polarity and end-switches are swapped.
Other users needed to swap some wires and some config ... I don't
remember exactly what.
@Liteplacer users please help.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ed989c20-1896-4db3-ae09-04005aabc600n%40googlegroups.com.
I looked at your log in the OP and it seems that probing is set
up correctly but it stops too early.
It stops at Z:-35.7512. It says
probed part R0603-267k height at offset -4.394mm
This seems too much for a 0603 resistor.
It seems that the switch is triggered before the nozzle tip/part
actually hits the PCB. Maybe there is a mechanical obstruction, or
an electrical glitch? Are your end-stop lines shielded or at least
twisted-paired?
_Mark
2022-04-21 10:35:01.271
GcodeAsyncDriver$WriterThread TRACE: [serial://COM4]
>> G38.2Z-50F540; probe down in absolute
coordinates until limit switch is hit
2022-04-21 10:35:01.286 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:35:01.286 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << qr:32, qi:2, qo:2
2022-04-21 10:35:01.286 GcodeDriver TRACE: [serial://COM4]
confirmed G38.2Z-50F540; probe down in absolute coordinates
until limit switch is hit
2022-04-21 10:35:01.286 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << qr:31, qi:1, qo:0
2022-04-21 10:35:01.287 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M400; wait until machine has stopped
2022-04-21 10:35:03.351 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << qr:32, qi:1, qo:1
2022-04-21 10:35:03.351 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:35:03.351 GcodeDriver TRACE: [serial://COM4]
confirmed M400; wait until machine has stopped
2022-04-21 10:35:03.351 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M400; Wait for moves to complete before
returning
2022-04-21 10:35:03.367 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:35:03.367 GcodeDriver TRACE: [serial://COM4]
confirmed M400; Wait for moves to complete before returning
2022-04-21 10:35:03.368 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M114; get position
2022-04-21 10:35:03.391 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << X:101.3892 Y:58.4699 Z:-35.7512
A:-89.5993 B:0.0000 C:0.0000
2022-04-21 10:35:03.391 GcodeDriver TRACE: Position report:
X:101.3892 Y:58.4699 Z:-35.7512 A:-89.5993 B:0.0000 C:0.0000
2022-04-21 10:35:03.391 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:35:03.391 GcodeDriver TRACE: GcodeDriver got
lastReportedLocation (x:101.389200, y:58.469900, Z:-35.751200,
A:-89.599300)
2022-04-21 10:35:03.391 GcodeAsyncDriver TRACE: GcodeDriver
confirmation complete.
2022-04-21 10:35:03.391 AbstractMotionPlanner DEBUG: Reported
location changes current location from (x:101.389163,
y:58.469907, Z:-18.356900, A:-89.599299) to (x:101.389200,
y:58.469900, Z:-35.751200,
A:-89.599300)
2022-04-21 10:35:03.391 AbstractHeadMountable DEBUG:
N.moveTo((15.874718, 55.367441, -34.944300, -89.599300 mm), 1.0)
2022-04-21 10:35:03.391 ContactProbeNozzle TRACE:
N.toHeadLocation((15.874718, 55.367441, -35.751200, -89.599300
mm), ...) Z offset 0.807mm
2022-04-21 10:35:03.391 ContactProbeNozzle DEBUG: Nozzle N probed part R0603-267k height at
offset -4.394mm
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/db1f036b-90c2-4a21-99f3-c1b2105ceff5n%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.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/163a6452-9216-43c0-bb09-d8abd746c6a4n%40googlegroups.com.
I see some things that I think you should improve i.e. that I've
done differently on my Liteplacer. Note, I'm not sure they're
actually related to the problem at hand, but you should sort this
out first.
_Mark
022-04-21 10:19:53.415 GcodeAsyncDriver
DEBUG: serial://COM4 commandQueue.offer(G38.2
Z-50.0 F540.0 ; probe down in absolute coordinates until limit
switch is hit, 1800000)...
2022-04-21 10:19:53.415 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M400 ; wait until machine has
stopped, 1800000)...
2022-04-21 10:19:53.415 GcodeDriver TRACE: [serial://COM4]
confirmed M114; get position
2022-04-21 10:19:53.415 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M400 ; Wait for moves to complete before
returning, 1800000)...
2022-04-21 10:19:53.416 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M114 ; get position, -1)...
2022-04-21 10:19:53.416 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> G38.2Z-50F540; probe down in absolute
coordinates until limit switch is hit
2022-04-21 10:19:53.428 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:19:53.428 GcodeDriver TRACE: [serial://COM4]
confirmed G38.2Z-50F540; probe down in absolute coordinates
until limit switch is hit
2022-04-21 10:19:53.428 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << qr:32, qi:2, qo:2
2022-04-21 10:19:53.429 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << qr:31, qi:1, qo:0
2022-04-21 10:19:53.429
GcodeAsyncDriver$WriterThread TRACE: [serial://COM4] >> M400; wait until machine has stopped
2022-04-21 10:19:55.493
GcodeDriver$ReaderThread TRACE: [serial://COM4] << qr:32,
qi:1, qo:1
2022-04-21 10:19:55.493 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:19:55.493 GcodeDriver TRACE: [serial://COM4]
confirmed M400; wait until machine has stopped
2022-04-21 10:19:55.494 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M400; Wait for moves to complete before
returning
2022-04-21 10:19:55.509 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:19:55.509 GcodeDriver TRACE: [serial://COM4]
confirmed M400; Wait for moves to complete before returning
2022-04-21 10:19:55.510 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M114; get position
2022-04-21 10:19:55.532 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << X:101.7638 Y:59.0841 Z:-35.7512
A:-59.7864 B:0.0000 C:0.0000
2022-04-21 10:19:55.532 GcodeDriver TRACE: Position report:
X:101.7638 Y:59.0841 Z:-35.7512 A:-59.7864 B:0.0000 C:0.0000
2022-04-21 10:19:55.533 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:19:55.533 GcodeDriver TRACE: GcodeDriver got
lastReportedLocation (x:101.763800, y:59.084100, Z:-35.751200,
A:-59.786400)
2022-04-21 10:19:55.533 GcodeAsyncDriver TRACE: GcodeDriver
confirmation complete.
2022-04-21 10:19:55.533 AbstractMotionPlanner DEBUG: Reported
location changes current location from (x:101.763791,
y:59.084081, Z:-18.356900, A:-59.786434) to (x:101.763800,
y:59.084100, Z:-35.751200, A:-59.786400)
2022-04-21 10:19:55.533 AbstractHeadMountable DEBUG:
N.moveTo((16.249318, 55.981641, -34.944300, -59.786400 mm), 1.0)
2022-04-21 10:19:55.533 ContactProbeNozzle TRACE:
N.toHeadLocation((16.249318, 55.981641, -35.751200, -59.786400
mm), ...) Z offset 0.807mm
2022-04-21 10:19:55.534 ContactProbeNozzle DEBUG: Nozzle N probed part R0603-267k height at
offset -4.394mm
2022-04-21 10:19:55.534 ReferenceActuator DEBUG:
ContactProbeActuator.actuate(false)
2022-04-21 10:19:55.534 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M400 ; Wait for moves to complete before
returning, 1800000)...
2022-04-21 10:19:55.534 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M114 ; get position, -1)...
2022-04-21 10:19:55.534 GcodeDriver TRACE: [serial://COM4]
confirmed M114; get position
2022-04-21 10:19:55.535 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M400; Wait for moves to complete before
returning
2022-04-21 10:19:55.548 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:19:55.548 GcodeDriver TRACE: [serial://COM4]
confirmed M400; Wait for moves to complete before returning
2022-04-21 10:19:55.549 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M114; get position
2022-04-21 10:19:55.573 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << X:101.7638 Y:59.0841 Z:-35.7512
A:-59.7864 B:0.0000 C:0.0000
2022-04-21 10:19:55.573 GcodeDriver TRACE: Position report:
X:101.7638 Y:59.0841 Z:-35.7512 A:-59.7864 B:0.0000 C:0.0000
2022-04-21 10:19:55.573 GcodeDriver$ReaderThread TRACE:
[serial://COM4] << tinyg [mm] ok>
2022-04-21 10:19:55.573 GcodeDriver TRACE: GcodeDriver got
lastReportedLocation (x:101.763800, y:59.084100, Z:-35.751200,
A:-59.786400)
2022-04-21 10:19:55.573 GcodeAsyncDriver TRACE: GcodeDriver
confirmation complete.
2022-04-21 10:19:55.573 Scripting TRACE: Scripting.on
Nozzle.AfterPlaceProbe
2022-04-21 10:19:55.574 ReferenceNozzle DEBUG: N.place()
2022-04-21 10:19:55.574 Scripting TRACE: Scripting.on
Nozzle.BeforePlace
2022-04-21 10:19:55.574 ReferenceActuator DEBUG: VACUUM_SWITCH.actuate(false)
2022-04-21 10:19:55.574 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M9, 1800000)...
2022-04-21 10:19:55.574 GcodeDriver TRACE: [serial://COM4]
confirmed M114; get position
2022-04-21 10:19:55.574 ReferenceActuator DEBUG: AVAC.actuate(false)
2022-04-21 10:19:55.574 GcodeAsyncDriver DEBUG: serial://COM4
commandQueue.offer(M5, 1800000)...
2022-04-21 10:19:55.574 GcodeAsyncDriver$WriterThread TRACE:
[serial://COM4] >> M9
--
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/5dd6e41e-d022-4aeb-aea8-0abc038a9901n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/cae27327-1ca3-46ba-879d-9c4169c6a424n%40googlegroups.com.
I agree it does not look like -17mm. Look at the edge of
the camera holder vs. the rotation motor plate.
Strange.
@tonyluken, am I right to assume
that you are using contact probing in pick/place? And you do not
have this problem? Could you two compare notes on used IOs,
config, etc?
This is just the "dumb" variant. If you have vacuum sensors,
please read and understand in the context of the whole Wiki page:
https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Vacuum-Sensing
This might also be useful:
https://makr.zone/vacuum-sensor/192/
Note: you cannot resolve the probing problem we are taking about with these dwell times. These come after actuating the valve/pump, i.e. too late.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/a0ed055c-e05a-47fd-9375-6c5fd9104abfn%40googlegroups.com.
> Could this all have something to do with using the async driver?
Theoretically yes, especially if the machine coordination was not configured right, but as I said before, the log shows that everything is done in the right order, and it also correctly waits for the probing to complete (2 second time gap in the log).
So this can be excluded with a high degree of confidence.
I assume you already tried these actuators by hand, right?
https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Actuators#actuator-control-panel
They do work immediately and as long as you leave them on, right?
And just to check: your PSU is strong enough? Have you ever
scoped it? Just asking, because it seems that the pump stops about
the same time that the Z motor has to struggle against the spring
loading, and a PSU drooping would also explain the missing -17 mm.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/3f299f62-7ac1-4af8-abfe-6f80798e677dn%40googlegroups.com.
> I just tried it and can confirm that sending g38.2 (the probe command) causes my vacuum pump to also shut-off. I took a quick look at the TinyG code and found this in cycle_probing.c
Thanks Tony for figuring this out. I actually had a look too, but somehow I must have missed it. 😭
I wondered WTH this is not an issue in the original Liteplacer software. In the firmware I traced it back in git (blame) and it seems to have been added in 2014-01-17. I didn't think the Liteplacer sold TinyG boards are shipped with even older firmware.
Then I looked at the Liteplacer software:
They are not actually Z probing but Z homing using G28.4. For this they are on-the-fly reconfiguring the switches of the Z axis, and then back. Which also means they are writing twice to the EEPROM on each probe. Very ugly.
The G28.4 command is undocumented, but see here:
"G28.4 homing cycle with no
coordinate setting"
https://github.com/synthetos/TinyG/blob/39df38c0e5830721fb2d16a7ae7b44816d24c4c4/firmware/tinyg/canonical_machine.h#L381
I removed the SPINDLE_OFF in the "best for PnP" build.
See here (updated):
https://makr.zone/tinyg-new-g-code-commands-for-openpnp-use/577/
Note: I only updated the ADC enabled build. Make sure you have
not used the SS2 signal for other purposes.
@Jim, please flash the new firmware
and retry. Note: this time there is no need for the elaborate
settings backup etc.
It would be great if you could test this! 😁
I've added a "documentary" PR too:
https://github.com/synthetos/TinyG/pull/276
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/81285967-43d2-480d-9230-660a9bced837n%40googlegroups.com.
> What!? Wouldn't that slowly destroy the EEPROM?
Yes. Like I said: Very ugly.
... in a DIY/spare time/hobby environment where you do a few
boards per year, probably still not really going to
matter...
But because TinyG is going brain-dead while writing to the EEPROM
(not handling interrupts), they had to add a 50ms pause after each
command:
Really. Very. Ugly. 🤮
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b2f323c7-8d9f-4859-a417-b5aacccf6e5cn%40googlegroups.com.
> I did a comparison of my TinyG settings and I have
noticed some odd differences:
> $yjm is now set to 101
> Before flashing the firmware $yjm=2500
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/cb360fbb-f9ca-44a7-a0eb-f1044dc5e31dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/8f146039-9dd1-4f64-8efd-ee872a546132n%40googlegroups.com.