CN0540 condition-based monitoring board

The adi.cn0540.cn0540 interface controls the CN0540 condition-based monitoring data-acquisition board. It combines the AD7768-1 ADC data path with the board’s LTC2606 bias DAC, LTC2308 monitor ADC, and GPIO controls.

Create a device

Pass a libiio URI when creating the device. For example, the following connects to a board over the network and captures one buffer of voltage samples:

import adi

device = adi.cn0540(uri="ip:192.168.2.1")
device.sample_rate = 256000
device.rx_buffer_size = 1024

samples = device.rx()
device.rx_destroy_buffer()

rx() returns the single AD7768-1 input channel as floating-point values. Valid sample rates are 256000, 128000, 64000, 32000, 16000, 8000, 4000, 2000, and 1000 samples per second. Use rx_enabled_channels and rx_buffer_size to inspect or configure the inherited receive-buffer settings.

Signal and bias controls

The board interface exposes three voltage views:

input_voltage

AD7768-1 input voltage before the programmable shift voltage is applied.

shift_voltage

Bias voltage generated by the LTC2606. Writing this property destroys any active RX buffer before accessing the SPI engine; call rx() again to create a new buffer.

sensor_voltage

Sensor voltage calculated from the measured ADC value, shift voltage, and board gain constants.

All three voltage properties are expressed in millivolts.

Board controls

The GPIO-backed properties provide access to the board’s monitor power, amplifier mode and status, LEDs, and fault flag:

API reference

class adi.cn0540.cn0540(*args: str | Context, **kwargs: str | Context)

Bases: rx_def

CN0540 condition-based monitoring data-acquisition board.

The interface combines buffered AD7768-1 acquisition with the board’s LTC2606 bias DAC, LTC2308 monitor ADC, and GPIO controls. Voltage properties are reported in millivolts.

close()

Close the IIO context

property ctx: Context

IIO Context

property fda_disable_status

Fully differential amplifier disable status.

property fda_mode

Amplifier mode: "low-power" or "full-power".

property input_voltage

Input voltage in mV before the shift voltage is applied.

property monitor_powerup

Monitor power state; the shutdown pin uses active-low inputs.

property red_led_enable

Enable or disable the board’s red LED.

rx()

Receive data from hardware buffers for each channel index in rx_enabled_channels.

returns: type=numpy.array or list of numpy.array

An array or list of arrays when more than one receive channel is enabled containing samples from a channel or set of channels. Data will be complex when using a complex data device.

property rx_annotated: bool

rx_annotated: Set output data from rx() to be annotated

property rx_buffer_size

rx_buffer_size: Size of receive buffer in samples

property rx_channel_names: List[str]

rx_channel_names: List of RX channel names

rx_destroy_buffer()

rx_destroy_buffer: Clears RX buffer

property rx_enabled_channels: List[int] | List[str]

rx_enabled_channels: List of enabled channels (channel 1 is 0)

Either a list of channel numbers or channel names can be used to set rx_enabled_channels. When channel names are used, they will be translated to channel numbers.

property rx_output_type: str

rx_output_type: Set output data type from rx()

property sample_rate

Sample rate in samples per second.

property sensor_voltage

Calculated sensor voltage in mV after bias correction.

property shift_voltage

LTC2606 shift voltage in mV used to bias the sensor data.

property sw_cc

Enable SW_CC and illuminate the blue LED.

property sw_ff_status

Fault-flag status.