CAD CAM EDM DRO - Yahoo Group Archive

Re: Re: E-stop Problem + more

Posted by Ray Henry
on 2000-06-06 09:46:47 UTC
(this reply wanders all over the place
so I'll put section headings in caps)

>Message: 17 [CAD_CAM_EDM_DRO] Digest Number 517
> Date: Mon, 05 Jun 2000 14:45:29 -0500
> From: Jon Elson <jmelson@...>
>Subject: Re: E-stop Problem + more
>
>imranjawaid@... wrote:
>

--------------------
GETTING OUT OF ESTOP

>> Hi,
>> Finally I got my RTlinux 2.0 & emc configured with STG 2 card w/
>> nikki denso drives & 2.1Amp AC servo motors.
>>
>> I ran testing in emc and motor run fine.
>>
>> 1) But I can't get out of ESTOP mode and can't do the machine on.
>> Do i have to do connection for it?
>
>Getting out of Estop requires a ground signal on pin 13 of the parallel
>port
>that is used for the auxilliary control outputs. It also requires the
>limit switches
>to either be satisfied with an in-limit condition, or to be overridden
>with the
>GUI button for that.
>
>My e-stop and auxilliary control logic is on my web pages at
>http://www.artsci.wustl.edu/~jmelson/EMC.html
>

This is all true, if you are using the bridgeport I/O definition as shown
below.

-----ini file----
; Name of IO controller program, e.g., bridgeportio
EMCIO = bridgeportio
; EMCIO = minimillio
; EMCIO = simio
-----end-----

If you use the minimillio definition then the second parport condition is
ignored. But you do not have processor control of things like coolant,
spindle speed, and direction.


--------------------------------
UNUSED VARIABLES IN THE INI FILE

>>
>> 2) also i can't figure out what should i write in (emc.ini)
>> COUNTS_PER_REV = ?
>
>I don't think this applies to servo systems.

Right on! All of the variables shown below:

-----ini file-----
; 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
-----end-----

are only used for ./sim.run. If you find them confusing, you can safely
remove them from each axis section if you do not use this specific ini file
for a simulated run.


-----------------------------
FEEDBACK PULSES PER USER UNIT
>>
>> my encoder is mounted on the back of motor (no gearing) and it says
>> P/R - 1000 , when i test by rotating motor shaft by hand with stg2
>> dos software it counts 4000
>
>Encoders with 1000 cycles/revolution will give 4000 transitions per
>revolution,
>and by counting all of them, you get 4000 counts per revolution.

Count is selectable (1,2,4) on the stg board. Beyond that, the variable:

-----ini file-----
; First axis
[AXIS_0]
...
INPUT_SCALE = -4000 0
-----end-----

is the place to put the number of pulses per user unit.

-----quote from emcsoft.html-----
INPUT_SCALE = 40000 0
These two values are the scale and offset factors for the axis input from
the raw feedback device, e.g., an incremental encoder. The second value
(offset) is subtracted from raw input (e.g., encoder counts), and divided
by the first value (scale factor), before being used as feedback. The units
on the scale value are in raw units (e.g., counts) per user units (e.g.,
inch). The units on the offset value are in raw units (e.g., counts).
Specifically, when reading inputs, the EMC first reads the raw sensor
values. The units on these values are the sensor units, typically A/D
counts, or encoder ticks. These units, and the location of their 0 value,
will not in general correspond to the quasi-SI units used in the EMC. Hence
a scaling is done immediately upon sampling:

input = (raw - offset) / scale

The value for scale can be obtained analytically by doing a unit analysis,
i.e., units are [sensor units]/[desired input SI units]. For example, on a
2000 counts per rev encoder, and 10 revs/inch gearing, and desired units of
mm, we have
[scale units] = 2000 [counts/rev] * 10 [rev/inch] * 1/25.4 [inch/mm]
= 787.4 counts/mm
and, as a result,

input [mm] = (encoder [counts] - offset [counts]) / 787.4 [counts/mm]

Note that the units of the offset are in sensor units, e.g., counts, and
they are pre-subtracted from the sensor readings. The value for this offset
is obtained by finding the value of counts for which you want your user
units to read 0.0. This is normally accomplished automatically during a
homing procedure.
-----end of quote-----


----------------------
DEFINING THE USER UNIT

Many of the variables in the ini file relate to distance rather than
rotation. The values that you place in them are the number of pulses per
distance that the axis travels.

The variable "LINEAR_UNITS" is used to define the standard unit for
computation within EMC. If you are using inches as indicated below, then
the value you will place in the axis variable above will be the number of
pulses per inch.

If you have defined the standard unit within EMC as millimeters, then the
value that you place there will be the number of pulses per mm.

-----quote from emcsoft.html-----
[TRAJ] Section
LINEAR_UNITS = 0.03937007874016
The number of linear units per millimeter. For systems executing in native
English (inch) units, this value is as shown above. For systems executing
in native millimeter units, this value is 1. This does not affect the
ability to program in English or metric units in NC code. It is used to
determine how to interpret the numbers reported in the controller status by
external programs.
-----end of quote-----


------------------------
SERVO SYSTEM ZERO OFFSET

>> 3) the motor rotates very slow at 0v ,when I checked the DAC0 signal
>> on P3 from stg2 it shows 0.1~0.15(approx) voltage accros it.
>
>This is a small DC offset, and is normal. If there is a zero adjust pot
>on the
>servo amp, set it to stop the motor movement, or to zero the output
>voltage.

I believe that there is also a zero voltage offset in the emc itself.

-----ini file-----
; First axis
[AXIS_0]
...
BIAS = 0.000
...
MIN_OUTPUT = -9.5
MAX_OUTPUT = 9.5
-----end-----

I haven't tried this and only vaguely remember reading something. My guess
is that the bias value is a percent of the voltage range specified by the
MIN_OUTPUT and MAX_OUTPUT values. This percent is added to the zero point.

So, as Jon E. said, I'd start by setting the zero offset on the dc amp
first. Then set the bias within emc if you need to.

But if your axis friction is very low, you will still not get the axis to
stand still until you close the position loop. Most of this becomes
invisible when you close the loop from your feedback device to EMC because
the axis position calculations will demand that the actual location conform
to the commanded location.

So, don't close the position loop until you are reasonably close to no axis
motion with an open loop. I've seen cases where there was a real war going
on between, voltage, current, and position loops. In a closed loop system
this will manifest itself as jitter at idle or jumping when a motion is
commanded. Often the jump will be very pronounced in one direction.


----------------------------
SETTING SOFTWARE AXIS LIMITS

>>
>> 4) where do i set emc axis limits in ini file
>
>I think it should be pretty obvious. See
>http://www.isd.mel.nist.gov/projects/emc/emcsoft.html
>for a somewhat outdated descrption of the .ini file. There are
>MIN_LIMIT and
>MAX_LIMIT parameters, which should be in inches for imperial and mm for
>metric machines, in other words the units specified with the UNITS
>parameter.

You want them to take effect just before the end of axis travel. But a
caution here also -- they do not take effect until the machine has been
homed although they will be used to compute overtravel within part programs
and mdi commands.

What I'd do is setup the home switches to your satisfaction -- test home
repeatedly with a good indicator and come at it from different distances.
When you are satisfied that your machine will find home accurately, then
that is the zero position for the soft limits.

From home, make slow manual moves to the + limit of motion of that axis.
The axis position value is what you put into the MAX_LIMIT variable. Run
the axis to the - limit and that is the MIN_LIMIT value. I'd pad them down
just a bit;-)

-----
BTW - Congratulations on getting linux/emc up. Sounds like a great
machine. Got any pics, a writeup, or a link for the handbook?

<snip it if you respond and Ian and a lot of others will love you for it>

Ray

Discussion Thread

imranjawaid@e... 2000-06-04 22:35:44 UTC E-stop Problem + more Tim Goldstein 2000-06-05 06:43:41 UTC RE: [CAD_CAM_EDM_DRO] E-stop Problem + more Jon Elson 2000-06-05 12:44:00 UTC Re: [CAD_CAM_EDM_DRO] E-stop Problem + more Ray Henry 2000-06-06 09:46:47 UTC Re: Re: E-stop Problem + more byron@w... 2000-06-06 18:01:10 UTC Re: [CAD_CAM_EDM_DRO] E-stop Problem + more imranjawaid@e... 2000-06-08 22:05:40 UTC Re: E-stop Problem + more Ray Henry 2000-06-09 10:27:36 UTC Re: Re: E-stop Problem + more imranjawaid@e... 2000-06-10 06:48:13 UTC Re: E-stop Problem + more Ray Henry 2000-06-13 15:57:38 UTC Re: Re: E-stop Problem + more