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.

Problems to get DMX to work
#12
Use this script to test communication between RS485-1 <> RS485-2. Only single resident script is required.
Code:
require('serial') p1 = serial.open('/dev/RS485-1', { duplex = 'half' }) p2 = serial.open('/dev/RS485-2', { duplex = 'half' }) function test(p1, p2)   p1:flush()   p2:flush()   for i = 1, 100 do     p1:write('1234567890')     res = p2:read(10, 1)     if not res or res ~= '1234567890' then       haserror = true       break     end   end end haserror = false test(p2, p1) test(p1, p2) if haserror then   alert('RS485 ERROR') else   alert('RS485 OK') end
Reply


Messages In This Thread
Problems to get DMX to work - by ole - 04.05.2019, 19:18
RE: Problems to get DMX to work - by AEK - 06.05.2019, 08:20
RE: Problems to get DMX to work - by admin - 06.05.2019, 09:23
RE: Problems to get DMX to work - by ole - 06.05.2019, 10:36
RE: Problems to get DMX to work - by AEK - 06.05.2019, 11:56
RE: Problems to get DMX to work - by admin - 06.05.2019, 13:32
RE: Problems to get DMX to work - by ole - 07.05.2019, 06:27
RE: Problems to get DMX to work - by admin - 07.05.2019, 06:46
RE: Problems to get DMX to work - by ole - 07.05.2019, 06:55
RE: Problems to get DMX to work - by admin - 07.05.2019, 07:02
RE: Problems to get DMX to work - by ole - 07.05.2019, 10:28
RE: Problems to get DMX to work - by admin - 07.05.2019, 11:10
RE: Problems to get DMX to work - by ole - 07.05.2019, 11:39
RE: Problems to get DMX to work - by admin - 07.05.2019, 11:49
RE: Problems to get DMX to work - by ole - 08.05.2019, 08:25
RE: Problems to get DMX to work - by admin - 08.05.2019, 08:40
RE: Problems to get DMX to work - by ole - 08.05.2019, 10:18
RE: Problems to get DMX to work - by admin - 09.05.2019, 06:17
RE: Problems to get DMX to work - by ole - 16.05.2019, 08:46
RE: Problems to get DMX to work - by Dario - 09.02.2020, 15:50
RE: Problems to get DMX to work - by Dario - 11.02.2020, 00:02
RE: Problems to get DMX to work - by Rajesh - 18.03.2020, 07:16
RE: Problems to get DMX to work - by admin - 18.03.2020, 09:35
RE: Problems to get DMX to work - by Rajesh - 06.05.2020, 14:43
RE: Problems to get DMX to work - by admin - 10.05.2020, 07:14

Forum Jump: