Hello Guest it is July 19, 2024, 10:46:03 PM

Author Topic: Set UserDRO value from gcode  (Read 4759 times)

0 Members and 1 Guest are viewing this topic.

Set UserDRO value from gcode
« on: May 04, 2024, 07:25:03 PM »
Is it possible to set a UserDRO value from gcode?
I found #99aaa = bbb works for OEM DROs, but trying it with a UserDRO number causes mach3 to crash.
I haven't found any documentation explaining what #99 is actually for.  I did find a reference online noting that is was possible to set a UserDRO from gcode, but the poster didn't explain how.

Offline TPS

*
  •  2,508 2,508
Re: Set UserDRO value from gcode
« Reply #1 on: May 05, 2024, 01:45:53 AM »
i think the only way will be to create a customised macro (m123.m1s for example) an call this in Gcode.

code for macro would be:
Code: [Select]
  DRONum = Param1()
 DROVal = Param2()
 SetUserDRO(DRONum, DROVal)

usage in G-code would be:
Code: [Select]
  M123 P1100 Q1234


 
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Set UserDRO value from gcode
« Reply #2 on: May 05, 2024, 07:09:12 AM »
Thanks.  I thought I might have to use a macro.  I wasn't sure how to send parameters to macros.  Your idea should work.