FB_DMXSetDMX512StartAddress

This function block sets the DMX512 start address. This lies within the range from 1 – 512. Each sub-device and the root device occupy different DMX512 start addresses.
Applying a positive edge to the bStart input starts the function block, and the bBusy output goes TRUE. The wDestinationManufacturerId and dwDestinationDeviceId inputs address the DMX device. The byPortId input defines the channel within the addressed DMX device. If the execution of the command has been completed, the bBusy output goes back to FALSE. The outputs bError and udiErrorId can now be evaluated. Further positive edges at the bStart input will be ignored as long as the function block is active (bBusy is TRUE).
Inputs
VAR_INPUT
bStart : BOOL;
wDestinationManufacturerId : WORD;
dwDestinationDeviceId : DWORD;
byPortId : BYTE;
iDMX512Startadresse : INT;
dwOptions : DWORD := 0;
END_VAR
Name | Type | Description |
---|---|---|
bStart | BOOL | The function block is activated by a positive edge at this input. |
wDestinationManufacturerId | WORD | Unique manufacturer Id of the DMX device (for details, see DMX device address). |
dwDestinationDeviceId | DWORD | Unique device Id of the DMX device (for details, see DMX device address). |
byPortId | BYTE | Channel within the addressed DMX device. Sub-devices are addressed through the Port Id. The root device always has the Port Id 0. |
iDMX512StartAddress | INT | DMX512 start address (1 to 512). |
dwOptions | DWORD | Options (currently not used). |
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;
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). |
Requirements
Development environment | required TC3 PLC library |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_DMX from 3.5.3.0 |