FB_DMXDiscovery512

This function block searches for up to 512 DMX devices and automatically sets the start address (optional). The most important information for the devices found is displayed in a structure.
Inputs
VAR_INPUT
bStart : BOOL;
dwOptions : DWORD;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | The function block is activated by a positive edge at this input. |
dwOptions | DWORD | Options (see table). The individual constants must be linked with OR operators. |
Constant | Description |
---|---|
DMX_OPTION_COMPLETE_NEW_DISCOVERY | All DMX devices are taken into account. |
DMX_OPTION_SET_START_ADDRESS | The start address is set for all DMX devices that are found. Consecutive, starting with 1. |
DMX_OPTION_OPTICAL_FEEDBACK | When a DMX device is found, the function IDENTIFY_DEVICE is called for two seconds. |
Inputs/outputs
VAR_IN_OUT
stCommandBuffer : ST_DMXCommandBuffer;
END_VAR
Name | Type | Description |
---|---|---|
stCommandBuffer | Reference to the structure for communication (buffer) with the function block FB_EL6851Communication() |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
udiErrorId : UDINT;
uliLowerBoundSearchUID : T_ULARGE_INTEGER;
uliUpperBoundSearchUID : T_ULARGE_INTEGER;
arrDMXDeviceInfoList : ARRAY [1..512] OF ST_DMXDeviceInfo;
uiNextDMX512StartAddress : UINT;
iFoundDevices : INT;
END_VAR
Name | Type | Description |
---|---|---|
bBusy | BOOL | When the function block is activated the output is set, and it remains active until execution of the command has been completed. |
bError | BOOL | This output is switched to TRUE as soon as an error occurs during the execution of a command. The command-specific error code is contained in udiErrorId. Only valid if bBusy is FALSE. |
udiErrorId | UDINT | Contains the command-specific error code of the most recently executed command. Only valid if bBusy is FALSE (see error codes). |
uliLowerBoundSearchUID |
T_ULARGE_INTEGER |
During the search, the lower search address is sent to this output. |
uliUpperBoundSearchUID |
T_ULARGE_INTEGER |
During the search, the upper search address is sent to this output. |
arrDMXDeviceInfoList |
ARRAY OF ST_DMXDeviceInfo |
Array with the most important information of the found DMX devices. |
uiNextDMX512StartAddress |
UINT |
If the DMX_OPTION_SET_START_ADDRESS option is activated, then the start address that will be assigned to the next DMX device will be displayed at this output. |
iFoundDevices |
INT |
During the search, the current number of devices found will be available at this output. |
Requirements
Development environment | required TC3 PLC library |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_DMX from 3.5.3.0 |