Re: Homing STG



Hi Kurtis!

Ah yes the homing problem with stg II.

Yes I am getting the homing to work fine with STG II 8 axis,
but Paul and I had to hack the code a little to get it to work.
After the stg II came out homing ceased to work.

Specifically When we looked at any of the EMCMOT code
we could not find anyplace where registers IDLEN (index pulse
latch enable) at offset 0x409 and SELDI (select index pulse) at
offset 0x40B were written to. So we wrote all 1's to IDLEN
to enable all axes index pulses and all 0's to SELDI to select
index pulse latching rather than external latching (P2 pin 39).

I believe Paul cleaned up this crude fix with something a little
more structured for the CVS sources but I think you  might
be the first to test it.

I have continued to run with the original hack as I am familiar
with c but a linux newbie so am reluctant to recompile stuff and
the hack works perfectly fine.


He wrote to me about the better fix as follows:

----------------------------------------------------------------------------
------
"I added the following few lines to newstg.c at line 82 and also to stg2.c
at
1820. I thought it a little cleaner and easier to follow than the hack I did
on your machine.

 /*  Need to set up registers to allow the use of index pulse P.C. */
  if (MAX_AXES > 4)
 {
  bySelectBits = 0xff;
  } else  {
  bySelectBits = 0x0f;
 }
SelectIndexOrExtLatch(bySelectBits);
EnableCounterLatchOnIndexOrExt(bySelectBits);

I expect I'll need to add something similar to the old STG driver as I hear
some people are using EMC with the model 1 cards."
-----------------------------------------------------------------------


But if you are using the 4 axis version Matt had the same problem
a good while ago and I think took it to Will who adapted some
STG code which compiled to newstgmod.o. If you get this
I think it will work with the 4 axis board. But it did not for the 8
axis hence our fix. In any event Paul's new code is for 8 axis as
well as 4.

Try newstgmod.o. compiled (I think) from newstg.c .Let's see if we can get
Paul to
 chime in here about the latest fix ( I think he has been busy)... the
intention is to have
one EMCMOT that will work with all stg boards type I or II with any axis
configuration. In getting you fixed up we can hopefully make that happen.
It probably IS fixed... just use newstgmod. If folks test this with all card
combinations and it works I suggest we get rid of all the other old stg
EMCMOT files.

Les

Leslie Watts
L M Watts Furniture
Tiger, Georgia USA
http://www.alltel.net/~leswatts/wattsfurniturewp.html
engineering page:
http://www.alltel.net/~leswatts/shop.html

----- Original Message -----
From: "Kurtis Martineau" <klmartineau-at-shaw.ca>
To: "Multiple recipients of list" <emc-at-nist.gov>
Sent: Monday, August 26, 2002 8:36 PM
Subject: Homing STG


>
> Has anyone been able to home a STG axis using a home switch and an encoder
> index pulse?
>
> I understand that Paul has made some modifications to the  relevant code,
> but I still haven't been able to get this to work.
>
> I am using the BDI 2-12 and have recently updated the latest sources from
> the SourceForge site using:
>
> cvs -d:pserver:anonymous-at-cvs.EMC.sourceforge.net:/cvsroot/emc login
> cvs -z3 -d:pserver:anonymous-at-cvs.EMC.sourceforge.net:/cvsroot/emc co emc
> cvs -z3 -d:pserver:anonymous-at-cvs.EMC.sourceforge.net:/cvsroot/emc co
rcslib
>
> I have the following setup:
> a STG model 2, 4 axis card.
> EMCMOT= stg2mod.o
> An encoder that is directly coupled to my motor with A B Z channels wired
> correctly to the STG board.
> I scope the encoder pulses and there is definitely a 5V pulse every rev of
> the encoder.
> My setup is tuned and working.
> If I recompile with the  # define NO_INDEX_PULSE uncommented in
extstgmot.c,
> I can home off the home switch only.
>
> Any advice?
>
> Kurtis
>
>
>
>




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

Problems or questions? Contact