Hello Chris,

thanks a lot for your reply. Your last comment about the message that
the driver should print on loading led me to the right place to go bug
hunting. Now it works.

If you look at src/hal/driver/hal_stg.c and the loadrt line with which i
loaded hal_stg:

<cut>
static int stg_init_card()
{

    if (base == 0x00) {
        base = stg_autodetect();
    }

    if (model != 0) {
        stg_driver->model = model; //overrides any detected model, use
with caution
    }

    if (base == 0x00) {
        rtapi_print_msg(RTAPI_MSG_ERR, "STG: ERROR: no STG or STG2 card
found\n");
        return -ENODEV;
    }
</cut>

And:
loadrt hal_stg base=0x200 num_chan=4 dio="IIOO"

Then it is obvious that if the base address is set on loading, but the
model of the card (1 or 2) is not, then stg_driver->model will not be
set in stg_autodetect() or in stg_init_card() itself.
The stg card will then work in general, the encoders will count, DI and
DO works, but the index pulse will not work.

To whom do i submit a patch ? I also made some other enhancements (index
 polarity settable via hal, debug improvements ).

Cheers
Max

> On Mon, Oct 13, 2008 at 12:35:56AM +0200, Maximilian wrote:
>> I did connect the (undocumented) hal stg.X.index-enable pin to the
>> axis.X.index-enable pin for all axes. And then I can see the different
>> Xindex, Yindex, etc signals being driven high for the respective axis
>> when homing starts. But the stg driver never puts them back to low again
>> to indicate that the index pulse has been found.
>> I also put HOME_USE_INDEX = YES, HOME_LATCH_VEL = -5.0 in the ini.
> 
> First, thanks for your excellent account of what you've done and
> what you see.  What version of EMC2 are you testing with?
> 
> Homing should put the index enables high when the index search starts,
> not when homing starts (unless you are using index-only homing).
> 
> I see from the log that Alex added STG1 (but not STG2) index support
> in Jan 2007 so all 2.2.x versions of EMC2 will have this code.  In
> distant memory I think I remember a report that it worked - was it
> Matt Shaver maybe?  Alex's log message says he did not have the
> hardware to test it.
> 
> Also from distant memory I recall that the STG1 could not reliably do
> an index search on more than one encoder at a time.  So you will not
> be able to safely home axes simultaneously.
> 
> Do you get the message "STG: found version 1 card at address %x\n"
> when the driver loads?
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to