Hi everybody. Can somebody please give me a hand with using a sub driver to relay commands to a second machine controller? I'm using GRBL to control the X and Y axes, and so far everything is working without issue. My plan is to make the vacuum heads fully self contained, and for this, I want to use a second controller to move the Z and rotation axes, activate the pumps and check the vacuum status of the nozzles on the head. Any tips on how to link two controllers?
--
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 post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/2cb89a9e-1c30-45e6-8151-7495eb6518a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d7bda68b-78c4-419a-a8de-a878ebd77e0f%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 post to this group, send email to ope...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/a2783ece-4630-4f48-a2fe-3534f02b185f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/1fe28ca2-df3e-404a-950f-a675339ea2ca%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/dd68fcd5-e9ac-4426-8d84-f35ae94801f0%40googlegroups.com.
<sub-drivers class="java.util.ArrayList">
<gcode-driver communications="serial" connection-keep-alive="true" units="Millimeters" max-feed-rate="1000" backlash-offset-x="-1.0" backlash-offset-y="-1.0" non-squareness-factor="0.0" backlash-feed-rate-factor="0.1" timeout-milliseconds="5000" connect-wait-time-milliseconds="3000" visual-homing-enabled="true" name="subDriver">
<serial line-ending-type="LF" port-name="COM5" baud="115200" flow-control="Off" data-bits="Eight" stop-bits="One" parity="None" set-dtr="false" set-rts="false" name="SerialPortCommunications"/>
<tcp line-ending-type="LF" ip-address="127.0.0.1" port="23" name="TcpCommunications"/>
<homing-fiducial-location units="Millimeters" x="0.0" y="0.0" z="0.0" rotation="0.0"/>
<command type="COMMAND_CONFIRM_REGEX">
<text><![CDATA[^ok.*]]></text>
</command>
<command type="MOVE_TO_COMMAND">
<text><![CDATA[G0 {Z:Z%.4f} {Rotation:E%.4f} F{FeedRate:%.0f} ; Send standard Gcode move]]></text>
<text><![CDATA[G4 P0 ; Wait for moves to complete before returning]]></text>
</command>
<command type="CONNECT_COMMAND">
<text><![CDATA[G21 ; Set millimeters mode]]></text>
<text><![CDATA[G90 ; Set absolute positioning mode]]></text>
</command>
<sub-drivers class="java.util.ArrayList"/>
<axes class="java.util.ArrayList"/>
<axis name="z" type="Z" home-coordinate="0.0">
<head-mountable-ids class="java.util.HashSet">
<string>*</string>
</head-mountable-ids>
</axis>
<axis name="rotation" type="Rotation" home-coordinate="0.0">
<head-mountable-ids class="java.util.HashSet">
<string>*</string>
</head-mountable-ids>
</axis>
</axes>
</gcode-driver>
</sub-drivers>To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ae7e4312-ae2d-4803-90e3-d061e6c47083%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/ae7e4312-ae2d-4803-90e3-d061e6c47083%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/34676acb-74f1-46f9-b791-2b9bbac880aa%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/34676acb-74f1-46f9-b791-2b9bbac880aa%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/e6bdf512-d12e-4475-a957-64c651399387%40googlegroups.com.
I am building a similar system with two nanos running grbl 1.1 and I just ran into this problem a couple days ago.
In my case I have xyz on obe and rotation on the other
The trick is to define the Rotation axis in the sub-driver, which has its serial set to the second arduino. The rotation driver is wired to the X step/direction on this arduino. Then in the gcode for move on the subdriver you use code to send the rotation function to the X, something like
G1 {Rotation:X%f.4} etc
I'll post my machine.xml later as I'm thumbing this on my phone.
Point is, the subdriver grbl is calling the axis X but openpnp is using that X as Rotation.
It does seem that the main driver completes first before the subdriver command is sent.