This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus timeout and Write Problem
#1
Hi ,
We have modbus device that we can read and write each indivual register via modbus poll. Also we can read all these register if we create a profile file includes only 1 register. But if we make a profile includes 5 register instead of 1 register , we have timeout problem and modbus communication turns red. 

We tried 2 different profile files.

Profile 1 and test results :
With this profile file , at the beginning we read 2552, 2554 , 2566 . After 3 seconds, timeout error, modbus turns red and no read anymore.

  "manufacturer": "Gree Klima",
  "description": "Gree Klima Modbus",
  "mapping": [
{"address": 2552, "name": "Klima On-Off-99", "datatype": "uint16", "bus_datatype": "uint8", "type": "register",  "writable": true},
{"address": 2553, "name": "Operation Mode-99", "datatype": "uint16", "bus_datatype": "uint8", "type": "register",  "writable": true},
{"address": 2554, "name": "Setpoint-99", "datatype": "uint16", "bus_datatype": "uint16", "type": "register",  "writable": true, "value_multiplier": 0.1},
{"address": 2555, "name": "Fan Speed-99", "datatype": "uint16", "bus_datatype": "uint8", "type": "register",  "writable": true},
{"address": 2566, "name": "IAT-99", "datatype": "uint16", "bus_datatype": "uint16", "type": "register", "value_multiplier": 0.1}
  ]


Profile 2 and test results :
With this profile file , at the beginning we can read all registers . After 3 seconds, timeout error, modbus turns red and no read anymore.

  "manufacturer": "Gree Klima",
  "description": "Gree Klima Modbus",
  "mapping": [
{ "address": 2552, "read_count":4, "read_offset":0, "read_delay":0.1, "name": "Klima On-Off-99", "datatype": "uint16", "bus_datatype": "uint8", "type": "register", "writable": true },
{ "address": 2552, "read_count":4, "read_offset":1, "read_delay":0.1, "name": "Operation Mode-99", "datatype": "uint16", "bus_datatype": "uint8", "type": "register", "writable": true },
{ "address": 2552, "read_count":4, "read_offset":2, "read_delay":0.1, "name": "Setpoint-99", "datatype": "uint16", "bus_datatype": "uint16", "type": "register", "writable": true },
{ "address": 2552, "read_count":4, "read_offset":3, "read_delay":0.1, "name": "Fan Speed-99", "datatype": "uint16", "bus_datatype": "uint8", "type": "register", "writable": true },
{ "address": 2566, "name": "IAT-99", "datatype": "uint16", "bus_datatype": "uint16", "type": "register", "value_multiplier": 0.1}
  ]


Problem 2 : 

We cannot write any of this register. If we put only 1 register ( For example set point ) in to profile, there is no timeout problem and there is no read problem. But we cannot write the value to modbus.

Need advices.

Regards
Reply
#2
read_delay is a global profile setting like manufacturer and description: https://forum.logicmachine.net/showthrea...3#pid13343
Reply
#3
Admin, I have a similar issue where my modbusprofile file cannot read any data, even if I add 'read'_ Delay '', but still without any help, What other methods can I try to solve the problem of data not being read?
Here is my profile:
---------------------
{
"manufacturer": "Embedded Systems_FAN",
"timeout": 3,
"read_delay": 1,
"description": "CSJC",
"mapping": [
{ "name": "Zeroing","bus_datatype": "uint16","type": "register", "writable": 1, "write_only": true,"address": 0x04 },
{ "name": "Voltage","bus_datatype": "float16","type": "register", "address": 0x07, "value_multiplier": 0.01,"units": "V"},
{ "name": "Voltage","bus_datatype": "float16","type": "register", "address": 0x08, "value_multiplier": 0.01,"units": "V"},
{ "name": "Current","bus_datatype": "float16","type": "register", "address": 0x09, "value_multiplier": 0.01,"units": "A" },
{ "name": "Current","bus_datatype": "float16","type": "register", "address": 0x0A, "value_multiplier": 0.01,"units": "A" },
{ "name": "Current","bus_datatype": "float16","type": "register", "address": 0x0B, "value_multiplier": 0.01,"units": "A" },
{ "name": "Current","bus_datatype": "float16","type": "register", "address": 0x0C, "value_multiplier": 0.01,"units": "A" },
{ "name": "Current","bus_datatype": "float16","type": "register", "address": 0x0D, "value_multiplier": 0.01,"units": "A" },
{ "name": "Current","bus_datatype": "float16","type": "register", "address": 0x0E, "value_multiplier": 0.01,"units": "A" },
{ "name": "Apparent power","bus_datatype": "float16","type": "register", "address": 0x19, "value_multiplier": 0.001,"units": "KVA"},
{ "name": "Apparent power","bus_datatype": "float16","type": "register", "address": 0x1A, "value_multiplier": 0.001,"units": "KVA"},
{ "name": "Apparent power","bus_datatype": "float16","type": "register", "address": 0x1B, "value_multiplier": 0.001,"units": "KVA" },
{ "name": "Apparent power","bus_datatype": "float16","type": "register", "address": 0x1C, "value_multiplier": 0.001,"units": "KVA" },
{ "name": "Apparent power","bus_datatype": "float16","type": "register", "address": 0x1D, "value_multiplier": 0.001,"units": "KVA" },
{ "name": "Power factor","bus_datatype": "float16","type": "register", "address": 0x1E, "value_multiplier": 0.001 },
{ "name": "Power factor","bus_datatype": "float16","type": "register", "address": 0x1F, "value_multiplier": 0.001 },
{ "name": "Power factor","bus_datatype": "float16","type": "register", "address": 0x20, "value_multiplier": 0.001 },
{ "name": "Power factor","bus_datatype": "float16","type": "register", "address": 0x21, "value_multiplier": 0.001 },
{ "name": "Power factor", "bus_datatype": "float16","type": "register", "address": 0x22, "value_multiplier": 0.001 },
{ "name": "Frequency","bus_datatype": "float16", "type": "register","address": 0x23, "value_multiplier": 0.01,"units": "HZ" },
{"name": "Electric energy","bus_datatype": "float32","type": "register","address": 0x38,"read_swap":"w","datatype": "uint32", "value_multiplier": 0.01,"units": "KWh"},
{"name": "Electric energy","bus_datatype": "float32","type": "register","address": 0x3A,"read_swap":"w","datatype": "uint32", "value_multiplier": 0.01,"units": "KWh"},
{"name": "Electric energy","bus_datatype": "float32","type": "register","address": 0x3C,"read_swap":"w","datatype": "uint32", "value_multiplier": 0.01,"units": "KWh"},
{"name": "Electric energy","bus_datatype": "float32","type": "register","address": 0x3E,"read_swap":"w","datatype": "uint32", "value_multiplier": 0.01,"units": "KWh"},
{"name": "Electric energy","bus_datatype": "float32","type": "register","address": 0x40,"read_swap":"w","datatype": "uint32", "value_multiplier": 0.01,"units": "KWh"}
]
}
Reply
#4
Does the Read test work for you?
------------------------------
Ctrl+F5
Reply
#5
Read test is working normally
Reply
#6
What error do you get in modbus logs when it doesn't work. Make sure GND is also connected.
------------------------------
Ctrl+F5
Reply
#7
The device is 485 communication, not 232.
Reply
#8
GND is highly recommended for RS485 as well. Usually connecting GND solves communication problems.
Reply
#9
The slave device does not have GND, is it connecting LM's B with GND?
Reply
#10
Can you provide documentation for your device? Sometimes the GND connection is called 0V. If your device is powered via DC you can connect GND to power supply input negative pole.
Reply
#11
The device documentation is all in Chinese, and the device is powered by 220V AC voltage. Its 485 interface only has A and B.
Reply
#12
Check that LM power supply and Modbus device are connected to the same AC L / N lines. Check that L / N are not swapped on either LM power supply or Modbus device. Another thing to try is 120 Ohm termination resistor on the Modbus device side.
Reply


Forum Jump: