Servo To Go Information

The Servo To Go board is an I/O interface board supporting digital inputs and outputs, analog outputs, encoder inputs, and optionally analog inputs. The Enhanced Machine Controller (EMC) code in stg.c and stg.h provides software support for using this board to read axis position and close servo loops, and includes auxiliary functions such as limit and home switch checking and amplifier enabling. Support is provided for the Model 1 board only. There is a Model 2 board, but we don't have software for this yet.

Servo To Go Board Configuration

The Servo To Go card comes with either 4- or 8-axis support, with 8 analog inputs as an option. If you have an 8 axis board, only 6 axes can be fully used for motion since there is not enough digital input for all the home and limit switches.

For a 4-axis board, there are:

24 digital inputs (includes limit switches and amp faults at 0..15, 8 spare)
8 digital outputs (includes amp enables at 0..3, 4 spare)
8 analog inputs (optional; none used) 4 analog outputs (totally filled by amp outputs at 0..3)
For an 8-axis board (6 motion axes max), there are:
24 digital inputs (totally filled by limit switches and amp faults at 0..23)
8 digital outputs (includes amp enables at 0..5, 2 spare)
8 analog inputs (optional; none used) 8 analog outputs (includes amp outputs at 0..5, 2 spare)
The I/O point map below is assumed by the code in stg.c in the EMC distribution, and it's not reconfigurable in the INI file. If you want to rearrange this, you'll need to edit the code. If you aren't using some axes then their slots are up for grabs.
  DIGITAL INPUT
  -------------
  Index   Function      Connector/Pin
  -----   --------      -------------
  00      X home sw     P1/47
  01      X +lim sw     P1/45
  02      X -lim sw     P1/43
  03      X amp fault   P1/41
  04      Y home sw     P1/39
  05      Y +lim sw     P1/37
  06      Y -lim sw     P1/35
  07      Y amp fault   P1/33
  08      Z home sw     P1/31
  09      Z +lim sw     P1/29
  10      Z -lim sw     P1/27
  11      Z amp fault   P1/25
  12      U home sw     P1/23
  13      U +lim sw     P1/21
  14      U -lim sw     P1/19
  15      U amp fault   P1/17
  16      V home sw     P2/31
  17      V +lim sw     P2/29
  18      V -lim sw     P2/27
  19      V amp fault   P2/25
  20      W home sw     P2/23
  21      W +lim sw     P2/21
  22      W -lim sw     P2/19
  23      W amp fault   P2/17

  DIGITAL OUTPUT
  -------------
  Index   Function      Connector/Pin
  -----   --------      -------------
  00      X amp enable  P1/15
  01      Y amp enable  P1/13
  02      Z amp enable  P1/11
  03      U amp enable  P1/9
  04      V amp enable  P1/7
  05      W amp enable  P1/5
  06      (none)        P1/3
  07      (none)        P1/1

  ANALOG INPUT
  -------------
  Index   Function      Connector/Pin
  -----   --------      -------------
  00*     (none)        P2/1
  01*     (none)        P2/3
  02*     (none)        P2/5
  03*     (none)        P2/7
  04*     (none)        P2/9
  05*     (none)        P2/11
  06*     (none)        P2/13
  07*     (none)        P2/15

  ANALOG OUTPUT
  -------------
  Index   Function      Connector/Pin
  -----   --------      -------------
  00      X amp ref     P3/2
  01      Y amp ref     P3/8
  02      Z amp ref     P3/5
  03      U amp ref     P3/11
  04**    V amp ref     P4/2
  05**    W amp ref     P4/8
  06**    (none)        P4/5
  07**    (none)        P4/11

  * = only available as option, with STG_ANALOG_INPUT defined in stg.c
  ** = only available for 8-axis boards, with STG_8_AXES defined in stg.c

Board Addressing

The board comes preset for I/O addresses 0x200-0x21F and 0x600-0x61F. This is the same base address used by standard PC joystick adaptors, which typically are not reconfigurable. The integer variable STG_BASE_ADDRESS used by the code can be overridden by changing the value of DEFAULT_STG_BASE_ADDRESS in stg.h and recompiling. If you don't want to modify this code, in Linux you can override the base address when the real-time kernel module is loaded by setting the variable on the insmod line in the EMC startup script, e.g.,
insmod plat/rtlinux/lib/emcmod.o STG_BASE_ADDRESS=0x300
in the case where the motion control module is emcmod.o and the base address desired is 300 hexadecimal.