Forum Header

I do not find "base period" or "motor steps per rev" in my .ini File

More
5 years 4 months ago #212603 by BigJohnT

Please Log in to join the conversation.

More
5 years 4 months ago #212648 by Roman Simon
thank you, I think figure it out.

The written base period in *.ini is in my case not calculated on max jitter.
ideal_period() with 4 axes takes the maximum value of hz() for x or y (in my case 4800) and
because I have doublestep() with my values, a high number is calculated (1000000000 / 4800 = 208333)
and limited to 100000. 100000 is not smaller than the max jitter calculation (with minperiod())
so base period is always 100000.

Here are the code snippets, main part is at the end in ideal_period()
Code:
// buid_INI.py base_period = self.d.ideal_period() // stepconf.py self.steptime = 5000 // *.stepconf self.stepspace = 5000 // *.stepconf def hz(self, axname): steprev = getattr(self, axname+"steprev") // for x 200.0 microstep = getattr(self, axname+"microstep") // for x 2 pulleynum = getattr(self, axname+"pulleynum") // for x 1.0 pulleyden = getattr(self, axname+"pulleyden") // for x 1 leadscrew = getattr(self, axname+"leadscrew") // for x 1 maxvel = getattr(self, axname+"maxvel") // for x 12.0 if self.units or axname == 'a': leadscrew = 1./leadscrew // for a 360.0 pps = leadscrew * steprev * microstep * (pulleynum/pulleyden) * maxvel return abs(pps) def doublestep(self, steptime=None): if steptime is None: steptime = self.steptime return steptime <= 5000 def minperiod(self, steptime=None, stepspace=None, latency=None): if steptime is None: steptime = self.steptime if stepspace is None: stepspace = self.stepspace if latency is None: latency = self.latency if self.doublestep(steptime): return max(latency + steptime + stepspace + 5000, 4*steptime) else: return latency + max(steptime, stepspace) def ideal_period(self): xhz = self.hz('x') yhz = self.hz('y') zhz = self.hz('z') uhz = self.hz('u') vhz = self.hz('v') ahz = self.hz('a') if self.axes == 1: pps = max(xhz, yhz, zhz, ahz) elif self.axes == 0: pps = max(xhz, yhz, zhz) elif self.axes == 2: pps = max(xhz, zhz) elif self.axes == 3: pps = max(xhz, yhz, uhz, vhz) elif self.axes == 4: // YES pps = max(xhz, yhz) else: print('error in ideal period calculation - number of axes unrecognized') return // pss = 4800 if self.doublestep(): base_period = 1e9 / pps // 1000000000 / 4800 = 208333 else: base_period = .5e9 / pps if base_period > 100000: base_period = 100000 if base_period < self.minperiod(): base_period = self.minperiod() return int(base_period)

I would like to check if I have missing steps. When I fastly move X
20 Minutes from left to right, can I simply check it with an indicator, if
startpoint and endpoint is different?

More axis means more work, so base period must be higher?
When a calculation do not fit in a base period, does it come delayed
or is it skipped? I think this also a very important point.

Please Log in to join the conversation.

More
  • BeagleBrainz
  • New Member
  • New Member
More
5 years 4 months ago #212669 by BeagleBrainz
When checking an axis be sure to take up any backlash before hand.

Please Log in to join the conversation.

More
5 years 4 months ago #212671 by andypugh
I think that the point is that you need a base thread frequency high enough to handle the maximum required step rate, but there isn't that much to be gained from having it much higher, and the disadvantage is that there is quite a waste of CPU time.

So Stepconf uses 100,000 if 100,000 is short enough to reach the required axis speeds.

If you were to increase the axis speeds in stepconf then I think that you would eventually see the base period reduce.

That said, there is _something_ to be said for a shorter than necessary base period. Consider the case where you are stepping every base thread period at 100,000ns, ie 10kHz. The next speed down without dithering is 5khz, ie stepping every second period. This is partly why Mesa and Pico cards can appear smoother, they have a base clock in the MHz range, and so can make fractional changes.. 10kHz - 10.001kHz...10.002kHz etc.

Please Log in to join the conversation.

More
5 years 4 months ago #212676 by Roman Simon
thank you for testing tips and andy for explanation, this make sense
I will also test 100.000 (the calculated value from stepconf)

Please Log in to join the conversation.

Time to create page: 0.118 seconds
Powered by Kunena Forum