Skip to content

MPF config file reference: FAST Pinball switches

MPF 0.57 Configuration Reference for FAST Pinball Hardware

This page is parrt of the reference material for users of the Mission Pinball Framework and FAST Pinball hardware. If you're new to MPF and FAST, read the MPF + FAST overview first. If you are a programmer writing your own software, see our Developer's Reference Guide.

Note that this guide only applies to MPF 0.57. If you're using MPF 0.56 or older, then the FAST Pinball configuration section of the Mission Pinball website has everything you need.

The switches: section of your MPF config files contains settings and names for all switches in your machine.

When using FAST Pinball hardware, you'll need to know how to enter the number: setting for each switch. There are also optional FAST-specific advanced debounce settings you can configure for each switch.

Here's an example of the switches: section of an MPF config file when FAST Pinball hardware is used:

FAST switch numbering in MPF 0.57
switches:
  left_flipper:
    number: cab-8 # (1)!
  right_flipper:
    number: cab-16 # (2)!
  plunger_lane:
    number: 3208-0 # (3)!
    platform_settings:
      debounce_open: 5ms
      debounce_close: 20ms
  1. I/O board called "cab" from above, switch 8
  2. I/O board called "cab" from above, switch 16
  3. I/O board called "3208" from above, switch 0

number:

With FAST Pinball hardware, the switch number is the name of the I/O board, then a dash, then the number of the switch input from the I/O board.

The name of the I/O board is whatever you called that board in the net: io_loop: section of your config.

The switch number is printed on the I/O board switch input. Note that these start with zero, so the I/O 1616 board uses switch numbers 0-15, the 3208 is 0-31, etc.

The FAST Modern Platform supports a maximum of 104 switches

The FAST Modern Platform supports a maximum of 104 switches across whatever combination of I/O boards you want.

platform_settings:

All devices in MPF can have a "platform_settings:" subsection which contain additional configuration options for features specific to that hardware. In the case of FAST Pinball switches, you can configure different debounce settings for switches opening and closing.

debounce_open:

The number of ms (1-255) that a switch must be open before it's registered as open. The default will be the default_normal_debounce_open: from the net: section of your config file.

Note that there's also a default_quick_debounce_open: setting in the net: section of your config file. Typically your auto-fire switches (like flipper buttons, pop bumpers, slingshots, etc.) will use the "quick" settings, and all the other switches will use the normal settings. Here's an example with several different settings:

FAST switch debounce settings in MPF 0.57
# config_version=6

fast:
  net:
    [other settings not shown]
    default_quick_debounce_open: 2ms
    default_quick_debounce_close: 2ms
    default_normal_debounce_open: 4ms
    default_normal_debounce_close: 4ms

switches:
  left_flipper:
    number: cab-8
    debounce: quick            # will use 2ms / 2ms
  right_flipper:
    number: cab-16
    debounce: quick            # will use 2ms / 2ms
  plunger_lane:
    number: 3208-0
    platform_settings:
      debounce_open: 5ms
      debounce_close: 20ms
  spinner_opto:                # debounce will be 4ms / 4ms ("normal") since it was not specified
    number: 3208-1
    type: NC                   # not a FAST-specific setting, but don't forget!

debounce_close:

The number of ms (1-255) that a switch must be closed before it's registered as closed. The default will be the default_normal_debounce_close: from the net: section of your config file.

N or > jump the next page, P or < for previous, search with S or ?