Mach Discussion > Mach3 under Vista

Pulley Ratio Accuracy Problem

(1/2) > >>

brian98:
As someone else mentioned, you can set the pulley ratios in Mach3 to whatever level of accuracy you want, but as soon as you log out and the .xml file is updated, the ratio you entered is rounded to one decimal.  That is what comes up next time you start Mach3.

I am trying to get my speed control more accurate and need at least 2 decimals in the pulley ratio.  So, does anyone know how to either: (a) force Mach3 to keep more decimals in the .xml write out?; or (b) know where the pulley ratios are store by Mach3 so I can use a macro to reload accurate numbers each time I start without having to change each pulley individually?

I know variable 26200 holds the number of the pulley currently selected and 26210 and 26220 hold that pulley's min and max speeds.  i think the current ratio is DRO99, but I cannot find where the data is stored for the pulleys not in current use.

Any assistance would be greatly appreciated.

brian98:
Further to the original posting, the information is not stored where I thought it was.

ART:
Hi Brian:

 The spindle ratio for each pulley is stored as SPINRATIO1 etc in the xml file. IT is however a calculated value in
calibration windows, so when you look at it, like shrodingers cat it can change from what you think you set it to.
So long as you dont look at it, it should stay stored as you selected it.  Its fairly complex and likely a bit buggy in
that section so check your xml to see what it thinks it is..

Art

brian98:
Hi Art.  Thanks for your response.

I did find the SPINRATIO info in the .xml file, but was trying to avoid having to write a script to edit the .xml file each time Mach3 wrote it out.  Is there no variable storage location accessible in Mach3 that would be easier to edit?  Or no easy way to tell the program to write out the SPINRATIO to 2 decimals?

Brian

ART:
Brian:

  Sorry, I wasnt quite understanding. I do see the problem, I used a conversion to
2 decimals when I converted it to a string. I used

_gcvt( Ratios[c] , 2 , NumOut.GetBuffer(20) );

instead of
_gcvt( Ratios[c] , 10 , NumOut.GetBuffer(20) );

  Unfortunately, there is no way for you to grab this or change its default. Its not
a value you can change and have it stay changed, I checked the code and its simply
hardwired to 1 decimal. One of those errors not noticed in time to correct.

Art

Navigation

[0] Message Index

[#] Next page

Go to full version