# NI-6519 digital I/O Flowchem supports the National Instruments NI-6519 industrial digital I/O device through NI-DAQmx. The NI-6519 is exposed as two components: * `relay`: the 16 digital outputs on `P2.0` to `P2.7`, then `P3.0` to `P3.7`. * `digital-input`: the 16 digital inputs on `P0.0` to `P0.7`, then `P1.0` to `P1.7`. The port directions are fixed by the NI-6519 hardware and do not need to be configured. ```{note} The NI-6519 outputs are sinking outputs. Wire the output supply to `OUT.COM (VCC)` and ground to `GND` according to the NI 651x manual. ``` ## Configuration ```toml [device.valve_io] type = "NI6519" module = "Dev1" reset_outputs_on_initialize = true ``` If there is exactly one NI-6519 visible to NI-DAQmx, `module` may be omitted. Otherwise, set it to the NI MAX device name. ## API The relay component is available as `valve_io/relay`: * `PUT /power-on?channel=1` activates output channel 1. * `PUT /power-off?channel=1` deactivates output channel 1. * `GET /is-on?channel=1` returns the cached output state. * `PUT /multiple_channel?values=101` sets all 16 outputs from a compact state string. * `GET /channels_set_point` returns all cached output states. The digital input component is available as `valve_io/digital-input`: * `GET /read?channel=1` reads one input. * `GET /read_all` reads all 16 inputs.