DIA Config AIO Adapter
From Digi Developer
Configuring the Digi AIO Adapter in DIA
TODO - this page needs to be cleaned up.
The general XBee Adapter manual 90000981.PDF lists the Analog Mode settings as 0 or 1, which are the actual hardware pin level, not the values to set via AT command. The AT settings to enable a digital output are either 4 (to output 0) or 5 (to output 1). Thus a more useful form of that table would be:
|Terminal 1 Mode||Terminal 2 Mode||D8||D4||D6||Terminal 3 Mode||Terminal 4 Mode||P0||D7||P2|
|Current Loop||Current Loop||4 (low)||4 (low)||4 (low)||Current Loop||Current Loop||4 (low)||4 (low)||4 (low)|
|Current Loop||Ten V||4 (low)||4 (low)||5 (high)||Current Loop||Ten V||4 (low)||4 (low)||5 (high)|
|Ten V||Current Loop||4 (low)||5 (high)||4 (low)||Ten V||Current Loop||4 (low)||5 (high)||4 (low)|
|Ten V||Ten V||4 (low)||5 (high)||5 (high)||Ten V||Ten V||4 (low)||5 (high)||5 (high)|
|Differential||Differential||5 (high)||4 (low)||4 (low)||Differential||Differential||5 (high)||4 (low)||4 (low)|
Here is an YML example from the DIA demo application called the "Tank Demo".
- name: aio_left driver: devices.xbee.xbee_devices.xbee_aio:XBeeAIO settings: xbee_device_manager: xbee_device_manager extended_address: "00:13:a2:00:40:0a:49:7a!" sample_rate_ms: 1000 power: "On" channel1_mode: "TenV" channel2_mode: "TenV" channel3_mode: "TenV" channel4_mode: "TenV"
DocString from Python Code
Below is the docstring copied from the driver file in ./src/devices/xbee/xbee_devices/xbee_aio.py. It is here since many users are not comfortable trying to browse or read Python files.
"""\ An Example DIA Driver for the XBee Analog IO Adapter Settings: xbee_device_manager: must be set to the name of an XBeeDeviceManager instance. extended_address: the extended address of the XBee Sensor device you would like to monitor. sleep: True/False setting which determines if we should put the device to sleep between samples. sample_rate_ms: the sample rate of the XBee adapter. power: True/False setting to enable/disable the power output on terminal 6 of the adapter. channel1_mode: Operating input mode for pin 1 of the adapter. Must be a string value comprised of one of the following: "TenV" - 0-10v input available on any channel. "CurrentLoop" - 0-20 mA current loop available on any channel. "Differential" - +/- 2.4a differential current mode enabled on channel1 & channel2 or channel3 & channel4. channel2_mode: Operating input mode for pin 2 of the adapter. See channel1_mode for valid setting information. channel3_mode: Operating input mode for pin 3 of the adapter. See channel1_mode for valid setting information. channel4_mode: Operating input mode for pin 4 of the adapter. See channel1_mode for valid setting information. awake_time_ms: How many milliseconds should the device remain awake after waking from sleep. sample_predelay: How long, in milliseconds, to wait after waking up from sleep before taking a sample from the inputs. """