Эта страница является
переводом страницы
Arlight. Перевод выполнен на 100%.
iRidium for Arlight
setting iRidium pro work with Arlight equipment via Modbus TCP protocol
The documentation was updated on 11.1.2022
Оборудование Arlight работает c iRidium studio по протоколу Modbus. Подробная настройка Modbus в iRidium находится здесь
Тестирование оборудования проводилось с помощью:
- Контроллер DALI-LOGIC-X4
- Диммер DALI -104-RGBW-DT8-SUF
- Блок питания DALI ARV-SR-2400PEA
Setting controller
Setting in Arlight DALI Server Configuration Tool
To work with Intelligent Arlight controller via Modbus TCP protocol activate a capability to work via this protocol in Arlight DALI Server Configuration Tool.
1 Power a controller and connect it to the net
2 Launch Arlight DALI Server Configuration Tool and go to the Select Devices tab
3 Open DALI Gateway tab and select the connected controller
4 Click Gateway/Server tab and select Properties in the drop down list.
5 Check that the latest version of the firmware is installed on the controller, if it is no so, go to the Advance section and click Update Firmware.
6 Go to Server Parameters section and click Download
7 Put a tick in the Allow Modbus TCP Client checkbox, if it is not installed and click Upload.
Asigning addressed to devices
Now that the controller is set, set device addresses.
1 Click Gateway/Server tab, and select DALI Tool in the list and go to Addressing Tool
2 You get to Auto-Addressing section. Open Gear - Auto-Addressing list in the right window, then open the controller list and select channels to which devices are connected.
3 To set addresses manually go to Manual Gear Addressing section.
4 Now it is necessary to update the statuses of advices connected to the controller. Go to Control Gears/Slaves Tool in the DALI Tool section.
5 In the window that appears click Quick Tool and then click Reload Gear Status Only in the list that appears.
The list of devices is updated and all addresses, assigned to devices, are displayed.
Working in iRidium studio
Create a new project add Modbus TCP driver to it and set it.
1 Device ID corresponds to the number of a controller channel to which it is connected:
| DALI |
Modbus TCP
|
| Channel-A |
1
|
| Channel-B |
2
|
| Channel-C |
3
|
| Channel-D |
4
|
2 Настройка Commands и Feedbacks
Для управления ПЛК потребуется знать карту регистров (в нашем примере использован ПЛК DALI-LOGIC-X4), инструкцию с номерами регистров можно скачать здесь. Вместе с таблицей регистров воспользуйтесь калькулятором, он генерирует адрес, который заполняется в Commands и Feedbacks iRidium.
2.1 Настройка Commands
Создайте необходимое количество Commands в драйвере Modbus. Перейдите в свойства команды и задайте параметры:
- Name - имя управляемого канала.
- Device ID - канал контроллера.
- Type - указываем Holding Register.
- Address - воспользуйтесь калькулятором и заполните полученное значение для iRidium из строки "регистр для исполнительных устройств(если подключено одно устройство на канале), или "регистр для групп исполнительных устройств"(если на одном канале несколько устройств).
- Word Size
- Word(16bit) unsigned - управление RBG (максимальное значение передаваемое в канал 65535).
- Word(16bit) unsigned - для канала тепла света.
- Content Type :
- Low Endian - управление RBG;
- Big Endian - для канала тепла света.
* В калькуляторе (таблице №1) проставьте значения команды для выполнения (список команд представлен слева) и адрес устройства (от 0 до 63). В таблице №2 в строке "регистр для исполнительных устройств" сегенируется адрес для iRidium, который вставляем в Address для Commands. Если надо отправить команду для группы устройств, то адрес из строчки "регистр для групп исполнительных устройств".
2.2 Настройка Feedbacks
- Name - имя управляемого канала.
- Device ID - канал контроллера.
- Type - указываем Holding Register.
- Address - заполняется так же, как в соответствующей команде.
- Word Size:
- Word(16bit) unsigned - для фидбека RGB;
- Word(16bit) unsigned - для фидбека тепла света.
- Content Type:
- Low Endian - для фидбека RGB;
- Big Endian - для фидбека тепла света.
Для получения корректного значения фидбека в канале белого цвета необходимо полученное значение делить на 256. Для удобства используйте скрипт:
IR.AddListener(IR.EVENT_START, 0, function () {
IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("Modbus TCP"), function(name, value)
{
if (name == "MCh Dimmer"){
IR.Log(value)
IR.GetPage("Page 1").GetItem("Item 2").Value = parseInt(value/256)
}
});
});
Addresses:
- to dim light use the following addresses 256...319;
- to control color of RGB tape:
- for the Red+Green channel, use the following addresses 768...831
- for the Blue channel use the following addresses 1024...1087
The following values must be sent to Red+Green and Blue channels:
- For Red+Green channesl -
Red value * 256 + Green value
- For Blue channel -
Blue value * 256
Setting RGB palette
Подробное описание создания палитры находится здесь.
1 Create a palette and other required graphic items. Any colored image can be used as a palette.
2 Add a script to the project:
IR.AddListener(IR.EVENT_START,0,function()
{
IR.AddListener(IR.EVENT_ITEM_RELEASE, IR.GetPage("Page 1").GetItem("Color picker"), function() {
var in_color = IR.GetPage("Page 1").GetItem("Color picker").PickColor;
var red = (in_color >> 24) & 0xff;
var green = (in_color >> 16) & 0xff;
var blue = (in_color >> 8) & 0xff;
var RG = red * 256 + green;
var B = blue * 256;
var device = IR.GetDevice("Modbus TCP"); // your driver name
device.Set("Red+Green", RG); // your Red+Green channel name
device.Set("Blue", B); //your Blue channel name
});
});
Tips&Triks
Tips&Triks
Если у вас имеются задержки в связи с оборудованием, проверьте не используете ли вы лишние регистры в драйвере Modbus. Несуществующие регистры могут значительно снизить быстродействие работы iRidium с ПЛК по протоколу Modbus.
При управлении устройством потребуется знать карту регистров контроллера(в нашем примере использован DALI-LOGIC-X4), инструкцию с номерами регистров запросите у производителя.
Указывайте максимальное значение для элементов типа "уровень" и подобных - 254. В оборудовании Arlight отсутсвует проверка за выход пределов, значение выше предела приведет к сбою в работе.