information for the devices

4.1.1 High Level

4.1.1.1 FB_DMXDiscovery

This function block searches for up to 50 DMX devices and automatically sets the start address (optional).

The most important information for the devices found is displayed in a structure.

4.1.1.2 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.

4.1.2 Low Level

4.1.2.1 Base

4.1.2.1.1 FB_DMXSendRDMCommand

This function block is for the general sending of a RDM command, defined by command number and, if necessary, transfer parameter.

4.1.2.1.2 FB_EL6851Communication

The EL6851 should always be accessed via this block. This applies both to the transmission of the cyclic DMX data and to the transmission of the RDM commands.

If data is to be transmitted cyclically to the DMX devices, then set the bEnableSendingData input to TRUE, the bSetCycleMode input to TRUE, the bSendDefaultData input to FALSE and the uiDataLength input to the corresponding length (in bytes). The data to be transmitted can be specified via the arrProcessData variable.

If RDM commands are to be transmitted, then set the bEnableSendingData input to FALSE and the bSetCycleMode input to FALSE. The blocks for the DMX/RDM commands do not directly access the EL6851 process image, but store the individual DMX/RDM commands in a buffer instead. The FB_EL6851Communication() block reads the commands sequentially from this buffer and forwards them to the EL6851. This prevents multiple blocks accessing the EL6851 process image at the same time. The buffer in which the DMX/RDM commands are stored is contained in a variable of type ST_DMXCommandBuffer. There is one instance of the FB_EL6851Communication() block and one variable of type ST_DMXCommandBuffer per EL6851.

The extent to which the buffer is utilized can be determined from the outputs of the block. If the buffer is regularly overflowing, you should analyze the level of utilization of the PLC task with the aid of the TwinCAT System Manager.

The function block FB_EL6851Communication() can be called in a separate faster task, if necessary. In this case, the faster task in which the FB_EL6851Communication() block is called should have a higher priority than the TASK in which the block for the RDM commands is called.

Examples for both operating modes can be found in the appendix.

4.1.2.1.3 FB_EL6851CommunicationEx

The EL6851 should always be accessed via this block. This applies both to the transmission of the cyclic DMX data and to the transmission of the RDM commands.

If data is to be transmitted cyclically to the DMX devices, then set the bEnableSendingData input to TRUE, the bSetCycleMode input to TRUE, the bSendDefaultData input to FALSE and the uiDataLength input to the corresponding length (in bytes). The data to be transmitted can be specified via the arrProcessData variable.

If RDM commands are to be transmitted, then set the bEnableSendingData input to FALSE and the bSetCycleMode input to FALSE. The blocks for the DMX/RDM commands do not directly access the EL6851 process image, but store the individual DMX/RDM commands in a buffer instead. The FB_EL6851CommunicationEx() block reads the commands sequentially from this buffer and forwards them to the EL6851. This prevents multiple blocks accessing the EL6851 process image at the same time. The buffer in which the DMX/RDM commands are stored is contained in a variable of type ST_DMXCommandBuffer. There is one instance of the FB_EL6851CommunicationEx() block and one variable of type ST_DMXCommandBuffer per EL6851.

The extent to which the buffer is utilized can be determined from the outputs of the block. If the buffer is regularly overflowing, you should analyze the level of utilization of the PLC task with the aid of the TwinCAT System Manager.

The function block FB_EL6851CommunicationEx() can be called in a separate faster task, if necessary. In this case, the faster task in which the FB_EL6851CommunicationEx() block is called should have a higher priority than the TASK in which the block for the RDM commands is called.

Examples for both operating modes can be found in the appendix.

4.1.2.2 Device Control Parameter Message

4.1.2.2.1 FB_DMXGetIdentifyDevice

This function block queries whether or not the identification of a DMX device is active.

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 bError, udiErrorId and bIdentifyActive outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.2.2 FB_DMXSetIdentifyDevice

This function block activates or deactivates the identification of a DMX device.

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 bError and udiErrorId outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.2.3 FB_DMXSetResetDevice

This function block activates a reset in a DMX device.

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 bError and udiErrorId outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.3 Discovery Messages

4.1.2.3.1 FB_DMXDiscMute

This function block sets the mute flag of a DMX device. The mute flag specifies whether a DMX device reacts to the FB_DMXDiscUniqueBranch() [} 21] command (mute flag is not set) or not (mute flag is set).

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 bError, udiErrorId and wControlField outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.3.2 FB_DMXDiscUniqueBranch

This function block queries whether DMX devices are located within a certain address range. This command is used for the discovery of the connected DMX devices.

Applying a positive edge to the bStart input starts the function block, and the bBusy output goes TRUE. The inputs wLowerBoundManufacturerId, dwLowerBoundDeviceId, wUpperBoundManufacturerId and dwUpperBoundDeviceId define the address range in which DMX devices are searched. 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 bError, udiErrorId, wReceivedManufacturerId and dwReceivedDeviceId outputs 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).

If there is only one DMX device in the defined address range, then the 48-bit UID of the DMX device will be returned via the wReceivedManufacturerId and dwReceivedDeviceId outputs. If no DMX devices are found in this range, the output bError is TRUE and udiErrorId is 0x8002 (no response from DMX device). If two or more DMX devices are found in the address range, bError is TRUE and udiError contains an 0x8006 entry (checksum error).

4.1.2.3.3 FB_DMXDiscUnMute

This function block resets the mute flag of a DMX device. The mute flag specifies whether a DMX device reacts to the FB_DMXDiscUniqueBranch() [} 21] command (mute flag is not set) or not (mute flag is set).

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 bError, udiErrorId and wControlField outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.4 Power and Lamp Setting Parameter Messages

4.1.2.4.1 FB_DMXGetLampHours

This function block reads the number of hours in which the lamp was on. The block FB_DMXSetLampHours() [} 26] can be used to edit the hour counter.

4.1.2.4.2 FB_DMXGetLampOnMode

This function block reads the parameter that defines the switch-on characteristics of the DMX device. The block FB_DMXSetLampOnMode() [} 27] can be used to edit the value.

4.1.2.4.3 FB_DMXSetLampHours

This function block sets the operating hours counter for the lamp. The block FB_DMXGetLampHours() [} 24] can be used to read the counter.

4.1.2.4.4 FB_DMXSetLampOnMode

This function block defines the switch-on characteristics of the DMX device. The block FB_DMXGetLampOnMode() [} 25] can be used to read the set value.

4.1.2.5 Product Information Messages

4.1.2.5.1 FB_DMXGetDeviceInfo

This function block queries all relevant information from a DMX device.

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 bError, udiErrorId and stDMXDeviceInfo outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.5.2 FB_DMXGetDeviceLabel

This function block reads a text from the DMX device, which contains a more detailed description of the device. The block FB_DMXSetDeviceLabel() [} 34] can be used to edit the text.

4.1.2.5.3 FB_DMXGetDeviceModelDescription

This function block queries the description of the device type.

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 bError, udiErrorId and sDeviceModelDescription outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.5.4 FB_DMXGetManufacturerLabel

This function block queries the description of the DMX device manufacturer.

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 bError, udiErrorId and sManufacturerLabel outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.5.5 FB_DMXGetProductDetailIdList

This function block queries the categories to which the DMX device belongs.

RDM defines different device categories. Each DMX device can be assigned to up to 6 categories. The assignment is done by the device manufacturer and cannot be changed via RDM.

4.1.2.5.6 FB_DMXGetSoftwareVersionLabel

This function block queries the description of the software version of the DMX device.

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 bError, udiErrorId and sSoftwareVersionLabel outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.5.7 FB_DMXSetDeviceLabel

This function block writes a description text into the DMX device. The function block FB_DMXGetDeviceLabel() [} 29] can be used to read the text.

4.1.2.6 Queued and Status Messages

4.1.2.6.1 FB_DMXClearStatusId

This function block clears the message buffer in the DMX device.

4.1.2.6.2 FB_DMXGetStatusIdDescription

This function block reads the text of a certain status ID from the DMX device.

RDM defines some standard messages. Each of these messages has a unique status ID. This block can be used to read the corresponding text from the DMX device.

4.1.2.6.3 FB_DMXGetStatusMessages

This function block collects the status or error information of an DMX device.

4.1.2.7 RDM Information Messages

4.1.2.7.1 FB_DMXGetParameterDescription

This function block queries the definition of manufacturer-specific PIDs.

4.1.2.7.2 FB_DMXGetSupportedParameters

This function block queries all relevant information from a DMX device.

4.1.2.8 Sensor Parameter Messages

4.1.2.8.1 FB_DMXGetSensorDefinition

This function block queries the definition of a particular sensor.

4.1.2.8.2 FB_DMXGetSensorValue

This function block queries the current value of a sensor.

4.1.2.9 Setup Messages

4.1.2.9.1 FB_DMXGetDMX512PersonalityDescription

This function block reads further Personality information from the DMX device. Some DMX devices support so-called Personalities. Changing the Personality can influence certain RDM parameters.

4.1.2.9.2 FB_DMXGetDMX512StartAddress

This function block queries the DMX512 start address. This lies within the range from 1 鈥?512. If the DMX device does not occupy any DMX slot, then the DMX512 start address is 0xFFFF (65535). 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 bError, udiErrorId and iDMX512StartAddress outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

4.1.2.9.3 FB_DMXGetSlotDescription

This function block queries the text description for slot offsets.

4.1.2.9.4 FB_DMXGetSlotInfo

This function block queries the basic information of the functionality of the DMX512 slots of a DMX device.

4.1.2.9.5 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 bError and udiErrorId outputs can now be processed. Further positive edges at the bStart input will be ignored as long as the block is active (bBusy is TRUE).

(0)

相关推荐