MPF config file reference: FAST Neuron Controllers¶
MPF Configuration Reference for FAST Pinball Hardware
This documentation is 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.
This guide shows all options for configuring the FAST Neuron controller in MPF.
MPF 0.56.1.dev4 required (released Mar 29, 2023)¶
This guide is for MPF version 0.56.1.dev4
and newer. You can see which version of MPF you have via the command mpf --version
:
>mpf --version
MPF v0.56.1.dev4
If you have something older, upgrade it via the command pip install --upgrade git+https://github.com/fastpinball/mpf
. Since this is a work-in-progress, it's changing rapidly and important that you're on the latest dev version.
Minimum config example¶
fast:
net:
controller: neuron
port: /dev/tty.usbmodem11101
io_boards:
my_first_board:
model: FP-I/O-3208
order: 1
Full config example¶
fast:
net:
port: /dev/tty.usbmodem11101, /dev/tty.usbmodem14401, com3
controller: neuron
io_loop:
some_board:
model: FP-I/O-3208
order: 1
cabinet_board:
model: FP-I/O-0024
order: 2
baud: 921600
debug: false
console_log: none
file_log: basic
watchdog: 1s
default_quick_debounce_open: 2ms
default_quick_debounce_close: 2ms
default_normal_debounce_open: 4ms
default_normal_debounce_close: 4ms
Required settings¶
The following settings are required in your fast: net:
section when using MPF with a Neuron Controller.
port:¶
The name, or a list of names, of the NET serial port. On windows, it will be something like COM3
. On Mac or Linux, it will most likely be something like /dev/tty.usbmodem11101
. This value is required.
You can enter more than one port name, separated by commas. The example above does this:
port: /dev/tty.usbmodem11101, /dev/tty.usbmodem14401, com3
In this case, if the port /dev/tty.usbmodem11101
does not exist, MPF will try to connect to /dev/tty.usbmodem14401
. If that port doesn't exist, it will try com3
. (This process is quick and does not add to your startup time.)
This is useful if you connect to your FAST hardware from different computers with the same configs. (Such as a dev laptop and and the Linux computer in your cabinet. Or your machine and your friend's machine which identify the FAST hardware via different port names.)
You can list as many names as you want here.
Note that if you've configured MPF for "production mode", it will always try to connect to the first port in the list.
controller: neuron¶
The type of FAST Pinball controller that's connected to the NET port. If you're using a Neuron, then this is controller: neuron
.
io_loop:¶
This consists of a series of sub-entries, one for each I/O board in your I/O loop network. This is similar to other device lists in MPF, like lights:
or coils:
where you give a device a name, and then under that name you have settings for that specific device.
In this case, the device entries are your FAST I/O boards. Here's an example from a machine with a Cabinet I/O board:
fast:
net:
controller: neuron
port: COM4
io_boards:
cab:
model: FP-CAB-0001
order: 1
1616:
model: FP-I/O-1616
order: 2
0804:
model: FP-I/O-0804
order: 3
3208:
model: FP-I/O-3208
order: 4
model:¶
The model number of this FAST I/O board, which you can find printed on the board or in the product documentation. Note that the final number(s) after the dash is the "hardware revision" number and does not matter to the software or MPF. So you can leave it off, or include it, your call. For example, FP-I/O-3208-2B
is the same as FP-I/O-3208
and can be entered as either.
Valid entries include:
FP-I/O-3208
FP-I/O-1616
FP-I/O-1604
FP-I/O-0804
FP-I/O-0024
FP-CAB-0001
order:¶
This board's order in the I/O loop, specified simply as order: 1
, order: 2
etc. The first board "out" is 1, then 2, etc. This list must start with 1 and not skip numbers. A maximum of 9 I/O boards are supported. If your physical boards do not match the order configured here, MPF will show an error. (This is a safety feature to prevent boards accidentally connected in the wrong order from controlling unexpected devices.)
Optional settings (with defaults)¶
The following settings are optional, with the defaults in parenthesis used if you do not include this setting in your config.
baud: (921600)¶
The baudrate MPF will use for this port.
watchdog: (1s)¶
Sets the watchdog timer for the NET port. The watchdog timer runs as part of the Neuron firmware, and requires a continuous "ping" from MPF in order for the Neuron to keep the drivers active. If MPF crashes or otherwise breaks, the watchdog messages will stop being sent, and the Neuron will disable any drivers that are currently active and will not allow drivers to activate.
The default value of 1s
means that your drivers will be active for a max of 1 second after MPF crashes or ends.
The Neuron has a green LED (D5) in the upper left corner labeled
BLANKING
. When this LED is ON, the blanking circuit is enabled which means the watchdog is expired and drivers are disabled.
Details for the watchdog timer are covered in the FAST Serial Protocol docs.
Default switch debounce settings¶
MPF has a simple debounce:
setting for switches which can be either debounce: quick
or debounce: normal
. (What is switch debouncing? See the MPF documentation Debouncing in Pinball Machines for the full details.) The quick overview is you want "quick" for fast-response things, like flippers, pop bumpers, slingshots, etc., and "normal" for everything else. But what exactly do those "quick" and "normal" settings mean? That is left up to the hardware platform.
Switches in FAST Pinball can have separate settings for how much time passes for a switch to debounce in both the "open" and "close" motions. The following four settings let you specify the default debounce settings, both open and close, for switches set as "quick" or "normal".
Note that you can override this on an individual switch basis, giving you ultimate flexibility.
default_quick_debounce_open: 2ms
default_quick_debounce_close: 2ms
default_normal_debounce_open: 4ms
default_normal_debounce_close: 4ms
debug: (false)¶
Enables detailed FAST Serial Protocol message logging.
When enabled, all serial messages exchanged over the NET port, both sending and receiving, are included in the MPF log. This just controls whether these messages are included in the log. You need to configure the other MPF logging options elsewhere. Once you have logs with this option enabled, you can see all the port-related messages by filtering the log for [NET]
. For example:
2023-03-01 11:38:39,621 : INFO : [NET] : >>>> b'ID:\r'
2023-03-01 11:38:39,622 : INFO : [NET] : <<<< b'I'
2023-03-01 11:38:39,622 : INFO : [NET] : <<<< b'D:NET FP-CPU-2000 02.1'
2023-03-01 11:38:39,622 : INFO : [NET] : <<<< b'3\r'
2023-03-01 11:38:39,622 : INFO : [NET] : Connected to FP-CPU-2000 with firmware v02.13
2023-03-01 11:38:39,624 : INFO : [NET] : >>>> b'CH:2000,FF\r'
2023-03-01 11:38:39,625 : INFO : [NET] : <<<< b'C'
2023-03-01 11:38:39,625 : INFO : [NET] : <<<< b'H:P\r'
2023-03-01 11:38:39,626 : INFO : [NET] : >>>> b'WD:1\r'
2023-03-01 11:38:39,626 : INFO : [NET] : >>>> b'SA:\r'
2023-03-01 11:38:39,626 : INFO : [NET] : <<<< b'WD'
2023-03-01 11:38:39,627 : INFO : [NET] : <<<< b':P\rS'
2023-03-01 11:38:39,627 : INFO : [NET] : <<<< b'A:0E,0000000000'
2023-03-01 11:38:39,627 : INFO : [NET] : <<<< b'000000000000000000\r'
2023-03-01 11:38:39,816 : INFO : [NET] : >>>> b'WD:3E8\r'
2023-03-01 11:38:39,819 : INFO : [NET] : <<<< b'WD'
2023-03-01 11:38:39,819 : INFO : [NET] : <<<< b':P\r'
Lines with >>>>
are messages from MPF to the NET port, and <<<<
are messages from the NET to MPF. Also note that this logging is the low-level port message logging, and often times the complete serial protocol message are split between lines and processed as parts. The carriage return \r
is the separator between messages.
console_log: (none)¶
The log level for the console log for this port. Options are full
, basic
, or none
. See the MPF Documentation for details.
file_log: (basic)¶
The log level for the file log for this port. Options are full
, basic
, or none
. See the MPF Documentation for details.
Documentation Feedback? Requests? Confused?
Hi! I'm Brian, and I'm responsible for the documentation at FAST Pinball. If you have any feedback, requests, corrections, ideas, or any other thoughts about this documentation, please let me know! You can email me at brian@fastpinball.com. Thanks!
N or > jump the next page, P or < for previous, search with S or ?