steppers:

Config file section

Valid in machine config files YES
Valid in mode config files NO

The steppers: section of your config is where you configure steppers.

This is an example:

steppers:
    linearAxis_stepper:
        number: 1
        pos_min:   -5 # negative is behind home
        pos_max: 1000
        homing_direction: clockwise
        named_positions:
            -5: test_00
            999: test_01
            500: test_10

Required settings

The following sections are required in the steppers: section of your config:

number:

Single value, type: string.

This is the number of the stepper which specifies which stepper the it is physically connected to. The exact format used here will depend on which control system you’re using and how the stepper is connected.

See the How to configure “number:” settings guide for details.

Optional settings

The following sections are optional in the steppers: section of your config. (If you don’t include them, the default will be used).

ball_search_max:

Single value, type: integer. Default: 1

The maximum position to use during ball search for this stepper. During ball search the stepper will move between ball_search_min and ball_search_max.

ball_search_min:

Single value, type: integer. Default: 0

The minimum position to use during ball search for this stepper. During ball search the stepper will move between ball_search_min and ball_search_max.

ball_search_wait:

Single value, type: time string (ms) (Instructions for entering time strings) . Default: 5s

How long should the stepper wait after moving to ball_search_min before moving to ball_search_max.

homing_direction:

Single value, type: one of the following options: clockwise, counterclockwise. Default: clockwise

In which direction should the stepper move to reach the home position?

homing_mode:

Single value, type: one of the following options: hardware, switch. Default: hardware

Some controllers support hardware homing which should be preferred. However, you can also define a homing_switch which will be used to determine whether the stepper is at the home position.

homing_switch:

Single value, type: string name of a switches device.

Switch to check if the stepper is at the home position when homing_mode is set to switch.

named_positions:

One or more sub-entries, each in the format of type: float:str.

This is a sub-section mapping of stepper positions to MPF event names. For example:

        named_positions:
            0: move_home
            999: move_to_999
            500: move_to_500

The values in this named_positions: list represent MPF events that, when posted, tell this stepper to move to a certain position. So in the example above, when the move_to_999 event is posted, this stepper will move to position 999.

platform:

Single value, type: string.

Name of the platform this stepper is connected to. The default value of None means the default hardware platform will be used. You only need to change this if you have multiple different hardware platforms in use and this stepper is not connected to the default platform.

See the Mixing-and-Matching hardware platforms guide for details.

platform_settings:

Single value, type: dict.

Platform specific stepper settings for this stepper. Check the documentation of your platform for details.

pos_max:

Single value, type: integer. Default: 1000

Maximum possible position.

pos_min:

Single value, type: integer. Default: 0

Minimum possible position. Negative values are left of the home position.

reset_events:

List of one (or more) device control events (Instructions for entering device control events). Default: machine_reset_phase_3, ball_starting, ball_will_end, service_mode_entered

Events to reset the position of the stepper.

reset_position:

Single value, type: integer. Default: 0

Reset position for this stepper. Usually this is the home position.

console_log:

Single value, type: one of the following options: none, basic, full. Default: basic

Log level for the console log for this device.

debug:

Single value, type: boolean (Yes/No or True/False). Default: False

Set this to true to see additional debug output. This might impact the performance of MPF.

file_log:

Single value, type: one of the following options: none, basic, full. Default: basic

Log level for the file log for this device.

label:

Single value, type: string. Default: %

Name of this device in service mode.

tags:

List of one (or more) values, each is a type: string.

Not used currently.