Axis Motor Configuration Page:
    Depending on previous page selections, not all of
    these options will show.
    If required info such as stepper/encoder scale, the 'next' button
    will not allow continuation. Eg. scale must be larger then 1

Servo Info:
    This is for setting up the servo control loop.
        P - proportional term
        I - integral term
        D - derivative term
        FF0 - zero order feed forward
        FF1 - first order feed forward
        FF2 - second order feed forward
        Deadband - if the actual position is in this band
            of the commanded proportional control will not be added.
        Dac scale      - scales the output nominal is +-1 volt
        Dac Max output - clamps the output to +- this value
        3PWM scale     - sets the mid point scale factor: see man pages
        3PWM deadtime  - deadtime between high side and low side enable
            Too little deadtime creates a short circuit - not good.

Dac Scale:
    Dac scale sets the user DAC units to PWM duty cycle. The maximum duty cycle 
    is (+ or -) 1.
    If using the 7i33 daughter board then at maximum duty cycle of (+ or -) 1
    the 7i33 outputs (+ or -) 10 volts (and produce maximum motor speed)
    If using the 7i29 daughter board at maximum duty cycle of (+ or -) 1
    then the output would be (+ or -) supply voltage (and produce maximum motor 
    speed). So with a scale of one, DAC units are duty cycle. If you were using 
    the 7i33 daughter board then maybe you would like the Dac units to be voltage.
    then you would set the dac scale to 10. 10 volts / 10 (scale) = 1 (duty cycle)
    You could scale this to represent motor speed, voltage, duty cycle or anything
    else. Common settings would be duty cycle (scale of 1), voltage (scale of
    maximum voltage) or axis speed (scale of maximum axis speed in machine 
    units per second). I recommend axis speed.
    Note that scale is tied closely to dac max output.

    If Using PWM for spindle control for instance to control a VFD, then scale
    would be set to max RPM obtained at max dac output. For instance the 7i48 or
    7i33 daughter board put out maximum 10 volts and say your VFD will spin the
    spindle at 2000 RPM when 10 volts are applied to it. Then the scale should
    be 2000. Currently PNCconf does not use PID control for the spindle, so
    DAC max output does not limit the output. Usually the VFD can do this.

Analog Min Limit
Analog Max Limit
Analog Scale:
    The 5i25 spindle/analog outputs use these three settings to scale and range
    the output voltage.
    Min Limit is the minimum output eg -10 or 0 volts.
    Max Limit is the Maximuim output eg 10 volts.
    Scale sets the user units based on the maximuim output of 10 volts.
    If you wish the units to be voltage then set the scale to 10
    If you wish the units to be RPM (of say a VDF spindle) set the scale to the
    maximuim RPM of the spindle with a 10 volt signal.
    For an axis setting the scale at maximuim axis velocity (machine units per 
    second) would make sense.

    eg. scale to voltage, range of +- 10
        Analog Min Limit = -10
        Analog Max Limit = 10
        Analog Scale =     10

    eg. scale to RPM, range 0 to 3000 ( assumes 3000 rpm with a 10 volt output )
        Analog Min Limit = 0
        Analog Max Limit = 3000
        Analog Scale =     3000
        ( This would have an output between 0 and 10 volts )

    eg. scale to RPM, range -3000 to 3000 ( assumes 6000 rpm with a 10 volt output )
        Analog Min Limit = 3000
        Analog Max Limit = 3000
        Analog Scale =     6000
        ( This would limit the output to +- 5 volts )

Dac Max Output:
    Dac max output is a PID setting. (Currently the spindle does not use PID.)
    This is the maximum output that the dac can output to the amps. It is in the 
    units set by the dac scale. It using a simple H-bridge you may have to set 
    this less then the actual max output as H-bridges must turn on and off at a 
    minimum rate. For instance if your scaling sets voltage and you want to limit
    voltage to 7 (as the daughter boards produce 10 volts maximum) set this to 7

Use BLDC Motor Commutation Control:
    Select this to use and configure the BLDC component.
    You would use this with special daughter boards or odd situations.
    The BLDC component can be used to control brushless motors
    directly and for HALL sensor conversions. See the MAN pages.
    For HALL conversion one must select the HALL/GRAY signals
    in the GPIO components
    PNCconf openloop testing currently does not support BLDC.
    PNCconf does not finish the HAL connections for full BLDC control.
    I have nothing to test with - so you'll have to tinker with it.
    Please send suggestions to EMC mail list or forum.

Open loop servo test Button:
    Use this test to confirm proper Dac output and encoder input.
    This is unavailable if using simulated realtime.
    It is important to confirm the motor turns in the positive
    direction when the positive jog button is pressed.
    It is important to confirm the encoder counts in the positive 
    direction when the motor turns in the positive direction.
    If this is not true expect a SERVO MOTOR RUN AWAY when using
    PID control!
    You can confirm the maximum axis speed the servo can produce.
    You can also confirm the encoder scaling is correct, by moving
    the axis a known distance and noting the encoder count. The encoder
    should function with out the amp enabled depending how it is powered.
    The limit switches are not functional during this test.
    The fast-dac / slow-dac options are preselect options so it is convienant
    to switch between slow speed and fast speed. Set them to what you like - 
    remember there is no ramping.
    Bias - used to add / subtract a constant value to the dac. It can only be 
    used for this test to temporarily stabilize a drifting motor - it will not 
    be used in the regular PID control.

    For testing purposes if you require an output true, for instance to force
    a relay to close to allow the amplifier to be powered, select the 
    'force-pin-true' output signal on the Mesa page. The openloop and tuning 
    tests will then set the output true for the length of the test.

    Note that 7i77 and 7i76 daughter boards need their field power supplied
    or some of the HAL pins will not be made and could cause an error message.

Spindle-at-speed settings:
    Set the scaling so Linuxcnc knows when the spindle is close enough
    to the requested speed. A spindle encoder or spindle-at-speed 
    digital input signal is required for this.
    There is the option of percent or RPM range.
    If you leave percent at 100 then set the RPM difference that is acceptable.
    Other wise set the RPM difference to 0 and set the percent that is acceptable.
    The default is a difference of +-200 RPM. Maximuim is 500 RPM.

Spindle display filter gain:
    If a spindle speed display was chosen, this sets the filter
    gain which helps stop the display from bouncing around.
    The default gain is 1

Stepper Info:
    This is for setting up the Stepper control loop:
        step on time    - minimum time in nanoseconds for the step pulse.
        Step Space      - minimum time between steps.
        Direction Hold  - minimum time between last step and direction change.
        Direction Setup - minimum time for direction signal.
        Driver type     - choose a pre determined driver timing
        motor steps     - number of electrical steps for motor usually 200
        microstepping   - microstepping multiplication factor.
        motor steps times microstepping = number of steps per revolution.

Axis info:
    Encoder Scale    - number of pulses per unit of axis movement.
    Stepper Scale    - number of steps per unit of axis movement.
    Max velocity     - in units per MINUTE.
    Max Acceleration - in units per SECOND squared.  
    Rapid speed following error - amount actual can deviate from commanded.
    Feed speed following error  - amount actual can deviate from commanded.
    Invert motor direction      - check to reverse motor direction
    Invert encoder direction    - check to reverse encoder direction
    When using metric units check the defaults carefully they are not converted
    so need to be adjusted to sane values.
    Following error setting are usually temporarily set larger to help with
    servo tuning.

Calculate Scale Button:
    You can enter scaling directly or use this dialog to calculate them.
    check the boxes to add the setting to the calculation.

    Pulley Teeth    - use this if using a pulley or gear drive.
                      or uncheck for direct drive. Enter the
                      number of teeth of the cogs/gears not the
                      gear ratio.
    Worm turn ratio - use this for worm drives. Enter the gear
                      ratio. EG if two turns of input = one of output
                      enter 2:1 The encoder is assumed connected to 
                      the input.
    Leadscrew       - pitch (metric) or TPI of leadscrew.
    Encoder lines   - the number of basic lines (not pulses) of the encoder.
    Microsteps      - the multiplication factor to apply to motor steps. 
    Motor steps     - the number of steps of motor (usually 200).
                      one could uncheck the microstep checkbox and just
                      enter the total number of steps per revolution of
                      the step drive.

    The scale settings change as you enter data / check boxes.
    The motion data is just for information.
    If you wish to use the settings press apply otherwise cancel.

Test / Tune Axis Button:
    Use this to test and tune the current axis.
    This is unavailable for servos or if using simulated realtime.
    set the velocity, acceleration and control loop settings.
    jog to a safe zone close to the middle of axis.
    set the test distance and choose a movement type:
        +- for moving both sides of start point.
        - for moving between zero and negative side.
        + for moving between zero and positive side.
    choose a pause time.
    press run and the test will move back and forth pausing 
    at each end of travel.
    pressing OK will transfer the settings to the axis page.
    pressing cancel will keep the existing settings.

    Note that 7i77 and 7i76 daughter boards need their field power supplied
    or some of the HAL pins will not be made and could cause an error message.
