The MA01-AACX2220 RS485 2DI+2AI+2DO Modbus RTU I/O Data Acquisition module by EBYTE is a versatile and robust electronic component designed for industrial automation and control systems. It allows for the remote monitoring and control of various inputs and outputs over a Modbus RTU protocol, which is a widely used communication standard in the industry. This module is particularly useful in applications where long-distance communication is required, such as in distributed control systems, building automation, and smart grid applications.
Pin Number | Description | Type |
---|---|---|
1 | DI1 | Digital Input |
2 | DI2 | Digital Input |
3 | AI1 | Analog Input |
4 | AI2 | Analog Input |
5 | DO1 | Digital Output |
6 | DO2 | Digital Output |
7 | GND | Ground |
8 | A+ | RS485 A+ |
9 | B- | RS485 B- |
10 | Vcc | Power Supply |
To interface the MA01-AACX2220 with an Arduino UNO, you can use a MAX485 module or similar to convert the Arduino's UART signals to RS485.
#include <ModbusMaster.h>
// Instantiate ModbusMaster object
ModbusMaster node;
void setup() {
// Initialize Modbus communication on Serial1
node.begin(1, Serial1); // 1 is the Modbus address
Serial1.begin(9600); // Match the baud rate set on the module
// Set the transmission control pin
node.preTransmission(preTransmission);
node.postTransmission(postTransmission);
}
void preTransmission() {
// Enable RS485 transmission mode
}
void postTransmission() {
// Disable RS485 transmission mode
}
void loop() {
// Example: Read from input register
uint8_t result = node.readInputRegisters(0x0000, 4);
if (result == node.ku8MBSuccess) {
// Process data
}
// Example: Write to output coil
node.writeSingleCoil(0x0000, HIGH);
// Add delay between transactions
delay(1000);
}
Note: The preTransmission
and postTransmission
functions should control the DE and RE pins of the RS485 transceiver to switch between transmission and reception modes.
Q: Can the module be used in a multi-drop network? A: Yes, the RS485 interface allows for multiple devices to be connected in a daisy-chain configuration.
Q: How do I change the input type from voltage to current? A: The input type can be configured using DIP switches or the configuration software provided by EBYTE.
Q: What is the maximum distance for RS485 communication? A: RS485 can communicate over distances up to 1200 meters, but this can vary based on cable quality and network configuration.
For further assistance, consult the EBYTE technical support or the detailed user manual provided with the module.