P1-15CDD2

Discrete DC Input/Output Combination

Input Functions

This function returns the state of a single channel.

bool point = P1.readDiscrete(1,2); // Read state of slot 1 channel 2
point = base[1].inputs[2].value # 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
allPoints = base[1].di_bitmapped() # Read state of all channels for slot 1

Output Functions

Note: While this module only has 7 output channels, you can still write to channel 8. However, it will have no functional purpose.

This function writes the state of a single channel.

P1.writeDiscrete(HIGH,1,2); // Turn on slot 1 channel 2
base[1].outputs[2].value = 1 # Turn on slot 1 channel 2

This function writes the state of all 7 channels. It turns channels 1-6 on and turns channel 7 off.

P1.writeDiscrete(0x3F, 1); // Write state of all channels for slot 1
base[1].do_bitmapped(0x3F) # Write state of all channels for slot 1

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: 12–24 VDC
Examples:
Arduino
CircuitPython

Output Channels: 7
Discrete Output Type: Sourcing
Rated Output Voltage: 12–24 VDC
Example:
Arduino
CircuitPython

Additional Resources:
Data Sheet
P1-15CDD2 on AutomationDirect.com