Re: New EMC release; can you check Tcl stuff?



Ray et al,

Ray Henry wrote:

> But I am at a loss to figure out how to make a useful backplotter that runs
> with steppers and servos and all since the plotting is done from the
> displayed axis positions.  I prefer running the plotter from as far into
> emc as possible because it gives a feel for what will really happen with
> the machine.

Yes, this would be great. Ideally, you could zoom in and see gouging
resulting from poorly tuned servos, or the actual results of the
blending algorithm, etc.

You brought up three possibilities, which can sort of be combined into
one. In this one, the backplotter would be driven off of actual
positions, not commanded positions. In the case of stepper systems with
no DRO feedback, this would show the result of actual pulses. For
frequency stepping, the actual position shows the effects of PID gains.
So, if you are using steppers, you can currently drive the backplotter
from the actual position (emc_abs_act_pos, or emc_rel_act_pos from
emcsh) and see real effects. You won't see resonance or slippage, but
everything else will be visible.

For systems with real feedback (servos, or steppers with feedback from
the DRO that no one has tested yet but is in the distribution), real
feedback won't change unless the real machine moves, defeating the
purpose of the backplotter. In this case you could use the commanded
position (emc_abs_cmd_pos, or emc_rel_cmd_pos from emcsh), but you won't
see servo overshoot.

Even better, you could use the EMC simulator. Currently this only runs
as a Linux process, but I could update the RT motion controller. This is
"emcmotsim". It runs at about 20 millisecond update rates, and uses
these .ini file parameters (from generic.ini, as an example):

; Parameters for Inland Motor BMHS-0701 X 20
TORQUE_UNITS =			OZ_IN
ARMATURE_RESISTANCE =		1.10
ARMATURE_INDUCTANCE =		0.0120
BACK_EMF_CONSTANT =		0.0254
ROTOR_INERTIA =			0.0104
DAMPING_FRICTION_COEFFICIENT =	0.083
SHAFT_OFFSET =			0
REVS_PER_UNIT =			10
; Parameters for generic amplifier
AMPLIFIER_GAIN =		1
MAX_OUTPUT_CURRENT =		10
LOAD_RESISTANCE =		1
; parameters for generic encoder
COUNTS_PER_REV =		4096

In emcmotsim, there is code that simulates the physical behavior of DC
servo motors, using the standard difference equations from Benjamin C.
Kuo, "Automatic Control Systems," Fourth Edition, pp. 176-186. This
means you have to tune the PIDs, etc. and the actual position will show
overshoot, oscillation, etc.

If you hook up the backplotter to emcmotsim, and the backplotter
displays actual position, you'll see this.

All this is in the current release, except for motor physics simulation
in the real-time subsystem. I will put this simulation in the RT motion
controller eventually.

In the meantime, I recommend this:

1. have the backplotter display abs/rel act/cmd positions, selectable,
as does the TkEmc. By default it can be rel/act position, so G54/55/..
coordinate offsets will appear, and so will all the actual effects. Does
it currently do this? I can't bring it up right now.

2. Run this using the freqmod.o frequency stepper, so that there will be
some real effects. Reduce the P gain while running the backplotter,
using the "Settings->Calibration" popup. The backplotter should show
degraded performance.

I'll build a version of the motion controller that simulates motors
instead of using the STG module. This may take a while, since I may have
to wait until I get a student to work on this. 

--Fred



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact