This documentation is no longer maintained. For documentation of the current version of emc2, please see http://www.linuxcnc.org/docview/html

PLUTO_SERVO

NAME
SYNOPSIS
DESCRIPTION
FUNCTIONS
PINS
PARAMETERS

NAME

pluto_servo − Hardware driver and firmware for the Pluto-P parallel-port FPGA, for use with servo machines.

SYNOPSIS

loadrt pluto_servo ioaddr=addr ioaddr_hi=addr epp_wide=[0|1]

ioaddr [default: 0x378]

The base address of the parallel port.

ioaddr_hi [default: 0]

The secondary address of the parallel port, used to set EPP mode. 0 means to use ioaddr + 0x400. -1 means there is no secondary address.

epp_wide [default: 1]

Set to zero to disable "wide EPP mode". "Wide" mode allows 16- and 32-bit EPP transfers, which can reduce the time spent in the read and write functions. However, this mode may not work on all EPP parallel ports.

DESCRIPTION

Pluto_servo is an emc2 software driver and associated firmware that allow the Pluto-P board to be used to control a servo-based CNC machine.

The driver has 4 PWM channels, 4 quadrature channels with index pulse, 18 digital outputs (8 shared with PWM), and 20 digital inputs (12 shared with quadrature).

Encoders

The encoder pins and parameters conform to the ‘canonical encoder’ interface described in the HAL manual. It operates in ‘x4 mode’.

The sample rate of the encoder is 40MHz. The maximum number quadrature rate is 8191 counts per emc2 servo cycle. For correct handling of the index pulse, the number of encoder counts per revolution must be less than 8191.

PWM

The PWM pins and parameters conform to the ‘canonical analog output’ interface described in the HAL manual. The output pins are ‘up/down’ or ‘pwm/dir’ pins as described in the documentation of the ‘pwmgen’ component.

Internally the PWM generator is based on a 12-bit, 40MHz counter, giving 4095 duty cycles from -100% to +100% and a frequency of approximately 19.5kHz. In PDM mode, the duty periods are approximately 100ns long.

Digital I/O

The digital output pins conform to the ‘canonical digital output’ interface described in the HAL manual.

The digital input pins conform to the ‘canonical digital input’ interface described in the HAL manual.

FUNCTIONS

pluto-servo.read (uses floating-point)

Read all the inputs from the pluto-servo board

pluto-servo.write (uses floating-point)

Write all the outputs on the pluto-servo board

PINS

pluto-servo.encoder-0-count s32 out

pluto-servo.encoder-0-position float out

pluto-servo.encoder-0-velocity float out

pluto-servo.encoder-0-reset bit in

pluto-servo.encoder-0-index-enable bit io

encoder-0 corresponds to the pins labeled QA0, QB0, and QZ0 on the pinout diagram

pluto-servo.encoder-1-count s32 out

pluto-servo.encoder-1-position float out

pluto-servo.encoder-1-velocity float out

pluto-servo.encoder-1-reset bit in

pluto-servo.encoder-1-index-enable bit io

encoder-1 corresponds to the pins labeled QA1, QB1 and QZ1 on the pinout diagram

pluto-servo.encoder-2-count s32 out

pluto-servo.encoder-2-position float out

pluto-servo.encoder-2-velocity float out

pluto-servo.encoder-2-reset bit in

pluto-servo.encoder-2-index-enable bit io

encoder-2 corresponds to the pins labeled QA2, QB2, and QZ2 on the pinout diagram

pluto-servo.encoder-3-count s32 out

pluto-servo.encoder-3-position float out

pluto-servo.encoder-3-velocity float out

pluto-servo.encoder-3-reset bit in

pluto-servo.encoder-3-index-enable bit io

encoder-3 corresponds to the pins labeled QA3, QB3, and QZ3 on the pinout diagram

pluto-servo.pwm-0-value float in

pluto-servo.pwm-0-enable bit in

pwm-0 corresponds to the pins labeled UP0 and DN0 on the pinout diagram

pluto-servo.pwm-1-value float in

pluto-servo.pwm-1-enable bit in

pwm-1 corresponds to the pins labeled UP1 and DN1 on the pinout diagram

pluto-servo.pwm-2-value float in

pluto-servo.pwm-2-enable bit in

pwm-2 corresponds to the pins labeled UP2 and DN2 on the pinout diagram

pluto-servo.pwm-3-value float in

pluto-servo.pwm-3-enable bit in

pwm-3 corresponds to the pins labeled UP3 and DN3 on the pinout diagram

pluto-servo.dout-00 bit in

dout-00 corresponds to the pin labeled OUT0 on the pinout diagram

pluto-servo.dout-01 bit in

dout-01 corresponds to the pin labeled OUT1 on the pinout diagram

pluto-servo.dout-02 bit in

dout-02 corresponds to the pin labeled OUT2 on the pinout diagram

pluto-servo.dout-03 bit in

dout-03 corresponds to the pin labeled OUT3 on the pinout diagram

pluto-servo.dout-04 bit in

dout-04 corresponds to the pin labeled OUT4 on the pinout diagram

pluto-servo.dout-05 bit in

dout-05 corresponds to the pin labeled OUT5 on the pinout diagram

pluto-servo.dout-06 bit in

dout-06 corresponds to the pin labeled OUT6 on the pinout diagram

pluto-servo.dout-07 bit in

dout-07 corresponds to the pin labeled OUT7 on the pinout diagram

pluto-servo.dout-08 bit in

dout-08 corresponds to the pin labeled OUT8 on the pinout diagram

pluto-servo.dout-09 bit in

dout-09 corresponds to the pin labeled OUT9 on the pinout diagram

pluto-servo.dout-10 bit in

This function is shared with the pwm-0 ‘up’ pin

pluto-servo.dout-11 bit in

This function is shared with the pwm-0 ‘down’ pin

pluto-servo.dout-12 bit in

This function is shared with the pwm-1 ‘up’ pin

pluto-servo.dout-13 bit in

This function is shared with the pwm-1 ‘down’ pin

pluto-servo.dout-14 bit in

This function is shared with the pwm-2 ‘up’ pin

pluto-servo.dout-15 bit in

This function is shared with the pwm-2 ‘down’ pin

pluto-servo.dout-16 bit in

This function is shared with the pwm-3 ‘up’ pin

pluto-servo.dout-17 bit in

This function is shared with the pwm-3 ‘down’ pin

pluto-servo.din-00-not bit out

pluto-servo.din-00 bit out

din-00 corresponds to the pin labeled IN0 on the pinout diagram

pluto-servo.din-01-not bit out

pluto-servo.din-01 bit out

din-01 corresponds to the pin labeled IN1 on the pinout diagram

pluto-servo.din-02-not bit out

pluto-servo.din-02 bit out

din-02 corresponds to the pin labeled IN2 on the pinout diagram

pluto-servo.din-03-not bit out

pluto-servo.din-03 bit out

din-03 corresponds to the pin labeled IN3 on the pinout diagram

pluto-servo.din-04-not bit out

pluto-servo.din-04 bit out

din-04 corresponds to the pin labeled IN4 on the pinout diagram

pluto-servo.din-05-not bit out

pluto-servo.din-05 bit out

din-05 corresponds to the pin labeled IN5 on the pinout diagram

pluto-servo.din-06-not bit out

pluto-servo.din-06 bit out

din-06 corresponds to the pin labeled IN6 on the pinout diagram

pluto-servo.din-07-not bit out

pluto-servo.din-07 bit out

din-07 corresponds to the pin labeled IN7 on the pinout diagram

pluto-servo.din-08-not bit out

pluto-servo.din-08 bit out

This function is shared with the encoder-0 ‘Z’ pin

pluto-servo.din-09-not bit out

pluto-servo.din-09 bit out

This function is shared with the encoder-1 ‘Z’ pin

pluto-servo.din-10-not bit out

pluto-servo.din-10 bit out

This function is shared with the encoder-2 ‘Z’ pin

pluto-servo.din-11-not bit out

pluto-servo.din-11 bit out

This function is shared with the encoder-3 ‘Z’ pin

pluto-servo.din-12-not bit out

pluto-servo.din-12 bit out

This function is shared with the encoder-0 ‘B’ pin

pluto-servo.din-13-not bit out

pluto-servo.din-13 bit out

This function is shared with the encoder-1 ‘B’ pin

pluto-servo.din-14-not bit out

pluto-servo.din-14 bit out

This function is shared with the encoder-2 ‘B’ pin

pluto-servo.din-15-not bit out

pluto-servo.din-15 bit out

This function is shared with the encoder-3 ‘B’ pin

pluto-servo.din-16-not bit out

pluto-servo.din-16 bit out

This function is shared with the encoder-0 ‘A’ pin

pluto-servo.din-17-not bit out

pluto-servo.din-17 bit out

This function is shared with the encoder-1 ‘A’ pin

pluto-servo.din-18-not bit out

pluto-servo.din-18 bit out

This function is shared with the encoder-2 ‘A’ pin

pluto-servo.din-19-not bit out

pluto-servo.din-19 bit out

This function is shared with the encoder-3 ‘A’ pin

PARAMETERS

pluto-servo.encoder-0-scale float rw (default: 1.0)

pluto-servo.encoder-1-scale float rw (default: 1.0)

pluto-servo.encoder-2-scale float rw (default: 1.0)

pluto-servo.encoder-3-scale float rw (default: 1.0)

pluto-servo.encoder-z-polarity bit rw

Set to TRUE if the index pulse is active low, FALSE if it is active high. Affects all encoders.

pluto-servo.pwm-0-offset float rw

pluto-servo.pwm-0-scale float rw (default: 1.0)

pluto-servo.pwm-0-max-dc float rw (default: 1.0)

pluto-servo.pwm-0-min-dc float rw

pluto-servo.pwm-0-pwmdir bit rw

Set to TRUE use PWM+direction mode. Set to FALSE to use Up/Down mode.

pluto-servo.pwm-1-offset float rw

pluto-servo.pwm-1-scale float rw (default: 1.0)

pluto-servo.pwm-1-max-dc float rw (default: 1.0)

pluto-servo.pwm-1-min-dc float rw

pluto-servo.pwm-1-pwmdir bit rw

Set to TRUE use PWM+direction mode. Set to FALSE to use Up/Down mode.

pluto-servo.pwm-2-offset float rw

pluto-servo.pwm-2-scale float rw (default: 1.0)

pluto-servo.pwm-2-max-dc float rw (default: 1.0)

pluto-servo.pwm-2-min-dc float rw

pluto-servo.pwm-2-pwmdir bit rw

Set to TRUE use PWM+direction mode. Set to FALSE to use Up/Down mode.

pluto-servo.pwm-3-offset float rw

pluto-servo.pwm-3-scale float rw (default: 1.0)

pluto-servo.pwm-3-max-dc float rw (default: 1.0)

pluto-servo.pwm-3-min-dc float rw

pluto-servo.pwm-3-pwmdir bit rw

Set to TRUE use PWM+direction mode. Set to FALSE to use Up/Down mode.

pluto-servo.pwm-is-pdm bit rw

Set to TRUE to use PDM (also called interleaved PWM) mode. Set to FALSE to use traditional PWM mode. Affects all PWM outputs.

pluto-servo.dout-00-invert bit rw

pluto-servo.dout-01-invert bit rw

pluto-servo.dout-02-invert bit rw

pluto-servo.dout-03-invert bit rw

pluto-servo.dout-04-invert bit rw

pluto-servo.dout-05-invert bit rw

pluto-servo.dout-06-invert bit rw

pluto-servo.dout-07-invert bit rw

pluto-servo.dout-08-invert bit rw

pluto-servo.dout-09-invert bit rw

pluto-servo.dout-10-invert bit rw

pluto-servo.dout-11-invert bit rw

pluto-servo.dout-12-invert bit rw

pluto-servo.dout-13-invert bit rw

pluto-servo.dout-14-invert bit rw

pluto-servo.dout-15-invert bit rw

pluto-servo.dout-16-invert bit rw

pluto-servo.dout-17-invert bit rw

When TRUE, invert the corresponding digital output

pluto-servo.debug-0 s32 rw

pluto-servo.debug-1 s32 rw

pluto-servo.communication-error u32 rw

Incremented each time pluto-servo.read detects an error code in the EPP status register. While this register is nonzero, new values are not being written to the Pluto-P board, and the status of digital outputs and the PWM duty cycle of the PWM outputs will remain unchanged. To continue after a communication error, set this parameter back to zero.