STG IO , was Re:



Jason,

> SPINDLE_DECREASE_INDEX    =     8
> SPINDLE_INCREASE_INDEX    =     9
> ESTOP_WRITE_INDEX         =     10
> SPINDLE_BRAKE_INDEX       =     11
>
> Because the digital output indexes 8,9,10,11 dont map to any STG pins.

The current code doesn't support (on the STG card) the IO indices that
appear in the INI file, as far as I know. A driver needs to be written for
the IO functions.

    As you mess with the IO task code, Paul Corner pointed out some helpful
things to me at NAMES expo. Namely, some of the IO task wrapper functions
have identical names in similar but different code pieces - ie. 'grep'ing
for the functions may get you into the wrong code. Use the Makefiles for the
dependency info.(for example, this happens with minimillio and bridgeportio,
which can be VERY confusing if you aren't aware of it. Beyond the functions
being wrapped, obviously)

    Fred Proctor -at- NIST  has pointed out that as the IO is a non-realtime
process, beware of a possible 'race' condition should you attempt to use the
realtime stg 'port' output byte (port 'c') with non-realtime output. The way
things are now, that leaves port 'd' for user output on the STG.
Input ports(bytes) would naturally not be affected by this.

     Hmm, but, if your bit mask for the realtime byte write (if, say, only 3
bits of port 'c' are being set, the rest are 'masked') is a value from a
shared memory register that the non-realtime process can set, 'race' should
no longer be an issue IMHO.
    In other words, the realtime process would still exclusively do the byte
writing to the stg port. The non-realtime output would actually write
outputs as a bitmask via the memory register, which in turn would eliminate
the non-realtime competing with a hardcoded bitmask resetting it all the
time. This could free up 5 outputs on port 'c' , for a three axis machine.
(total of 13 available STG outputs - port 'c' and 'd', 8 otherwise - port
'd')

> So, to anyone out there with a servo-to-go card:
> what are your [EMCIO] ini settings for digital IO?

The STG card IO registers currently 'settable' are located in
src/emcmot/stg2.c (or equivalent motion module) They are basically motion
axis related - fault sense, limits, home, amp enable, and encoders. Set them
to the pin offsets you want. (pin offsets are in the STG manual) Then
re-compile the module.

If you've a BDI EMC setup, you can re-compile the emcmot module from the
emcmot/ source directory.
/usr/local/emc/src/emcmot/ #> make PLAT=rtlinux3_0

- Regards,

    Keith Rumley









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

Problems or questions? Contact