Hi Tom,
I managed to make the analog output itself is working using a normal M command.
The problem was the analog output 1 was allocated to the spindle output, and when the spindle was enabled, the analog output didn't work.
Now I need to check if GetDRO is working properly or not.
According to the MACH3 macro handbook, it is not recommended to use GetDRO.
Please see the descriptions below. What is the difference from GetOEMDRO and GetUserDRO?
And do you know where I can check the full scale of the B-axis range?
GetDRO
Function GetDRO(DRONum As Integer) As Double
This legacy function takes the DRO number passed as its argument, and returns the value of the Mach DRO of that number.
The use of GetDRO is no longer recommended practice and this function exists only to support preexisting legacy scripts. This function is deprecated, and its use is strongly discouraged.
Legacy script note: Over time, there have been two different DRO numbering schemes used with Mach; the “DRO number” series and the “OEMDRO number” series. This function uses the “DRO number” series.
The “DRO number” series was further subdivided into “User” and “OEM” ranges. Within the “OEM” range, valid DRONums were from 0 to 200, which, at one time, corresponded to OEM DRO numbers 800 to 1000.
The numerical correspondence between the numbering series is not guaranteed for future releases of Mach.
Use the GetOEMDRO and GetUserDRO functions instead of this function.
Best Regards,
Eric.