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.