P1-04ADL-2

Voltage Input

This module can read the voltage of four different input signals.

int inputCounts = P1.readAnalog(1, 2); //set the value of slot 1 channel 2 returned by the readAnalog function to the variable inputCounts
				float inputVolts = 10 * ((float)inputCounts / 8191); //converts the value of inputCounts to float with the units V
digitalReading = base[1][2].value   #store the digital value of slot 1 channel 2
                    analogReading = base[1][2].real  #store the analog value of slot 1 channel 2 with the units V

Configuration Tool

Compatible Functions

Properties and Methods


import P1AM
                    base = P1AM.Base()
                    module = base[1] # Slot 1
                    ch = module[2] # Channel 2
                

Module Configuration and Status Tables

We recommend using the status functions and configuration tool. These tables are provided as additional reference.

Module Status Data

Bytes (MSB) 7 6 5 4 3 2 1 0 (LSB) Description
Byte 0 x x x x x x x x bits 0-7 are undefined
Byte 1 x x x x x x x x bits 0-7 are undefined
Byte 2 x x x x x x x x bits 0-7 are undefined
Byte 3 x x x x x x 1 0 bit 1 - Lost 24V error
bit 0 - Module diagnostics failure
Byte 4 x x x x x x x x bits 0-7 are undefined
Byte 5 x x x x x x x x bits 0-7 are undefined
Byte 6 x x x x x x x x bits 0-7 are undefined
Byte 7 x x x x 3 2 1 0 bit 3 - Under range error on channel 4
bit 2 - Under range error on channel 3
bit 1 - Under range error on channel 2
bit 0 - Under range error on channel 1
Byte 8 x x x x x x x x bits 0-7 are undefined
Byte 9 x x x x x x x x bits 0-7 are undefined
Byte 10 x x x x x x x x bits 0-7 are undefined
Byte 11 x x x x 3 2 1 0 bit 3 - Over range error on channel 4
bit 2 - Over range error on channel 3
bit 1 - Over range error on channel 2
bit 0 - Over range error on channel 1

Module Configuration Data

Default values are in bold.

Offset Description Allowable Values Value Description
Bytes 00-01 Channel enable 0x4000 Enable channel 1
0x4001 Enable channels 1 and 2
0x4002 Enable channels 1-3
0x4003 Enable channels 1-4

Channels: 4
Range: 0-10V
Resolution: 13 bit (0-8191)
Examples:
Arduino
CircuitPython

Additional Resources:
Data Sheet
P1-04ADL-2 on AutomationDirect.com