Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
04.05.2019, 19:18
(This post was last modified: 04.05.2019, 19:25 by ole.)
Posts: 155
Threads: 12
Joined: Sep 2015
Reputation:
13
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
Have you tried swapping A/B? Do you have RS485 GND connected?
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
06.05.2019, 10:36
(This post was last modified: 06.05.2019, 10:56 by ole.)
(06.05.2019, 09:23)admin Wrote: Have you tried swapping A/B? Do you have RS485 GND connected?
Yes, I have tried to to change the ports (A/B), but have not connected the GND. Should it be connected?
Tried to use the RS-485 echo test resident script found in the manual for the LM5p-dr.
I tried it from RS485-1 to 3, 1-2, 3-2 and 2-3 with no message in either the log or the error log - is there something special one need to do with the script, I just copied it directly from the manual into a resident script, only changing the name of the port?
Thanks in advance
No, it doesn't say anything in either the error log or the log and it is connected to the middle rs485 port which should be port rs485-1
But here it says RS485-2 and RS232, according to the datasheet it is not the same.
Here is says rs485-2 has the rs232, while on the system status one can think it's the port 3. Where is it possible to check if I got the correct firmware on the LM?
Posts: 155
Threads: 12
Joined: Sep 2015
Reputation:
13
(06.05.2019, 10:36)ole Wrote: (06.05.2019, 09:23)admin Wrote: Have you tried swapping A/B? Do you have RS485 GND connected?
Yes, I have tried to to change the ports (A/B), but have not connected the GND. Should it be connected?
Tried to use the RS-485 echo test resident script found in the manual for the LM5p-dr.
I tried it from RS485-1 to 3, 1-2, 3-2 and 2-3 with no message in either the log or the error log - is there something special one need to do with the script, I just copied it directly from the manual into a resident script, only changing the name of the port?
Thanks in advance
No, it doesn't say anything in either the error log or the log and it is connected to the middle rs485 port which should be port rs485-1
But here it says RS485-2 and RS232, according to the datasheet it is not the same.
Here is says rs485-2 has the rs232, while on the system status one can think it's the port 3. Where is it possible to check if I got the correct firmware on the LM?
if you hav 3*rs485 ports, then probably you installed incorrect Firmware, that could be reason of problems.
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
All current devices share the same base board with one RS485 and one combined RS485/RS242 port. If loop test script does not work then port might be damaged physically. Do you have any plugins like ekey installed? These might use one of RS485 ports by default.
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
(06.05.2019, 13:32)admin Wrote: All current devices share the same base board with one RS485 and one combined RS485/RS242 port. If loop test script does not work then port might be damaged physically. Do you have any plugins like ekey installed? These might use one of RS485 ports by default.
Not that I'm aware of, I have done a factory reset and uploaded a new firmware before starting testing.
But why does not the port RS485-3 show in the system listing?
Tried to run the DMX trough port 3, but get an error in the error log
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
Which firmware have you installed?
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
07.05.2019, 06:55
(This post was last modified: 07.05.2019, 06:57 by ole.)
(07.05.2019, 06:46)admin Wrote: Which firmware have you installed?
I installed LogicMachine5 Power / LogicMachine5 Reactor IO Power (lm5m3ex-20170620.img), from the " NEW Logic Machine firmware version 2017.06 x3 CPU POWER version (i.MX6)" listing.
I got the LM5p-DR unite. Is this correct and is there any way to see what firmware which is installed on the unite?
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
(07.05.2019, 07:02)admin Wrote: Try this one: https://dl.openrb.com/lm-18-imx6/lm5m3ex-20180828.img
With that firmware I get up all rs485 ports and when I use it to run the dmx script I no longer get any error message in the log, but I still do not get the dmx light to work. I find it strange that all three rs485 ports have been damaged, so I guess I must be doing a mistake somewhere.
When one test the connection with the echo script, one need two resident script, one for port one and one for the other port right ?
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
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
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
07.05.2019, 11:39
(This post was last modified: 07.05.2019, 11:40 by ole.)
(07.05.2019, 11:10)admin Wrote: Use this script to test communication between RS485-1 <> RS485-2. Only single resident script is required.
Thanks, with your script I get all rs485 ports to work, so then it must be me who is making a mistake when I'm configuring the dmx scripts or objects.
With the mark dmx objects script do one need to make any changes to the script? And the dmx address is the last group addres, so I got 10/0/0 as the first taged with dmx, that means it have address 1 on the dmx or am I wrong ?
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
DMX channels are numbered from 1, so the first group address should be 10/0/1. You can also try running Random scene example so you don't need to change channels manually.
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
08.05.2019, 08:25
(This post was last modified: 08.05.2019, 08:30 by ole.)
(07.05.2019, 11:49)admin Wrote: DMX channels are numbered from 1, so the first group address should be 10/0/1. You can also try running Random scene example so you don't need to change channels manually.
Got the DMX to work by running the event dmx script inside the the editor.
There is an option one can choose "execute on group read" should this one be selected on the event script?
Another thing I noticed, was that the response time on the dmx was a bit slow, it took around one second from turning on a dmx channel inside the lm5, til the light turned on, is it possible to speed up this? I have changed the transition time to "0" in the dmx handler script, guess this one is for how fast it is turning on and off ?
Edit:
Found an variable in the dmx libary, "resolution = 20" if one change this variable, will one decrease this time?
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
It should work much faster than 1 second. Resolution controls how many DMX frames are sent per second. If value is too high you will get high CPU load, if it is too low then you might get delays.
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
(08.05.2019, 08:40)admin Wrote: It should work much faster than 1 second. Resolution controls how many DMX frames are sent per second. If value is too high you will get high CPU load, if it is too low then you might get delays.
Seems like I was a bit fast there, after getting back from lunch the dmx had stopped working..
Have tried to reset the LM and I have checked that all the script are still there and I also did check the echo script I got to see if it was a problem with the RS485 port.
Is it hard to write a script that say one choose to use port 1 on the dmx and send the signal into port 2 and use a script to log the data sendt from the LM ?
I suspect the problem is with the LM, because the DMX works with the artnett module.
Posts: 7773
Threads: 42
Joined: Jun 2015
Reputation:
447
I suspect that there's a physical problem somewhere. Try a different wire and also try connecting GND signal.
Posts: 13
Threads: 3
Joined: Dec 2015
Reputation:
0
(09.05.2019, 06:17)admin Wrote: I suspect that there's a physical problem somewhere. Try a different wire and also try connecting GND signal.
After a bit of testing I managed to get it to work. Tried with different cables and even checked the end of line resistor, but the thing that made it work was to change the nummber of DMX addresses in the script from 12 to 13, which I find odd since I only had connected a 12 channels dmx driver/controller. Does anyone have a good explanation on this ?
In regards to how fast it changes the led light when changing it from the LM there is still a noticeable delay, but it varies from time to time how long it takes, which is strange since the dmx script is the only thing running on the LM.
Posts: 25
Threads: 7
Joined: May 2019
Reputation:
0
I have same problem?
What is right connection between DMX jack (1-2-3) and rs485-1 on LM?
I try:
1-GND ; 2-A ; 3-B
1-GND ; 3-A ; 2-B
|