/ docs / src / drivers / servo_to_go_fr.txt
servo_to_go_fr.txt
 1  = Servo-To-Go
 2  
 3  The Servo-To-Go (STG) is one of the first PC motion control cards supported
 4  by LinuxCNC. It is an ISA card and it exists in different flavors (all
 5  supported by this driver). The board includes up to 8 channels of
 6  quadrature encoder input, 8 channels of analog input and output, 32
 7  bits digital I/O, an interval timer with interrupt and a watchdog.
 8  
 9  == Installing
10  
11  `loadrt hal_stg [base=<address>] [num_chan=<nr>] [dio="<dio-string>"] [model=<model>]`
12  
13  The base address field is optional; if it's not provided the driver
14  attempts to autodetect the board. The num_chan field is used to specify
15  the number of channels available on the card, if not used the 8 axis
16  version is assumed. The digital inputs/outputs configuration is
17  determined by a config string passed to insmod when loading the module.
18  The format consists of a four character string that sets the direction
19  of each group of pins. Each character of the direction string is either
20  "I" or "O". The first character sets the direction of port A (Port A -
21  DIO.0-7), the next sets port B (Port B - DIO.8-15), the next sets port
22  C (Port C - DIO.16-23), and the fourth sets port D (Port D -
23  DIO.24-31). The model field can be used in case the driver doesn't
24  autodetect the right card version.
25  
26  hint: after starting up the driver, 'dmesg' can be consulted for
27  messages relevant to the driver (e.g. autodetected version number and
28  base address). For example:
29  
30      loadrt hal_stg base=0x300 num_chan=4 dio="IOIO"
31  
32  This example installs the STG driver for a card found at the base
33  address of 0x300, 4 channels of encoder feedback, DACs and ADCs, 
34  along with 32 bits of I/O configured like this: the first 8 (Port A)
35  configured as Input, the next 8 (Port B) configured as Output, the next
36  8 (Port C) configured as Input, and the last 8 (Port D) configured as
37  Output
38  
39      loadrt hal_stg
40  
41  This example installs the driver and attempts to autodetect the board
42  address and board model, it installs 8 axes by default along with a
43  standard I/O setup: Port A & B configured as Input, Port C & D
44  configured as Output.
45  
46  == Pins
47  
48   - stg.<channel>.counts (s32) Tracks the counted encoder ticks.
49   - stg.<channel>.position (float) Outputs a converted position.
50   - stg.<channel>.dac-value (float) Drives the voltage for the
51     corresponding DAC.
52   - stg.<channel>.adc-value (float) Tracks the measured voltage from the
53     corresponding ADC.
54   - stg.in-<pinnum> (bit) Tracks a physical input pin.
55   - stg.in-<pinnum>-not (bit) Tracks a physical input pin, but inverted.
56   - stg.out-<pinnum> (bit) Drives a physical output pin
57  
58  For each pin, <channel> is the axis number, and <pinnum> is the logic
59  pin number of the STG if `IIOO` is defined, there are 16 input pins (in-00
60  .. in-15) and 16 output pins (out-00 .. out-15), and they correspond to
61  PORTs ABCD (in-00 is PORTA.0, out-15 is PORTD.7).
62  
63  The in-<pinnum> HAL pin is TRUE if the physical pin is high, and FALSE if the
64  physical pin is low. The in-<pinnum>-not HAL pin is inverted -- it is
65  FALSE if the physical pin is high. By connecting a signal to one or the
66  other, the user can determine the state of the input.
67  
68  == Parameters
69  
70   - stg.<channel>.position-scale (float) The number of counts / user unit
71     (to convert from counts to units).
72   - stg.<channel>.dac-offset (float) Sets the offset for the corresponding
73     DAC.
74   - stg.<channel>.dac-gain (float) Sets the gain of the corresponding DAC.
75   - stg.<channel>.adc-offset (float) Sets the offset of the corresponding
76     ADC.
77   - stg.<channel>.adc-gain (float) Sets the gain of the corresponding ADC.
78   - stg.out-<pinnum>-invert (bit) Inverts an output pin.
79  
80  The -invert parameter determines whether an output pin is active high
81  or active low. If -invert is FALSE, setting the HAL out- pin TRUE
82  drives the physical pin high, and FALSE drives it low. If -invert is
83  TRUE, then setting the HAL out- pin TRUE will drive the physical pin
84  low.
85  
86  === Functions
87  
88   - stg.capture-position (funct) Reads the encoder counters from the axis
89     <channel>.
90   - stg.write-dacs (funct) Writes the voltages to the DACs.
91   - stg.read-adcs (funct) Reads the voltages from the ADCs.
92   - stg.di-read (funct) Reads physical in- pins of all ports and updates
93     all HAL in-<pinnum> and in-<pinnum>-not pins.
94   - stg.do-write (funct) Reads all HAL out-<pinnum> pins and updates all 
95     physical output pins.
96