Re: [CAD_CAM_EDM_DRO] How to setup STG-II?




Babar (comments mixed in)

On Wednesday 15 May 2002 10:15, you wrote:
> Hi All,
>
> First thanks to Tim, Les and Ray for their reply. Les
> and Tim strongly recommended me to join nist ‘ List I
> did so and felt sorry for doing this so late. Now
> following are my proceeding/questions
>
> 1)I downloaded stg.ini from Latest EMC handbook and
> rename it to generic.ini and copied it to
> /usr/local/emc. with that when I clicked emc_generic
> the GUI was showing 2 axes and dialog box showing
> following mssg “maximum hardware limit on axis 0
> exceeded” and when I tried to run any function, dialog
> box showing E-stop mssg appeared. Then I made the
> connections to STG according to Jon Elson‘s site (as
> given bellow) but I could not get out of E-Stop.
> All X,Y,Z +/-Limit switches inputs and Home inputs
> coming out from STG Card’s connector P1 were grounded
> on a breadboard.

You will need to be a little bit careful about using an ini that is not about 
the same age and set up for the distribution that you are using.  The ini 
file has undergone a lot of changes in the last year or so.

You can change the polarity of the limit switches in the ini and you will 
eliminate that message.

> 2)there are four icons emc_generic, emc_mini, emc_run
> and emc_sim which one should I click? What are their
> purpose and functions? By the way except emc_mini
> remaing three launches and shows GUI. But emc_mini is
> not working.emc_sim is showing yellow digits while
> emc_run and emc_generic are showing big red color
> digits.

The big red digits mean that the limits are exceeded or are using reversed 
polarity.  The big yellow digits mean that the axis has not been homed.

The problem with mini.ini is that it is older than the corresponding EMC and 
there is some variable missing that is essential.  What I tell all my 
customers is that they need to edit their own run and ini file in order to 
understand how each variable affects the performance and personality of their 
own machine.

A -- What I would do is copy and rename five files using a terminal window in 
the emc directory.  If this is the bdi the directory is /usr/local/emc.  The 
commands are

cp generic.run  babarstg.run
cp generic.ini babarstg.ini
cp generic.var babarstg.var
cp generic.nml babarstg.nml
cp generic.tbl babarstg.tbl

B -- Now you have a set of files that you can edit and work with without 
destroying anything.  To make these files work you will need to edit 
babarstg.run line 27 so that it reads

INIFILE=babarstg.ini

C -- Now you will need to edit babarstg.ini so that it points to the other 
babarstg files and so that it starts and runs the stg stuff.  The line 
numbers that I am using are from the current cvs on sourceforge.  Throughout 
this post I will refer to the line number to change and show a couple of 
lines of the default ini.  Then I will suggest the change that I would make.

Line 12 
; Name of machine, for use with display, etc.
MACHINE =               Generic
replace with
MACHINE =               Babar's_Servo_Mill
-----

Line 15
; Name of NML file to use, default is emc.nml
NML_FILE =              emc.nml
replace with
NML_FILE =              babarstg.nml
-----

Line 22
; Startup codes for RS-274-NGC interpreter
RS274NGC_STARTUP_CODE =	G20

Remove this if you plan to use metric.
-----

Line 33
; Name of display program, e.g., xemc
DISPLAY =               xemc
; DISPLAY =             tkemc
change to
; DISPLAY =               xemc
DISPLAY =             tkemc
-----

Line 82
; Name of task controller program, e.g., bridgeporttask
TASK =                  bridgeporttask
; TASK =                minimilltask

Leave as is if you plan to use a parport to control spindle, coolant, lube 
and such.  Change to

; TASK =                  bridgeporttask
TASK =                minimilltask

If you do not want aux I/O.
-----

Line 92
; File containing interpreter variables
PARAMETER_FILE =        emc.var
replace with 
PARAMETER_FILE =        babarstg.var
-----

Line 108
; Name of motion control program
EMCMOT =                steppermod.o
; EMCMOT =              freqmod.o
; EMCMOT =              stgmod.o
; EMCMOT =              stg8mod.o
; EMCMOT =              emcmotsim
change and add if you have newstgmod.o in emc/plat/realtime/lib/
; Name of motion control program
; EMCMOT =                steppermod.o
; EMCMOT =              freqmod.o
; EMCMOT =              stgmod.o
; EMCMOT =              stg8mod.o
; EMCMOT =              emcmotsim
; EMCMOT =              newstgmod.o
change if you do not have newstgmod.o in emc/plat/realtime/lib/
; EMCMOT =                steppermod.o
; EMCMOT =              freqmod.o
EMCMOT =              stgmod.o
; EMCMOT =              stg8mod.o
; EMCMOT =              emcmotsim
; EMCMOT =              newstgmod.o
-----

Line 121
; Base address of Servo To Go board
STG_BASE_ADDRESS =      0x200
; STG_BASE_ADDRESS =    0x300

Select your base card address.

Line 322
; Name of IO controller program, e.g., bridgeportio
EMCIO =                 bridgeportio
; EMCIO =               minimillio
; EMCIO =               simio

leave alone if you plan external I/O or change if no external I/O
; EMCIO =                 bridgeportio
EMCIO =               minimillio
; EMCIO =               simio
-----

Line 328
; tool table file
TOOL_TABLE =    emc.tbl
change to
TOOL_TABLE =    babarstg.tbl
-----

This should give you a basic running stg system.  You will want to edit the 
axis limits to the polarity that you used for your switches.  These are in 
each axis definition section.

MIN_LIMIT_SWITCH_POLARITY =     1
MAX_LIMIT_SWITCH_POLARITY =     1
HOME_SWITCH_POLARITY =          1

Line 188 for axis 0
Line 239 for axis 1
Line 290 for axis 2

I included the home switch polarity because you may need to change these 
depending on how you wired your switches.  

Now you should be ready to set axis directions, jog directions, and home 
polarity for your machine.  Then you will be ready to begin to tune the emc 
to the machine for each axis.  (or you could fly me there and I'll do it for 
you.) <g>

> 3)Jon could you please send me a more clear and
> readable diagram of your LPT and STG connections and
> similar request to Les for his configuration of limit
> switches .
>
> 4)Les you talked about some trouble free emc.ini with
> STG…….??
>
> 5)Paul….. I am anxiously waiting for your advice
> against my this and previous post.

What version of the EMC and Linux are you using?

Ray





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

Problems or questions? Contact