Logic Machine Forum
LM5 3rd RS485 port does not work for Modbus - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Hardware (https://forum.logicmachine.net/forumdisplay.php?fid=12)
+--- Thread: LM5 3rd RS485 port does not work for Modbus (/showthread.php?tid=2526)



LM5 3rd RS485 port does not work for Modbus - Andrey Esaulov - 19.03.2020

Hello!

When setting up LM5Cp-DR with 3 serial ports we cannot get data from the 3rd port via Modbus.
When connecting to port 3, data from Slave are transmitted at first, but after a few minutes the exchange stops, error messages are received.
When switching the same line from several Slaves to another port, the exchange is stable.

This problem is detected on several LM devices.

LM firmware was updated to 20200129, but it didn't help.

Your port testing script launched between Port2 and Port3 say "OK".

   


RE: LM5 3rd RS485 port does not work for Modbus - Daniel - 19.03.2020

Please check if something else is not using this port already, This could be DALI or some script.


RE: LM5 3rd RS485 port does not work for Modbus - Andrey Esaulov - 19.03.2020

Daniel,

Internal DALI lines have no ports in settings.
In this project I use only external CANx DALI but not on this LM.

And also no scripts are using this port.

(19.03.2020, 09:13)Daniel. Wrote: Please check if something else is not using this port already, This could be DALI or some script.



RE: LM5 3rd RS485 port does not work for Modbus - Daniel - 19.03.2020

HW is OK as you tested it so it must be somewhere in software, can you send me your project to PM?


RE: LM5 3rd RS485 port does not work for Modbus - Andrey Esaulov - 19.03.2020

Done.

(19.03.2020, 09:40)Daniel. Wrote: HW is OK as you tested it so it must be somewhere in software, can you send me your project to PM?



RE: LM5 3rd RS485 port does not work for Modbus - admin - 19.03.2020

Try disabling modbus mapper and reading data via a script with debug enabled, then post what you get.
See this post for more info: https://forum.logicmachine.net/showthread.php?tid=1979&pid=16012#pid16012
You will need to change port name and optionally serial port settings, slave id and which registers to read.

Also run this script and post the result to make sure that only one process is using the port:
Code:
data = io.readproc('lsof | grep /dev/ttymxc2')
log(data)



RE: LM5 3rd RS485 port does not work for Modbus - Andrey Esaulov - 19.03.2020

LOG:
string: 1080 /usr/bin/luajit /dev/ttymxc2

(19.03.2020, 11:50)admin Wrote: Try disabling modbus mapper and reading data via a script with debug enabled, then post what you get.
See this post for more info: https://forum.logicmachine.net/showthread.php?tid=1979&pid=16012#pid16012
You will need to change port name and optionally serial port settings, slave id and which registers to read.

Also run this script and post the result to make sure that only one process is using the port:
Code:
data = io.readproc('lsof | grep /dev/ttymxc2')
log(data)



RE: LM5 3rd RS485 port does not work for Modbus - admin - 19.03.2020

Ok, what about reading from a script? Do you have GND connected between LM and slave devices? Have you tried using different port?


RE: LM5 3rd RS485 port does not work for Modbus - Andrey Esaulov - 19.03.2020

(19.03.2020, 12:30)admin Wrote: Ok, what about reading from a script? Do you have GND connected between LM and slave devices? Have you tried using different port?


YES, on other port it works fine without any phisical changes.

I tried reading the script on port 3. It works without problems in time.
   

Then I tried to read through the button on the Modbus tab. At first the reading was going on, then after a couple of minutes it stopped - CRC Error.
   
   


RE: LM5 3rd RS485 port does not work for Modbus - admin - 19.03.2020

Can you provide remote access to LM (ports 22 and 80)?


RE: LM5 3rd RS485 port does not work for Modbus - admin - 20.03.2020

Thanks for the access. Please remove genohm-scada-enocean package from System config > System > Packages then reboot. See if it helps.


RE: LM5 3rd RS485 port does not work for Modbus - Andrey Esaulov - 23.03.2020

(20.03.2020, 09:00)admin Wrote: Thanks for the access. Please remove genohm-scada-enocean package from System config > System > Packages then reboot. See if it helps.

THANKS, its work!