we are trying to fetch data from MECO Multifunction meter using hex values by connecting RS485 - TTL converter to D+, D- pins of multifunction meter and ground connected to arduino board.
Rx and Tx pins of RS485 - TTL converter are connected to 10 and 11 pins of arduino.
we are not able to read any data into arduino from multifunction meter.
Below are the links for multifunction meter(MFM-96S) and RS485-TTL converter
If anyone could suggest something, it would be of great helpful.
Feel free to ask for more information, if required.
Below is the code -
we just tried to execute the software serial example -
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
mySerial.println("Hello, world?");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}
[code/]
We want to read real time parameters from power meter.
That's clear, but why do you want to use an Arduino if you want to read the values with the PC? What do you want to do with the read data? Has the Arduino to react if certain values are read?
Using the posted code that Arduino does nothing than being a failure risk.
Did you made changes I suggested? If yes, please re-post the changed complete sketch.
We want to read data from power monitor, display on serial and send received data as sms using gsm modem.
That means that a ModBus master software has to run on the Arduino. You should also post the ModBus ID you configured on the power meter.
How do you plan to connect the GSM modem? You're running out of serial interfaces and having two of them emulated by SoftwareSerial definitely makes the system unreliable.
Excuse me for butting in late to the party. You initially stated you need to use hex values with the meter, but you are sending ASCII text to the meter in your program. What am I missing?
For now we want to read date and display on serial monitor. How to fetch data ? Either by using register addresses for each parameter provided in the manual by meco or we can read using serial.available().
The program does not execute Serial.available() function.
Register addresses are like this -
R phase voltage - DEC: 3029, HEX: 0BD5, Data type: 32-bit Float
Y phase voltage - DEC: 3031, HEX: 0BD7, Data type: 32-bit Float
B phase voltage - DEC: 3033, HEX: 0BD9, Data type: 32-bit Float
Please help me. I am struggling. Send me a sketch if possible.
As I already stated the power meter talks the protocol named ModBus RTU. This is not just sending some register addresses and getting their value, it has a defined timing, uses a CRC to check the data integrity and defines a set of functions to read and write registers. As the power meter is a ModBus slave your Arduino must be the master to get the values from the meter. There are several libraries out there that implement the ModBus RTU master protocol.
Hi Parma, I am also trying to fetch data from my electric meter (it has RS485 modbus RTU option) but not successful yet. Could you give me some hint on how did you retrieve data from your meter?