FB_DMXSendRDMCommand

FB_DMXSendRDMCommand 1:

This function-block sends a single RDM-command defined by the command-number and, if applicable, by a parameter-value.

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;

bStart: The block is activated by a rising edge at this input.

wDestinationManufacturerId: Unique manufacturer Id of the DMX device.

dwDestinationDeviceId: Unique device Id of the DMX device.

byPortId: The port Id field shall be set in the range of 1-255 identifying the controller port being used, such that the combination of source UID and port Id will uniquely identify the controller and port where the message originated.

wSubDevice: Sub-devices should be used in devices containing a repetitive number of similar modules, such as a dimmer rack. The Sub-Device field allows parameter messages to be addressed to a specific module within the device to set or get properties of that module.

eCommandClass: The command class (CC) specifies the action of the message.

eParameterId: The parameter Id is a 16-bit number that identifies a specific type of parameter data.

byParameterDataLength: The parameter data length (PDL) is the number of slots included in the parameter data area that it precedes. When this field is set to 0x00 it indicates that there is no parameter data following.

arrParameterData: The parameter data is of variable length. The content format is PID dependent.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                     : BOOL;
bError                    : BOOL;
udiErrorId                : UDINT;
byResponseMessageCount    : BYTE;
byResponseDataLength      : BYTE;
arrResponseData           : ARRAY[0..255] OF BYTE;

bBusy: When the block is activated the output is set, and it remains active until execution of the command has been completed.

bError: 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: Contains the command-specific error code of the most recently executed command. Only valid if bBusy is FALSE. See Error codes.

byResponseMessageCount: The message count is used by the DMX slave to indicate that additional messages are available. Messages can be read by the RDM command Get: QUEUED_MESSAGE.

byResponseDataLength: Contains the number of bytes returned by the RDM command.

arrResponseData: This output contains the response data of the RDM command. The length is variable and the content format is RDM command dependent.

VAR_IN_OUT

stCommandBuffer           : ST_DMXCommandBuffer;

stCommandBuffer: A reference to the structure for communication (the buffer) with the FB_EL6851CommunicationEx() block.

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT 2.11 R3/x64 higher than Build 2256

PC/CX

TcDMX-library higher than V1.3.0