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 onP2.0toP2.7, thenP3.0toP3.7.digital-input: the 16 digital inputs onP0.0toP0.7, thenP1.0toP1.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
[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=1activates output channel 1.PUT /power-off?channel=1deactivates output channel 1.GET /is-on?channel=1returns the cached output state.PUT /multiple_channel?values=101sets all 16 outputs from a compact state string.GET /channels_set_pointreturns all cached output states.
The digital input component is available as valve_io/digital-input:
GET /read?channel=1reads one input.GET /read_allreads all 16 inputs.