Hi! I am trying to use Autoleveling on my carvey to mill PCB's,

Hi!
I am trying to use Autoleveling on my carvey to mill PCB’s, I got my probe functioning properly, but when I run Autoleveler, negative 72mm offset is added to the probe and the probing turns out to be waaaaaay off.
Do you have any ideas of where the issue might be?
Carvey uses customized GRBL firmware, but when I ran probing on UGS the values were more reasonable, unfortunately autoleveling feature is not working in the UGS just yet.

On the image you can see how far down the plane shifted for the first few probings.

From the look of the screenshot it seems that the board is not properly communicating with chilipeppr.

The grbl widget relies on the messaging protocol being strictly 1.1x or 0.9c+.

However apart from that it also looks like it is the board that is sending back the probe data with the offset and not an artefact of the autolevelling code.

The first step is perhaps to provide us some information about the variety of grbl that the board speaks. Then it may be necessary to capture the whole serial output to see where things are going wrong. That might helps us guess at why.

Looking at the gcarvin code base it appears to be forked from grbl 1.1e but stupidly sends a version statement of 2.0.0. So the grbl widget in chilipeppr doesn’t know what language it is listening to. It therefore defaults to 0.9c.

The probe message data is different between 0.9 and 1.1.

You can try, in the grbl widget, forcing v1 mode. The option is in the dropdown in the top right of the grbl widget.

But that does not explain why the controller is sending probe data with the offset, although it may be a coordinate system thing.

Try first with the forced v1 setting and let us know.

@Justin_Adie
Hello Justin,
thanks for the suggestion.
I tried forcing it into a v1 mode with the same result, I can try modifying the version statement to 1.1e. I’m not sure where though.

I ran through the code yesterday and didn’t see anything, I was specifically searching for a number 72 which is the negative offset applied, but no luck.

In v1 mode you should get meaningful information on the axis widget. Can you confirm this?

Hmmm, I actually don’t.
Never paid attention to it, but no.
Every axis shows 0.00 position regardless of where I move it.
Plus prior to homing all axis after hard reset the board comes back with all of it’s positions and WCO like in first screenshot.

But after homing, the board returns what’s on the second screenshot.

I just found where the 72.001 comes from but I don’t know how to fix this issue, preferably permanently. I never noticed that console shows anything different prior to homing, because homing was the first thing I did immediately after turning it on.

missing/deleted image from Google+

second screenshot
missing/deleted image from Google+

this suggests that you don’t have v1 mode toggled. The parser is not treating the messages as v1.x compliant.

could you manually send the $I and post the result?

$I returned with.

[VER:2.0.0.20170522:CARVEY:R26:930-1797189:CTRL1]
[OPT:VP]

In addition to this, the machine seems to time out after a minute or two and goes into hold, totally out of nowhere and the JSON Server stops intermittently.

it is very difficult to debug outages like that. the best is to capture a complete trace of SJPS in verbose mode.

it also helps to have echo turned on in grbl.

there are known issues with some usb to serial chips. if you’re using an atmel uart then you may want to look at reflashing that with the fixed firmware. I don’t recall where it is to be found I’m afraid - although I think I posted a link here 10 months or so ago.

I am still surprised that the axis widget is not providing meaningful information. The only thing I can think of is that you have not forced v1. mode. but perhaps it is also worth checking the js error console to see whether there is anything awry after the latest changes to fix the jsfiddle issues.

is there a way to install the SJPS ? I am using OSX and by far I was only clicking on the executable to run it and it just exits itself.
After a few minutes of running it showed this in the terminal.

/serial-port-json-server_1.86_darwin_amd64/serial-port-json-server
logout
Saving session…
…copying shared history…
…saving history…truncating history files…
…completed.

[Process completed]

completely out of nowhere…

You just run it like any other bash script. But to get verbose output you have to add a -v switch.

Stupid me, I just realized that I was using a wrong version of SJPS, it was an AMD64 version and my mac has Core i5 in it, just downloaded the right one and the console returns position values after homing.

But still doesn’t show position on the axis widget.

Honestly I am not sure how to start it with the -v switch, I ran this:
Pawel$ /Users/user/Downloads/serial-port-json-server-1.94_macosx/serial-port-json-server -v ;

but it starts normally without verbose

That is how you start it in verbose mode. You now need to capture the output from the terminal.

Remember you must force V1 mode. It won’t work otherwise.

oh! I see now!
I didn’t see the verbose because the device wasn’t connected yet.

2017/11/04 12:05:36 serial.go:252: Done with writeJson method
2017/11/04 12:05:36 serialport.go:233: Got p.sendBuffered. data:$G\n, id:status, pause:0
2017/11/04 12:05:36 bufferflow_grbl.go:68: BlockUntilReady() start
2017/11/04 12:05:36 bufferflow_grbl.go:72: New line length: 3, buffer size increased to:3
2017/11/04 12:05:36 bufferflow_grbl.go:73: &{0xc421eb0150 0xc421eb0150 1 0xc4200131f0 3}
2017/11/04 12:05:36 serialport.go:268: Got p.sendNoBuf. id:status, pause:0, data:$G\n
2017/11/04 12:05:36 serialport.go:275: Items In SPJS Queue List:0
2017/11/04 12:05:36 bufferflow_grbl.go:107: OnIncomingData() start. data:"[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]\r\nok\r\n"
2017/11/04 12:05:36 bufferflow_grbl.go:115: arrLines:[[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0] ok ]
2017/11/04 12:05:36 bufferflow_grbl.go:121: We have data lines to analyze. numLines:3
2017/11/04 12:05:36 bufferflow_grbl.go:134: Working on element:[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0], index:0
2017/11/04 12:05:36 bufferflow_grbl.go:134: Working on element:ok, index:1
2017/11/04 12:05:36 bufferflow_grbl.go:158: Buffer decreased to itemCnt:0, lenOfBuf:0
2017/11/04 12:05:36 bufferflow_grbl.go:165: Grbl just completed a line of gcode
2017/11/04 12:05:36 bufferflow_grbl.go:210: OnIncomingData() end.
2017/11/04 12:05:37 bufferflow_grbl.go:385: Just wrote 1 bytes to serial: ?
2017/11/04 12:05:37 bufferflow_grbl.go:107: OnIncomingData() start. data:"<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>\r\n"
2017/11/04 12:05:37 bufferflow_grbl.go:115: arrLines:[<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00> ]
2017/11/04 12:05:37 bufferflow_grbl.go:121: We have data lines to analyze. numLines:2
2017/11/04 12:05:37 bufferflow_grbl.go:134: Working on element:<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>, index:0
2017/11/04 12:05:37 bufferflow_grbl.go:189: Grbl status has not changed, not reporting to client
2017/11/04 12:05:37 bufferflow_grbl.go:210: OnIncomingData() end.
2017/11/04 12:05:37 bufferflow_grbl.go:385: Just wrote 1 bytes to serial: ?
2017/11/04 12:05:37 bufferflow_grbl.go:107: OnIncomingData() start. data:"<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>\r\n"
2017/11/04 12:05:37 bufferflow_grbl.go:115: arrLines:[<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00> ]
2017/11/04 12:05:37 bufferflow_grbl.go:121: We have data lines to analyze. numLines:2
2017/11/04 12:05:37 bufferflow_grbl.go:134: Working on element:<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>, index:0
2017/11/04 12:05:37 bufferflow_grbl.go:189: Grbl status has not changed, not reporting to client
2017/11/04 12:05:37 bufferflow_grbl.go:210: OnIncomingData() end.
2017/11/04 12:05:37 bufferflow_grbl.go:385: Just wrote 1 bytes to serial: ?
2017/11/04 12:05:37 bufferflow_grbl.go:107: OnIncomingData() start. data:"<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>\r\n"
2017/11/04 12:05:37 bufferflow_grbl.go:115: arrLines:[<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00> ]
2017/11/04 12:05:37 bufferflow_grbl.go:121: We have data lines to analyze. numLines:2
2017/11/04 12:05:37 bufferflow_grbl.go:134: Working on element:<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>, index:0
2017/11/04 12:05:37 bufferflow_grbl.go:189: Grbl status has not changed, not reporting to client
2017/11/04 12:05:37 bufferflow_grbl.go:210: OnIncomingData() end.
2017/11/04 12:05:37 bufferflow_grbl.go:385: Just wrote 1 bytes to serial: ?
2017/11/04 12:05:37 bufferflow_grbl.go:107: OnIncomingData() start. data:"<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>\r\n"
2017/11/04 12:05:37 bufferflow_grbl.go:115: arrLines:[<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00> ]
2017/11/04 12:05:37 bufferflow_grbl.go:121: We have data lines to analyze. numLines:2
2017/11/04 12:05:37 bufferflow_grbl.go:134: Working on element:<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>, index:0
2017/11/04 12:05:37 bufferflow_grbl.go:189: Grbl status has not changed, not reporting to client
2017/11/04 12:05:37 bufferflow_grbl.go:210: OnIncomingData() end.
2017/11/04 12:05:38 bufferflow_grbl.go:385: Just wrote 1 bytes to serial: ?
2017/11/04 12:05:38 bufferflow_grbl.go:107: OnIncomingData() start. data:"<Idle|MPos:-295.998,-199.204,-4.001|B"
2017/11/04 12:05:38 bufferflow_grbl.go:115: arrLines:[<Idle|MPos:-295.998,-199.204,-4.001|B]
2017/11/04 12:05:38 bufferflow_grbl.go:127: Did not find newline yet, so nothing to analyze
2017/11/04 12:05:38 bufferflow_grbl.go:107: OnIncomingData() start. data:“f:15,128|I:0.00>\r\n”
2017/11/04 12:05:38 bufferflow_grbl.go:115: arrLines:[<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00> ]
2017/11/04 12:05:38 bufferflow_grbl.go:121: We have data lines to analyze. numLines:2
2017/11/04 12:05:38 bufferflow_grbl.go:134: Working on element:<Idle|MPos:-295.998,-199.204,-4.001|Bf:15,128|I:0.00>, index:0
2017/11/04 12:05:38 bufferflow_grbl.go:189: Grbl status has not changed, not reporting to client
2017/11/04 12:05:38 bufferflow_grbl.go:210: OnIncomingData() end.
2017/11/04 12:05:38 hub.go:122: sendjson {“P”:"/dev/tty.usbserial-CARVEY1RBGNS",“Data”:[{“D”:"$G\n",“Id”:“status”}]}
2017/11/04 12:05:38 bufferflow_grbl.go:238: Command Before Break-Apart: “$G\n”
2017/11/04 12:05:38 bufferflow_grbl.go:268: Re-adding newline to item:$G
2017/11/04 12:05:38 bufferflow_grbl.go:271: New cmd item:$G

I’m sorry for the formatting but I don’t know how to format it here.
I can attach a txt file if that makes it easier

i cannot see any cut-outs there. and in fact i cannot see any real activity from chilipeppr either. but there is some and it is being responded to, so we know that the comms are working.

and the packet format looks to be grbl 1.1x compliant. So the task is to force v1 mode and then check the js error log.

I just clicked “Toggle verbose mode” in the GBRL (1.1) widget and the position showed up in the axis widget.
I then toggled the Force v1 mode OFF and the axis widget still works.