Hello Guest it is March 28, 2024, 07:25:51 PM

Author Topic: Pulley Ratio Accuracy Problem  (Read 3004 times)

0 Members and 1 Guest are viewing this topic.

Pulley Ratio Accuracy Problem
« on: July 18, 2019, 05:30:06 PM »
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.
Re: Pulley Ratio Accuracy Problem
« Reply #1 on: July 18, 2019, 10:32:25 PM »
Further to the original posting, the information is not stored where I thought it was.

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Pulley Ratio Accuracy Problem
« Reply #2 on: August 25, 2019, 11:46:04 AM »
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
Re: Pulley Ratio Accuracy Problem
« Reply #3 on: August 25, 2019, 12:10:13 PM »
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

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Pulley Ratio Accuracy Problem
« Reply #4 on: August 25, 2019, 01:23:05 PM »
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
Re: Pulley Ratio Accuracy Problem
« Reply #5 on: August 26, 2019, 12:28:24 AM »
Thanks, Art.  Unfortunate that this is one of the few items that are not user definable.  I'll see what I can do for a "work around".  If I get something that works, I will post it.

By the way, if the PID loop for spindle control could be made to work, this pulley ratio error would not be a problem.  Can anyone say if spindle PID is working in Mach4?
Re: Pulley Ratio Accuracy Problem
« Reply #6 on: August 26, 2019, 06:57:14 AM »
Hi,

Quote
Can anyone say if spindle PID is working in Mach4?

Spindle PID is a realtime function and so it must be supported by the MOTION CONTROLLER. Neither Mach3 or Mach4
are realtime controllers however Mach3s parallel port is a realtime motion controller and that's why Mach3 can apparently
'do' spindle PID.

The Ethernet SmoothStepper Mach4 plugin has just been (two moths or so) upgraded to do spindle PID. I imagine also that the Hicon
Integra, when suitably activated, and the CSMIO/A could also do spindle PID with Mach4.

To my knowledge the PoKeys 57CNC, the UC100/300/400 or the PMDX411/424 cannot do spindle PID with Mach4.

So the answer is 'Yes spindle PID with Mach4 is achievable with a motion controller that supports it'.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'