Object model data resolution M409....
-
Hi,
I am in the process of developing a new CNC pendant for a very old CAMM3 Roland machine, using the original 3 jogs panels which I appreciate very much.
For this, I use a PICO2, FreeRTOS and coreJSON to provide the glue between the origianl panel and a DUET6 HC .
I noticed that when I issue M114, I receive a data result with 3 digit accuracy for coordinates, both machine and user.
Since the answer ( RRF 3.6.0-beta.2+3) is packed in a json string, I try to simplify my request using a M409 , that would give me more information on the axes within a single IO serial transaction with duet. (Machine coords, User coords, homed, ....
Examples:
X:-12.500 Y:-22.000 Z:169.905 E:0.000 Count 60001 44801 226484 Machine 37.500 28.000 169.905 Bed comp 0.000 -> using M114
{"key":"move.axes[2].machinePosition","flags":"a0","result":170} -> using M409My understanding from M409 documentation is that limiting buffer size on RRF force to split the answer in multiple chunks (a0 flag) when using k"move.axes[] for instance.
This is not the case for me since I issue
M409 k"move.axes[2].machinePosition" for getting the value.this should answer 169.905, but it spits 170.
BTW DWC also displays 170, which is not really accurate....![alt text](image url)
Question: Is there any way to obtain the full resolution using M409 or do I have to use M114 with a ugly string scanning?
Many thanks
-
@audryhome this is a bug in 3.6beta. Axis positions are supposed to be reported to 3 decimal places, although trailing zeros in the decimal part are always omitted in the JSON response. I will fix it in the next build.
-
@dc42 Thanks, so I will pursue with a full json solution!!
-
@audryhome I believe this is already fixed in 3.6beta3. The object model returns 3 decimal places for both user and machine position of all axes (with trailing zeros in the decimal part suppressed); however DWC only displays 2 decimal places.
m409 k"move.axes[].machinePosition" { "key": "move.axes[].machinePosition", "flags": "", "result": [ 0.045, -7.955, 9.894, 129 ], "next": 0 }
-
@dc42 Installed the beta, everything is fine!
M409 k"move.axes[]" f"f"
{
"key": "move.axes[]",
"flags": "f",
"result": [
{
"machinePosition": 2.652,
"userPosition": 0.102
},
{
"machinePosition": 5.511,
"userPosition": 0.102
},
{
"machinePosition": 180.17,
"userPosition": -0.03
}
],
"next": 0
}Many Thanks!
-
-