Smoothie > openpnp > G-code driver? Help!

Visto 1.706 veces
Saltar al primer mensaje no leído

SMdude

no leída,
18 jul 2016, 8:36:4818/7/16
a OpenPnP
Hi Guys,

So, I have set up my x and y rails, motors and drivers to smoothie, homed and driven them in pronterface, no problems.
I am using the windows x64 driver from the "previous" folder on the smoothie sd card as I could not get the latest driver to load to my system, win 7 64.

When I initially set up the stable openpnp version I set it up to run the demo and played about with the demo. I then connected to my smoothie and selected the G-code driver under reference machine. Restarted, Then selected com port, etc. If the smoothie is not physically connected, I get an error when I try to connect. So when the smoothie is connected I am able to connect(green button) without any problems.
Then, when I jog or home the machine, the demo machine in the camera view jogs around, whereas my hardware does nothing. I seem to have missed something. I have not edited anything in the g-code driver.
I have uninstalled the stable version and deleted the .openpnp directory with the machine xml file. Then I installed the latest binary from the develop branch for exactly the same result. The demo job still seems visible in the camera view, and the demo machine moves about, though I have not loaded the demo job in this version or instance!

Quite simply, all I want to do is move and home the machine with openpnp so I can be satisfied with that and move on to the next steps. I don't have cameras or heads just yet.

I have attached the machine xml and log file.

I have noted in the machine.xml that there are some  <string>*</string> and I suspect that a G command needs to go there. Where do I find this information?

<driver class="org.openpnp.machine.reference.driver.GcodeDriver" port-name="COM12" baud="115200" flow-control="Off" data-bits="Eight" stop-bits="One" parity="None" set-dtr="false" set-rts="false" units="Millimeters" max-feed-rate="1000" timeout-milliseconds="5000" connect-wait-time-milliseconds="1000">
         <command-confirm-regex>^ok.*</command-confirm-regex>
         <sub-drivers class="java.util.ArrayList"/>
         <axes class="java.util.ArrayList">
            <axis name="x" type="X" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <axis name="y" type="Y" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <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>
      </driver>

Thanks!
Mick



machine.xml
OpenPnP.log

Cri S

no leída,
18 jul 2016, 11:00:4618/7/16
a OpenPnP
The log file say, "no machine.xml file found" . The default uses null driver that don't have hardware interaction.
Maybe you should indicate the position of machine.xml file with the -DconfigDir=directory_for_machine_xml  in order to be sure the correct directory is used.

Jason von Nieda

no leída,
18 jul 2016, 11:57:3718/7/16
a OpenPnP
SMdude, 

As you guessed, you need to add your Gcode information to the configuration file. Take a look at https://github.com/openpnp/openpnp/wiki/GcodeDriver. You can use the example configuration at the bottom as a starting point. At the very least, you just need to add:

<move-to-command>G0 {X:X%.4f} {Y:Y%.4f} {Z:Z%.4f} {Rotation:E%.4f} F{FeedRate:%.0f}
M400</move-to-command>

Note that there is a newline after the FeedRate section and before the M400.

Don't use -DconfigDir as Cri suggested. This will just cause confusion and is not necessary.

The reason you saw the demo again is that you deleted the .openpnp directory. When OpenPnP cannot find any config in the .openpnp directory it creates a default one with the demo setup.

I highly recommend following the guide: https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration

Jason


--
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/51046e45-e1c2-4bd7-94e2-4c104087ed5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SMdude

no leída,
18 jul 2016, 20:22:3418/7/16
a OpenPnP
Hi Jason, I have been following the guide, and been going through the gcode driver configuration. However I can't find an example in there of adding a gcode command for each of the axis. To me it seems a bit unclear! However knowing what I know now, I shall persevere with it and see how I go tonight! Thanks for your help :)

Cheers!

Jason von Nieda

no leída,
18 jul 2016, 20:24:3918/7/16
a OpenPnP
No need to add the code for each axis. Just add that one line that I showed and you should be able to get up and running. 

I'm working on some basic example configurations for various controllers that I hope to post by mid-week that should make this process easier.

Jason


On Mon, Jul 18, 2016 at 5:22 PM SMdude <spiteri...@gmail.com> wrote:
Hi Jason, I have been following the guide, and been going through the gcode driver configuration. However I can't find an example in there of adding a  gcode command for each of the axis. To me it seems a bit unclear! However knowing what I know now, I shall persevere with it and see how I go tonight! Thanks for your help :)

Cheers!

--
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.

SMdude

no leída,
18 jul 2016, 22:39:4518/7/16
a OpenPnP
Thanks Jason!


SMdude

no leída,
19 jul 2016, 5:42:4719/7/16
a OpenPnP
Hi Jason,

Awesome!! :D :D

The homing button doesn't do anything atm(does not matter at this point in time), however jogging etc all works. I ran the test job and it ran well(very slow). So I sped it up and got it up to 150 now. I said I wanted this machine to boogy and boogy it does!! :D I'm going to need a really good vacuum pump!
Need to still set up steps/mm and all that kind of stuff.
I have attached my current machine.xml containing the bit of code you posted earlier.

I also tried to load the machine.XML file from the wiki sample configuration, but openpnp chucked an error and exited before the program finished booting up. Anyway I suspect that you will review this shortly.

Thanks for the help..

machine.xml

Jason von Nieda

no leída,
19 jul 2016, 12:30:2319/7/16
a OpenPnP
Glad to hear it!

You need to add a home-command for homing, and a pick-command for picking, and so on.

Example:
<home-command>G28 X0 Y0 Z0</home-command>
<pick-command>M808</pick-command>

And so on. Check out the docs at https://github.com/openpnp/openpnp/wiki/GcodeDriver for all the valid commands.

Jason


--
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.

SMdude

no leída,
7 nov 2016, 7:13:537/11/16
a OpenPnP
Hi Jason,

I am trying to figure out where I define the Gcode to rotate my second nozzle.
The first nozzle rotates as it should and moves correctly in the Z axis.
When I select H1:N2, only the first nozzle rotates and z still moves as if N1 was selected
Also I will need to invert the z axis when using the second nozzle.
I have the modified firmware for smoothie installed and Z homes correctly.
My head operates the same way as Peters rack and pinion style dual head/ smallsmt dual belt head.

The other thing, when I am homing, I am homing to X_max Y_max(top right corner) then loading x=0, y=0 in the smoothie, I have a feeling that I should be loading say x=600 y=600, so then x:0 y:0 becomes bottom left?
Also, is there anywhere to set machine boundaries so I don't/can't jog the machine to destruction? Good thing my x and y drivers shut off for overload!

I am using the current develop binary.
Machine.xml attached..
Thank you!








machine.xml

Marco

no leída,
7 nov 2016, 9:42:377/11/16
a OpenPnP
Hi SMdude,

for the Z axis try samethings like that:
negate head-montable invert the Z for the second nozzle:


<axis name="z" type="Z" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>69edd567-df6c-495a-9b30-2fcbf5c9742f</string>
                  <string>269edd567-df6c-495a-9b30-2fcbf5c9742f</string>
               </head-mountable-ids>
                  <negated-head-mountable-id>269edd567-df6c-495a-9b30-2fcbf5c9742f</negated-head-mountable-id>
               </transform>
            </axis>

for C1, C2:

          <axis name="c1" type="Rotation" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>69edd567-df6c-495a-9b30-2fcbf5c9742f</string>
                        </head-mountable-ids>
               <pre-move-command>T0</pre-move-command>
            </axis>
            <axis name="c2" type="Rotation" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>269edd567-df6c-495a-9b30-2fcbf5c9742f</string>
               </head-mountable-ids>
               <pre-move-command>T1</pre-move-command>
           </axis>

make sure you've downloaded the latest version: fix bug about visual rotation axis c1 and c2

for the homing you can define here the coordinate:


<axes class="java.util.ArrayList">
            <axis name="x" type="X" home-coordinate="410.0">

               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <axis name="y" type="Y" home-coordinate="310.0">

               <head-mountable-ids class="java.util.HashSet">
                  <string>*</string>
               </head-mountable-ids>
            </axis>
            <axis name="z" type="Z" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>69edd567-df6c-495a-9b30-2fcbf5c9742f</string>
                  <string>269edd567-df6c-495a-9b30-2fcbf5c9742f</string>
               </head-mountable-ids>
               <transform class="org.openpnp.machine.reference.driver.GcodeDriver$CamTransform" cam-radius="24.0" cam-wheel-radius="9.5" cam-wheel-gap="2.0">
                  <negated-head-mountable-id>269edd567-df6c-495a-9b30-2fcbf5c9742f</negated-head-mountable-id>
               </transform>
            </axis>
            <axis name="c1" type="Rotation" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>69edd567-df6c-495a-9b30-2fcbf5c9742f</string>
               </head-mountable-ids>
               <pre-move-command>T0</pre-move-command>
            </axis>
            <axis name="c2" type="Rotation" home-coordinate="0.0">
               <head-mountable-ids class="java.util.HashSet">
                  <string>269edd567-df6c-495a-9b30-2fcbf5c9742f</string>
               </head-mountable-ids>
               <pre-move-command>T1</pre-move-command>
            </axis>
         </axes>

Attached my xml file
mine is a cam-based machine but it's simlar for the definition now that Jason realized those powerfull driver.


bye
MI
machine.xml

Jason von Nieda

no leída,
7 nov 2016, 10:05:107/11/16
a OpenPnP
SMDude,

Just to add on to what Marco said (which is all correct), you need to use Axis Mapping to define the axes on your machine. In particular you need an InvertingTransform on your Z axis, and you need two C / Rotation axes for your two nozzles. Then you need to define the Gcodes for the two Nozzles using tool specific commands.

Axis Mapping Details, including Transforms: https://github.com/openpnp/openpnp/wiki/GcodeDriver%3A-Axis-Mapping

The example on the Axis Mapping Details link is pretty close to what you want, you just need to update the IDs to match those in your machine.xml.

Jason


--
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.

SMdude

no leída,
8 nov 2016, 18:17:268/11/16
a OpenPnP
Thanks Marco and Jason.

I have modified the machine.xml, openpnp boots up, but I won't be able to try it till next week now.
Also need to order a driver ic for the smoothie and fit another nozzle motor as I seem to have killed both(damaged the driver in an earlier incident)

I fixed the homing in the smoothie config by loading x=500 y=500 when homed. Then when openpnp starts, it moves the head over to 0,0(bottom left corner) and starts from there.

I will let you know how it goes next week and when all is good I will post my config files, macxhine xml and a connection diagram for the smoothie to give everyone with a similar setup a head start..

Cheers!

Jason von Nieda

no leída,
8 nov 2016, 18:20:488/11/16
a OpenPnP
Sounds like progress! Looking forward to hearing about your results, and thank you for offering to document your system. That will be very helpful!

Jason


--
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.

ga...@nationtechnology.com

no leída,
19 oct 2017, 20:50:3219/10/17
a OpenPnP
Hi Guys,

Firstly a big thank you to both of you. I 'borrowed' your config file Mick and its fixed a few issues I was having, particularly my Z axis. That's going much better and I can tweak it from here.

I do have a problem with my two rotation axis however, I cant get any movement at all. I'm guessing its something to do with my SmoothieBoard (from Cohesion 3D, 6 axis board). However I'm not sure if its firmware or the config file. Config file attached. Firmware date on SD card is 16 June 2017. The config references extruders, which doesn't make too much sense to me - I need two rotation axis.

Any chance either of you could point me to a good firmware version and a few notes on how to fix the config so I can get rotation?

Chjeers
Gavin




config.txt

Jason von Nieda

no leída,
19 oct 2017, 21:45:5619/10/17
a ope...@googlegroups.com
Hi Gavin,

Smoothie doesn't support rotational axes, so we fake with the extruder axes. I've attached my Smoothie config and machine.xml to help get you started. The most important stuff is in the machine.xml in the GcodeDriver section. The T0 and T1 stuff is what selects each extruder axis for rotation.

Hope it helps.

Jason


--
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.
config.txt
machine.xml

SMdude

no leída,
19 oct 2017, 21:51:0219/10/17
a OpenPnP
Hi Gavin,

You will need to check your step,direction and enable pins are correct.

Are you able to make them work with pronterface?

If you manually try and turn the steppers does it feel like they are enabled? The should feel a bit steppy to turn by hand. It doesn't take much resistance to hold the shaft and prevent nema8's from moving.

And do you have your correct G code set in machine.xml?

ga...@nationtechnology.com

no leída,
20 oct 2017, 1:41:5820/10/17
a OpenPnP
Hi Guys,

Thanks for the help. I've loaded the files and adjusted the direction and steps and all is now good.
I put in a new smoothie firmware that seem to match the config files better than the one I had.
Really appreciate your quick response. Both heads are now rotation (and correct direction). Just need to calibrate these two and possible add a z axis homing and all should be good.

Thanks heaps
Gavin

Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos