Input Functions
This function returns the state of a single channel.
bool point = P1.readDiscrete(1,2); // Read state of slot 1 channel 2
This function returns the state of all 8 channels. It would return 0x7F if channels 1-7 are on.
uint8_t allPoints = P1.readDiscrete(1); // Read state of all channels for slot 1
Output Functions
This function writes the state of a single channel.
P1.writeDiscrete(HIGH,1,2); // Turn on slot 1 channel 2
This function writes the state of all 8 channels. It turns channels 1-7 on and turns channel 8 off.
P1.writeDiscrete(0x7F, 1); // Write state of all channels for slot 1
Compatible Functions
Module Configuration and Status Tables
This module does not provide any status data and does not require configuration.
Input Channels: 8
Discrete Input Type: Sinking or Sourcing
Rated Input Voltage: 24VAC/VDC
Examples:
Arduino
CircuitPython
Channels: 8
Discrete Output Type: Relay FORM A (SPST)
Rated Voltage: 6–30 VDC, 6–120 VAC
Example:
Arduino
CircuitPython
Additional Resources:
Data Sheet
P1-16CDR on AutomationDirect.com