Machsupport Forum

Mach Discussion => Mach3 under Vista => Topic started by: djreiswig on May 04, 2024, 07:25:03 PM

Title: Set UserDRO value from gcode
Post by: djreiswig 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.
Title: Re: Set UserDRO value from gcode
Post by: TPS 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


 
Title: Re: Set UserDRO value from gcode
Post by: djreiswig 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.