Logic Machine Forum
DSE7320 Modbus help - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: DSE7320 Modbus help (/showthread.php?tid=3067)



DSE7320 Modbus help - gtsamis - 18.12.2020

Hi,

I need some help regarding a DSE7320 power generator controller.

I am having trouble to understand what should i send on modbus in order to select a workig mode (for example "Select Stop mode")
The manual states:

"The register array is divided into 256 pages each containing up to 256 registers, the actual register address is obtained from the formula:
register_address=page_number*256+register_offset."


"One of the system control keys from the table below must be written into register 8 and its ones-compliment written into register 9 with a single function 16 (write multiple registers) to perform the specified system control function."

Below are the two pages with the control functions and it's address
   

   

Any help would be much appreciated.

Thank you in advance
George


RE: DSE7320 Modbus help - admin - 18.12.2020

Try this:
Code:
-- init modbus connection
...

-- system control key
key = 35700
key_inv = bit.bxor(key, 0xFFFF)

mb:writeregisters(8, key, key_inv)



RE: DSE7320 Modbus help - gtsamis - 18.12.2020

Hi,
Thank for the quick reply.

I will test it tomorow on site and lete you know.
BTW is it possible to use the same connection as the one i have on the modus profile?


RE: DSE7320 Modbus help - admin - 18.12.2020

You need to use Modbus proxy if you want to share RTU connection between scripts and mapper. See this for more info: https://forum.logicmachine.net/showthread.php?tid=387&pid=1953#pid1953


RE: DSE7320 Modbus help - gtsamis - 21.12.2020

Thanks Admin,

Worked as a charm!


RE: DSE7320 Modbus help - gtsamis - 26.12.2020

Mery Christmas,

Althought the profile and script works fine i get an "Read failed: Operation time out" on modbus error log.
I have tried with just 2 registers on profile but i still get the same error.

The slave (DSE7320) is configured at 19200mbps / 2 stop bits / Half duplex and master inactivity timeout 10s
The LM RTU settings for RS485 are as above and also on profile i have poll interval 30s and timeout 10s.

There are only two devices connected on the BUS LM and DSE7320 at ~30m distance. I also have fitted both ends with 120 ohm resistors and connected the ground on each other.

Cable is a multicore unshielded 4x0,16mm usualy used in alarm systems, could that be a problem?

DSE7320 min profile
Code:
{
"manufacturer": "Deep Sea Electronics",
"description": "DSE7320",
"mapping": [
  {"name": "Generator mode FB", "bus_datatype": "uint16", "type": "register", "address": 772, "datatype": "uint16"},
  {"name": "Generator engine battery voltage", "bus_datatype": "float16", "type": "register", "address": 1029, "datatype": "uint16", "value_multiplier": 0.1, "units":"V"}
]    
}



RE: DSE7320 Modbus help - admin - 28.12.2020

Can you trying using lower speed? Is the cable twisted pair?


RE: DSE7320 Modbus help - gtsamis - 28.12.2020

(28.12.2020, 08:07)admin Wrote: Can you trying using lower speed? Is the cable twisted pair?

The cable is straight, unfortunatelly to lower the speed i must get on site,  also i can use a pair from a utp cat5 cable if you think this would help.