Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
channels in DMX.init is the total number of DMX channel addresses that are used (starting from 0 up to 511). This value depends on how many DMX devices are connected to the bus. It's ok to have duplicate addresses if you want to control several DMX devices together.
DMX.set(channel, value) - first argument is channel address (0..511), second is value (0..255).
Posts: 92
Threads: 18
Joined: Apr 2022
Reputation:
0
23.03.2023, 01:53
(This post was last modified: 23.03.2023, 05:27 by rw_echo.)
1.Dmx control I'm a novice, the command of DMX.set(id, value) not only corresponding to the channel in the RGB light strips, but also related to the address? For example, R, G, and B in the light strip address 1 correspond to channel 1, channel 2, and channel 3; R, G, and B in the light strip address 2 correspond to channels 4, 5, and 6. Is my understanding correct?
2.The IC type of the lamp strip is "UCS512C4". The lamp manufacturer provides a lamp strip and a step-down power adapter. The lamp manufacturer said that the decoder has been integrated into the lamp strip, except for the power cord, only the A and B lines are available. My script refers to the script here:https://openrb.com/example-dmx-lighting-control-with-lm2/ .The lamp strip does not work when I connect it to the gateway RS485 interface.
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
1. For RGB devices the address is Red channel, address + 1 is Blue channel and address + 2 is Green channel. You need to take this into account and address each RGB device with a gap between addresses so channels don't overlap.
2. GND should be connected to the power supply GND (or negative pole). You also need to specify a correct serial port in the script. The example has "/dev/RS485", while LM5 has two ports: "/dev/RS485-1" and "/dev/RS485-2".
Posts: 92
Threads: 18
Joined: Apr 2022
Reputation:
0
Thank you for your reply
I checked the LM script and found no problems. I can control another RGB lamp strip that can be addressed through the DIP switch. Therefore, I guess the reason why the RGB lamp strip under test cannot be controlled is that it has not been addressed
It would be perfect if LM could search for the max device address connected to the 485 bus.
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
You need to use an external tool for addressing then. Most DMX devices don't support bidirectional communication so the number of channels has to be specified manually.
Posts: 92
Threads: 18
Joined: Apr 2022
Reputation:
0
There are many dmx controllers on the market that can search for dmx device addresses, which can easily map the control channels of dmx devices, making the operation very simple. Does LM have any plans to implement the function of searching or setting the address of a dmx device?
Posts: 7764
Threads: 42
Joined: Jun 2015
Reputation:
447
No plans to change anything related to DMX. It is fine for smaller projects as it is. Larger projects should either use an Ethernet gateway for DMX control via Artnet or a different protocol like DALI.
Posts: 92
Threads: 18
Joined: Apr 2022
Reputation:
0
Admin, I apologize for needing your help again. I want to achieve a circular flow control effect for dmx devices (RGB lamp strips) from ch1 to ch512. Each dmx device occupies 4 channels (R/G/B/W). The script needs to implement the following functions:
When the value of the switch address "1/1/1" is true, the circular control function of the light strip is activated, such as turning off the first light strip immediately after it turns red, and turning off the second light strip again after it turns red... The cycle starts from the first lamp strip until the last lamp strip turns red. When the value of the switch address "1/1/1" is false, the cycle function is stopped.
How to implement it with scripts?