set_dio Moku:Go
Configure the Digital IO directionDigital I/O is configured for Input or Output at the pin level. To use DIO with Multi-instrument mode, the user must complete three steps:
- Set up the required instrument in the target slot,
- Configure inputs and/or outputs of that slot to be connected to the Digital I/O, and
- Configure the direction of the Digital I/O pins individually to meet the needs of the instrument.
The instrument itself cannot govern the pin direction. Pins default to inputs. Pin direction is generally specified using the direction_map parameter below which accepts a list of one or more maps, each map sets the direction of a single pin. This can get cumbersome, so a convenience parameter direction exists which simply takes a list of exactly 16 0s and 1s, corresponding to input or output (respectively) for each of the 16 pins in the DIO block.
Parameters
array
A list of maps of pin and direction to configure. Must not be specified at the same time as `direction`
default: nilallowed values:[{pin: 1, direction: 1}] array
List of 16 DIO directions, one for each pin. Where, 0 represents In and 1 represents Out. Must not be specified at the same time as `direction_map`.
default: nilallowed values:[0/1, ...] boolean
Disable all implicit conversions and coercions.
default: trueNOTE
It is required to connect DIO to a slot before configuring it. Read set_connections