Re: STG v2 card - Index pulses?



Hello Matt,

> I recently swapped out a 4 axis STG v1 card and put in an 8 axis v2 
> card. Everything works OK, but I can't seem to detect the index pulse 
> (on any axis 0-3) during homing. After an axis hits its home switch it 
> reverses looking for the index pulse but never sees it:
> 
> 1. I switched from stgmod.o to stg2mod.o, but it makes no difference.
> 
> 2. I can't use stg_v2_8axis_mod.o because it complains, 
> "stg_v2_8axis_mod.o: symbol PARPORT_IO_ADDRESS not found".
> 
> 3. Using the index latch demo (x) in the lstg program supplied by STG 
> (Thanks!) I can see the index pulse get latched when I rotate the 
> encoder by hand, so I think the problem is somewhere inside stg2mod.o.

I sometimes lost the index pulse with the stg2 v2 board too. What helped me is
to set the CYCLE_TIME =  0.001 to CYCLE_TIME = 0.0005 for all axes.
If that does not help look for the variable homingPhase in emc/src/emcmot.c, it
is easy to spot. It can have these values for each axis:
0: no homing is done
1: homing commanded and slow incremental jog to full range is done
2: home switch tripped and motion aborted
3: moving to find index pulse
4: found index pulse, now we'll do final home, add move back to latched
position + backoff 
5: almost everything is done, cleanup and remember the axis
has been homed

But read the code to understand what is really done and where it gets done.

You can then insert some diagnostics with the macro defined under the same
name. Under rt-linux it is just replaced by rtl_printf.
Note that you might need to reduce the output from other parts off emc by
setting DEBUG = 0 in your ini file. This table will help:
; Debug level, 0 means no messages. See emc/src/emcnml/emcglb.h for others
;#define EMC_DEBUG_INVALID           0x00000001
;#define EMC_DEBUG_CONFIG            0x00000002
;#define EMC_DEBUG_DEFAULTS          0x00000004
;#define EMC_DEBUG_VERSIONS          0x00000008
;#define EMC_DEBUG_TASK_ISSUE        0x00000010
;#define EMC_DEBUG_IO_POINTS         0x00000020
;#define EMC_DEBUG_NML               0x00000040
;#define EMC_DEBUG_MOTION_TIME       0x00000080
;#define EMC_DEBUG_INTERP            0x00000100
;#define EMC_DEBUG_RCS               0x00000200
;#define EMC_DEBUG_ALL               0x7FFFFFFF
; DEBUG =                 0x00000003
;DEBUG =               0x000001A3               
DEBUG = 0

And also note the #defines in extstgmot.c, but you might know that

As always, most of this email is just copied together from other comment, email
and documentation. Credits for that to those who really wrote that stuff.

Hope this helps.

Regards
Max

-- 
Max Heise <max.heise-at-gmx.net>
Student Mechatronik/Automatisierungstechnik
PGP public key from:
http://www.fht-esslingen.de/~mahemt01/pgp50i.pub or any keyserver





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

Problems or questions? Contact