FB_DMXSendRDMCommand

This function block is for the general sending of a RDM command, defined by command number and, if necessary, transfer parameter.
Inputs
VAR_INPUT
bStart : BOOL;
wDestinationManufacturerId : WORD;
dwDestinationDeviceId : DWORD;
byPortId : BYTE;
wSubDevice : WORD;
eCommandClass : E_DMXCommandClass;
eParameterId : E_DMXParameterId;
byParameterDataLength : BYTE;
arrParameterData : ARRAY [0..255] OF BYTE;
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. |
dwDestinationDeviceId |
DWORD |
Unique device Id of the DMX device. |
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. |
wSubDevice |
WORD |
Sub-devices should be used in devices with a recurring number of modules, such as a dimmer rack. The sub-devices input enables parameter messages to be sent to a particular module within the device, in order to read or set module properties. |
eCommandClass |
Command Class (CC) indicates the message action (see E_DMXCommandClass). | |
eParameterId |
Parameter Id is a 16-bit number, which identifies a particular type of parameter data (see E_DMXParameterId). | |
byParameterDataLength |
BYTE |
The parameter data length (PDL) is the preceding number of slots, included in the parameter data area. If this input is 0x00, there is no parameter data to follow. |
arrParameterData |
ARRAY OF BYTE |
Parameter data of variable length. The format of the content depends on the PID. |
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;
byResponseMessageCount : BYTE;
byResponseDataLength : BYTE;
arrResponseData : ARRAY [0..255] OF BYTE;
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). |
byResponseMessageCount |
BYTE |
This output indicates that the DMX slave contains further messages. The RDM command Get: QUEUES_MESSAG is used to read these messages. |
byResponseDataLength |
BYTE |
Contains the number of bytes returned by the RDM command. |
arrResponseData |
ARRAY OF BYTE |
This output contains the data of the response from the RDM command. The length is variable, and the data format depends on the RDM command. |
Requirements
Development environment | required TC3 PLC library |
---|---|
TwinCAT from v3.1.4020.14 | Tc2_DMX from 3.5.3.0 |