Hello;
I want to read electrical data from Kepler KP-835 Power meter through RS485 and use protocol Modbus RTU
I use TTL to RS485: https://core-electronics.com.au/ttl-uart-to-rs485-converter-module.html
Slave id is 8; none priority bit; stop bit 1
From registers list of this power meter Its Address is 30001 length 4 bytes
but it can't read data I want . How should I do
This is code i am using btw this code is work fine when i read data from Schneider power meter(read from holding register).
/////////////////////////////////////////// #include <ModbusMaster.h>
#include<SoftwareSerial.h> #define TxEnable 2
// instantiate ModbusMaster object
ModbusMaster node;
SoftwareSerial mySerial(6,7); //Pin6 is RX,Pin7 is TX
void preTransmission()
{
digitalWrite(TxEnable, 1);
}
First: the posted code isn't complete, it doesn't compile.
Check the result code you get and post the value you get!
As you failed to post a link to that device's manual the following is wild guessing: Is the register address 30001 correct? Have you tried to use address 1? As many PLCs distinguish the register type only by the register address they use ranges for the types.