Closed ShadeTechnik closed 1 year ago
As the error says, 'rotation' was already defined. I think if you change the last part to the name of the new axis you created it should be ok. For example:
... would match this:
B:(?<B>-?\d+\.\d+)
However, your next problem will be that this server currently only outputs four axes in the position report. I will have to change that to have it match whatever the ini file defines.
I updated this to output the position of all axes as defined in the .ini file for status/m114 commands.
I have 2 nozzles, setup as A and B in LinuxCNC and OpenPnP.
I added the B nozzle to POSITION_REPORT_REGEX, GET_POSITION_COMMAND, and MOVE_TO_COMMAND by just copying the regex of A as it is in the examples.
After that I get this from OpenPnP.
![Screenshot_20230815_013257](https://github.com/iforce2d/linuxcnc-gcode-server/assets/55633786/46c2ef6f-cb2e-4e8a-9448-2ea8290272a9)
If I just change POSITION_REPORT_REGEX from:
^ok X:(?<x>-?\d+\.\d+) Y:(?<y>-?\d+\.\d+) Z:(?<z>-?\d+\.\d+) A:(?<rotation>-?\d+\.\d+) B:(?<rotation>-?\d+\.\d+)
Back to:
^ok X:(?<x>-?\d+\.\d+) Y:(?<y>-?\d+\.\d+) Z:(?<z>-?\d+\.\d+) A:(?<rotation>-?\d+\.\d+)
........I can get through homing so I assume this is not the proper way to add B. What would the right regex for the 2nd nozzle be?