pluto_step − Hardware driver and firmware for the Pluto-P parallel-port FPGA, for use with stepper machines.
loadrt pluto_step 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.
watchdog [default: 1]
Set to zero to disable the "hardware watchdog". "Watchdog" will tristate all outputs approximately 6ms after the last execution of pluto-step.write, which adds some protection in the case of emc crashes.
speedrange [default: 0]
Selects one of four speed ranges:
0: Top speed 312.5kHz; minimum
1: Top speed 156.25kHz; minimum speed 305Hz
2: Top speed 78.125kHz; minimum speed 153Hz
3: Top speed 39.06kHz; minimum speed 76Hz
Choosing the smallest maximum speed that is above the maximum for any one axis may give improved step regularity at low step speeds.
Pluto_step is an emc2 software driver and associated firmware that allow the Pluto-P board to be used to control a stepper-based CNC machine.
The driver has 4 step+direction channels, 14 dedicated digital outputs, and 16 dedicated digital inputs.
The step generator takes a position input and output.
The step waveform includes step length/space and direction hold/setup time. Step length and direction setup/hold time is enforced in the FPGA. Step space is enforced by a velocity cap in the driver.
(all the following numbers are subject to change) In speedrange=0, the maximum step rate is 312.5kHz. For position feedback to be accurate, the maximum step rate is 512 pulses per servo cycle (so a 1kHz servo cycle does not impose any additional limitation). The maximum step rate may be lowered by the step length and space parameters, which are rounded up to the nearest multiple of 1600ns.
In successive speedranges the maximum step rate is divided in half, as is the maximum steps per servo cycle, and the minimum nonzero step rate.
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.
pluto-step.read (requires a floating-point thread)
Read all the inputs from the pluto-step board
pluto-step.write (requires a floating-point thread)
Write all the outputs on the pluto-step board
float in (M=0..3)
pluto-step.stepgen.M.velocity-fb float out (M=0..3)
pluto-step.stepgen.M.position-fb float out (M=0..3)
pluto-step.stepgen.M.counts s32 out (M=0..3)
pluto-step.stepgen.M.enable bit in (M=0..3)
pluto-step.stepgen.M.reset bit in (M=0..3)
When TRUE, reset position-fb to 0
pluto-step.dout.MM bit in (MM=00..13)
dout.MM corresponds to the pin labeled OUTM on the pinout diagram.
bit out (MM=00..15)
pluto-step.din.MM-not bit out (MM=00..15)
din.MM corresponds to the pin labeled INM on the pinout diagram.
float rw (M=0..3) (default: 1.0)
pluto-step.stepgen.M.maxvel float rw (M=0..3) (default: 0)
pluto-step.stepgen.step-polarity bit rw
pluto-step.stepgen.steplen u32 rw
Step length in ns.
pluto-step.stepgen.stepspace u32 rw
Step space in ns
pluto-step.stepgen.dirtime u32 rw
Dir hold/setup in ns. Refer to the pdf documentation for a diagram of what these timings mean.
pluto-step.dout.MM-invert bit rw (MM=00..13)
If TRUE, the output on the corresponding dout.MM is inverted.
pluto-step.communication-error u32 rw
Incremented each time pluto-step.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. If the hardware watchdog is enabled, it will activate shortly after the communication error is detected by emc. To continue after a communication error, set this parameter back to zero.
pluto-step.debug-1 s32 rw
pluto-step.debug-2 float rw (default: .5)
pluto-step.debug-3 float rw (default: 2.0)
Registers that hold debugging information of interest to developers
The pluto_step section in the HAL User Manual, which shows the location of each physical pin on the pluto board.