Changes on machine.xml won't save

109 views
Skip to first unread message

John Smith

unread,
Jul 16, 2017, 10:32:24 AM7/16/17
to OpenPnP
Hi,

i am currently working on a project to build a pnp with a smoothieboard v1.1. 
We've come a long way but i am stuck with the machine.xml file. Every time i restart OpenPnp the xml file resets to the original configurations. 
I am using Sublime text editor on a windows 7. 

Thanks
//Smith

Jason von Nieda

unread,
Jul 16, 2017, 10:47:11 AM7/16/17
to OpenPnP
Make sure you are not editing it while openpnp s running. It writes the config on exit.
--
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/910aceb4-ad98-45a6-b668-c2c4674ffe20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Smith

unread,
Jul 16, 2017, 11:10:24 AM7/16/17
to OpenPnP


Thanks Jason, that solved the problem!

I am having another problem btw.
Every time i try to jog the X-axis after homing it starts to move to a different locations and then gives me this error message: "Timeout waiting for response to M400; Wait for moves to complete before returning". If i neglecting this error i can jog the axis as i please.
Note: This also occures if i try to jog 100mm.
 
//Smith

Jason von Nieda

unread,
Jul 16, 2017, 11:14:04 AM7/16/17
to OpenPnP
This is usually due to a synchronization issue during connect/startup, or a failure to set the home location. Use the Help->Submit Diagnostics menu to send logs after trying to jog one 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 post to this group, send email to ope...@googlegroups.com.

John Smith

unread,
Jul 16, 2017, 11:28:27 AM7/16/17
to OpenPnP

Jason von Nieda

unread,
Jul 16, 2017, 11:38:06 AM7/16/17
to OpenPnP
Okay, a couple things to check:

1. It looks like your Smoothie is taking a little longer than usual to respond to connect message, so try increasing the connect timeout (in Gcode Serial settings) to 2000.
2. It looks like you didn't run a homing operation before jogging, which means OpenPnP doesn't really know where your machine is. Always home before jogging.
3. Your max feed rate is set to 1000 mm per minute, which is 16mm per second, which is pretty slow. I think what is actually happening in detail is you are running a jog to an unknown location, which could be a long distance, and it's happening so slowly that OpenPnP times out waiting for the move to complete.

So, in summary:
Increase the connect timeout to 2000, then try homing, then try jogging 1mm or so. If that all works, consider increasing the max feed rate or if you want to keep it low, increase the command timeout.

Jason


John Smith

unread,
Jul 16, 2017, 12:05:26 PM7/16/17
to OpenPnP
I changed everything you recommended and i no longer get the M400 error message. But i still get wrong movments on x-axis after homing. X-axis still moves around 200 mm even trou i jog 0.1 mm. This is only a problem the first time i jog  the x-axis after homing. https://gist.github.com/anonymous/b53af267c60870d26c8000bbdfaeffbc

Jason von Nieda

unread,
Jul 16, 2017, 12:07:35 PM7/16/17
to OpenPnP
Send your Smoothie config.txt please

John Smith

unread,
Jul 16, 2017, 12:14:54 PM7/16/17
to OpenPnP
Hehe kinda embarrasing but we burnt the motor drivers for M1 and M2 so i've changed the configurations so the X and Y axis is on M3 and M4. I've ordered new motor drivers so the normal configurations will be applied. But the rest should be fine. Here you go.
config

Jason von Nieda

unread,
Jul 16, 2017, 12:42:09 PM7/16/17
to OpenPnP
Hi John,

Okay, in your Smoothie config you have alpha_homing_direction set to home_to_max, but you don't have alpha_max set. So, when Smoothie homes I'm not sure where it's going to think it is. Typically, if you have home_to_max set, you also set the max and then you put that same value in OpenPnP's axis configuration as the home-coordinate. This way, after OpenPnP homes, it knows where the machine is. 

So, what I'd suggest is leave OpenPnP out of it for now and work on making sure your machine is moving correctly with something simpler, like PrintRun/Pronterface. See https://github.com/openpnp/openpnp/wiki/Setup-and-Calibration%3A-Before-You-Start#machine-working-outside-openpnp for thoughts on that.

You can use the M114 command to ask Smoothie where it thinks it is. You could even add this to your OpenPnP HOME_COMMAND so that you get a note of where Smoothie thinks it is in your OpenPnP logs after homing.

The bottom line is that after homing, OpenPnP needs to know where Smoothie is. By default it assumes that after homing Smoothie is at 0,0,0,0. To change that assumption, you set home-coordinate in the axis config. 

So, what I would do is:
1. Install Printrun and get it connected to your Smoothie.
2. Hit the Home button and ensure the machine homes the way you expect it to. If not, adjust Smoothie config and try again.
3. Once it homes correctly, enter M114 and note down where Smoothie says it is. If this is not what you expect, adjust Smoothie config and try again.
4. Once the above is all as you expect, enter those home coordinate values into your machine.xml in the axis configs under home-coordinate: https://github.com/openpnp/openpnp/wiki/GcodeDriver%3A-Axis-Mapping

Jason



John Smith

unread,
Jul 17, 2017, 6:09:34 AM7/17/17
to OpenPnP
All problems solved Jason!

Thank you very much! I will take your advise on making it work with pronterface.

//Smith 
 
Reply all
Reply to author
Forward
0 new messages