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.

RS485 signal collision
#15
Dear admin,
Thank you for providing the code, it's working on the site!

However there was one problem we could not solve on the site.
Even though this script intend to wait at least for 0.5 sec between each command,
when the bath system builder checked their command reception log on the slave side,
it seems that sometimes LM sends commmand with 0 sec in between (between the actual command port:write(data) and the status read port:write(':RR\r\n')).
It does not happen every time, it happened just 3 times in a day.


I just changed the timeout to 20 from 1 but everything else is same with your last script.
Code:
data, err = port:read(17, 20) -- read 17 bytes for up to 20 second


Could you think of any reason why this happen ?

Thank you !
Reply


Messages In This Thread
RS485 signal collision - by Hadeel - 02.12.2022, 15:17
RE: RS485 signal collision - by Daniel - 02.12.2022, 15:33
RE: RS485 signal collision - by Hadeel - 02.12.2022, 15:54
RE: RS485 signal collision - by Daniel - 02.12.2022, 15:56
RE: RS485 signal collision - by Hadeel - 02.12.2022, 16:20
RE: RS485 signal collision - by Hadeel - 03.12.2022, 10:57
RE: RS485 signal collision - by admin - 05.12.2022, 07:51
RE: RS485 signal collision - by Hadeel - 05.12.2022, 18:58
RE: RS485 signal collision - by admin - 06.12.2022, 07:49
RE: RS485 signal collision - by Hadeel - 07.12.2022, 15:03
RE: RS485 signal collision - by Hadeel - 23.03.2023, 02:31
RE: RS485 signal collision - by admin - 23.03.2023, 06:00
RE: RS485 signal collision - by Hadeel - 23.03.2023, 07:48
RE: RS485 signal collision - by admin - 23.03.2023, 08:41
RE: RS485 signal collision - by Hadeel - 28.03.2023, 08:35
RE: RS485 signal collision - by admin - 30.03.2023, 05:42
RE: RS485 signal collision - by Hadeel - 30.03.2023, 07:59

Forum Jump: