Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


User requirement profile

The user of this library requires basic knowledge of the following.

  • TwinCAT PLC-Control
  • TwinCAT System Manager
  • PCs and networks
  • Structure and properties of the Beckhoff Embedded PC and its Bus Terminal system
  • Technology of DMX devices
  • Relevant safety regulations for building technical equipment

Target groups

This software library is intended for building automation system partners of Beckhoff Automation GmbH. The system partners operate in the field of building automation and are concerned with the installation, commissioning, expansion, maintenance and service of measurement, control and regulating systems for the technical equipment of buildings.


Introduction DMX

DMX is the standard protocol for controlling professional stage and effect lighting equipment, which is used, for example, for the dynamic lighting of showrooms and salesrooms as well as for exclusive plays of light and color in prestigious buildings, such as hotels and event centers. Color mixing and brightness values are transmitted to DMX devices that are static light sources, whilst moving sources of light additionally receive spatial coordinates. EtherCAT’s high data transfer rate enables light settings to be updated at a higher rate, with the result that changes of light and color are perceived by the eye as being more harmonious. The EL6851 can be used to control DMX devices with three axes, such as scanners, moving heads or spotlights; the implementation of the RDM protocol (Remote Device Management) for DMX-internal diagnosis and parameterization is possible with TwinCAT function blocks.

The DMX master transmits new settings to the slaves cyclically at 250 kBaud in order to generate dynamic lighting changes and plays of color. In the DMX protocol, a maximum of 32 slaves are allowed in one strand without repeaters. The 512 byte long frame in the DMX protocol is termed a ‘universe’. 512 channels are available in it, each of which represents a device setting with 8-bit resolution, i.e. in 256 steps, e.g. for dimming, color, focus etc. In the case of moving light sources, additional settings such as inclination, swiveling and speed (with 8-bit or 16-bit resolution) occupy additional channels, so that the 512 channels are only indirectly sufficient for 32 devices. Furthermore, if the universe is fully utilized a frame will require 22 ms for internal DMX circulation, which means a refresh rate of 44 Hz. Light changes at this frequency are perceived to be unharmonious; the transitions only appear to be harmonious from a frequency of >200 Hz. The circulation period can be shortened by reducing the amount of user data; the optimum has proven to be a utilization of 64 bytes (frequency >300 Hz), with which 64 channels are available per universe.

The integration of several universes in a controller becomes simple with the EL6851: EtherCAT can transfer large amounts of data quickly, the EtherCAT protocol is retained until inside the terminal and the terminal supports various mapping sizes (64 to 512 bytes). Hence, if several master terminals are connected, each as its own universe, the time offset in transmitting from the controller to the master can be reduced significantly.


General information

Note 		Installation
Beginning with TwinCAT 2.11 Build 2229 (R3 and x64 Engineering), the library "TcDMX.lib" will be installed automatically.

Note 		Name of the library
This library replaces the "TcEL6851.lib".

Hardware documentation in Beckhoff Information System: EL6851 - DMX Master/Slave Terminal

Further libraries are required

For PC systems (x86) and Embedded-PCs (CXxxxx):

  • Standard.lib
  • TcBase.lib
  • TcSystem.lib
  • TcUtilities.lib

For Bus Terminal Controller of BCxx00, BCxx50, BCxx20, BC9191 and BXxx00 series:

  • not available

Note 		Memory usage
By linking the library PLC program memory is already consumed. Depending on the application program the remaining memory can not be sufficient.


Overview Library

The use of the TwinCAT libraries is recommended both for the RDM protocol and also for the transmission of the cyclic process data to the DMX slaves. Examples of both variants can be found in the appendix.

Description of the Library

Only one block is required for basic communication. The FB_EL6851Communication takes over communication with the EL6851. This block can be used to switch between the RDM and the DMX protocols. If the DMX protocol is in use, then no RDM communication can take place and vice versa.


Integration into TwinCAT (CX9020)

This example explains how to write a simple PLC program for DMX in TwinCAT and how to link it with the hardware. Search for DMX devices.

Unpacking the example files Download

Hardware

Setting up the components

The following hardware is required:

  • 1x Embedded PC CX9020
  • 1x digital 2-channel input terminal KL1002 (start search)
  • 1x EtherCAT Bus Coupler EK1100
  • 1x DMX master terminal EL6851
  • 1x end cap EL9111

Set up the hardware and the DMX components as described in the respective documents.

This example assumes that a Start button was connected to the first input of the KL1002.

Software

Creation of the PLC program

Create a new PLC project for PC-based systems (ARM) and add the TcDMX.lib library.

Next, generate the following global variables:

VAR_GLOBAL
    stEL6851InData      AT %I* : ST_EL6851InData;
    stEL6851OutData     AT %Q* : ST_EL6851OutData;
    stCommandBuffer            : ST_DMXCommandBuffer;
END_VAR

stEL6851InData : Input variable for the DMX terminal.

stEL6851OutData : Output variable for the DMX terminal.

stCommandBuffer : required for communication with DMX.

Then create a program (CFC) for background communication with DMX. The FB_EL6851Communication block is called in this program. Make sure to link the communication block with stEL6851InData, stEL6851OutData and stCommandBuffer.

Create a MAIN program (CFC) in which the block FB_DMXDiscovery is called up. Connect the input bStart of the block with the global variable bStart and stCommandBuffer with the global variable stCommandBuffer.

Under Task Configuration create a new task for the background communication. Add the communication program to this task. Assign a higher priority (lower number) and shorter interval time to this task than for the standard task. More precise information on this can be found in the description of the FB_EL6851Communication function block.

Load the project to the CX as the boot project and save it.

Configuration in the System Manager

Create a new System Manager project, select the CX as the target system, and search for the associated hardware.

Make the DMX inputs 1 to 64 available by opening the Process data tab of the EL6851 and selecting the option 0x1A01 under Inputs.

Add the PLC program created above under PLC configuration. The two tasks are listed when the PLC project is expanded in the tree view. Expand the tasks – all global input and output variables should be allocated to the standard task. However, since the variables stEL6851InData and stEL6851OutData are to be processed faster, move them to the background communication task via drag & drop.

Now link the global variables of the PLC program with the Bus Terminal inputs and outputs, create the allocations, and activate the configuration. Then start the device in run mode.
Your CX is now ready for use.

Start the search DMX devices by pressing the button. The number of found devices is stored in variable iFoundedDevices and additional information in arrDMXDeviceInfoList.


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 analyse the level of utilisation of the PLC task with the aid of the TwinCAT System Manager.

The FB_EL6851Communication() block 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.

You will find examples of both modes of operation in the appendix.

Remarks concerning the IDs of DMX devices

Each DMX device has a unique, fixed, 48-bit long address, also called Unique ID or UID for short. This address is composed of the manufacturer ID (16-bit) and the device ID (32-bit). The manufacturer ID identifies the manufacturer of the device and is issued by the ESTA (Entertainment Services and Technology Association). A list of all known manufacturer IDs can be found at http://www.esta.org/tsp/working_groups/CP/mfctrIDs.php. The device ID is freely specified by the manufacturer. This is intended to ensure that each UID exists only once worldwide. The UID cannot normally be changed. The ESTA has given Beckhoff Automation the manufacturer ID 0x4241. Since the DMX master also has a UID, this should be specified in accordance with the ESTA (wSourceManufacturerId input).

VAR_INPUT

wSourceManufacturerId         : WORD := 16#42_41;
dwSourceDeviceId              : DWORD := 16#12_13_14_15;
bEnableSendingData            : BOOL := TRUE;
bSetCycleMode                 : BOOL := TRUE;
bSendDefaultData              : BOOL;
uiDataLength                  : UINT;
dwOptions                     : DWORD;

wSourceManufacturerId: Unique manufacturer ID of the DMX device. Should be 0x4241 according to the ESTA.

dwSourceDeviceId: Unique device ID of the DMX device. Can be freely assigned.

bEnableSendingData: If the terminal is in cycle mode (CycleMode output = TRUE), then transmission can be activated (TRUE) or blocked (FALSE) with this block.

bSetCycleMode: Activates the cycle mode. The cyclic process data can be transmitted to the DMX devices in cycle mode. Cycle mode must be deactivated in order to transmit the RDM/DMX commands.

bSendDefaultData: The standard values will be transmitted in cycle mode if this input is active (TRUE).

uiDataLength: This input is only relevant if cycle mode is active. It indicates the length of the DMX512 frame in bytes.

dwOptions: Options (currently not used).

VAR_OUTPUT

bError                        : BOOL;
udiErrorId                    : UDINT;
bCycleMode                    : BOOL;
byBufferDemandMeter           : BYTE;
byBufferMaximumDemandMeter    : BYTE;
uiBufferOverflowCounter       : UINT;
bLineIsBusy                   : BOOL;

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.

bCycleMode: Is TRUE if cycle mode is active (see also bSetCycleMode input).

byBufferDemandMeter: Buffer utilisation (0 – 100%).

byBufferMaximumDemandMeter: Previous maximum utilisation of the respective buffer (0 – 100%).

uiBufferOverflowCounter: Number of buffer overflows to date.

bLineIsBusy: This output is set as long as the FB_EL6851Communication() block is processing DMX/RDM commands.

VAR_IN_OUT

stEL6851InData        : ST_EL6851InData;
stEL6851OutData       : ST_EL6851OutData;
stCommandBuffer       : ST_DMXCommandBuffer;
arrProcessData        : ARRAY [1..512] OF BYTE;

stEL6851InData: Structure in the EL6851 input process image. It is used for communication from the EL6851 to the PLC.

stEL6851OutData: Structure in the EL6851 output process image. It is used for communication from the PLC to the EL6851.

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

arrProcessData: The data that are to be transmitted cyclically to the DMX devices are transferred to the block via this variable. Cycle mode must be active for this to take place (see also bSetCycleMode input).


FB_DMXDiscovery

This function block searches for up to 50 DMX devices and optionally sets the start address automatically. The most important information for the devices found is displayed in a structure.

VAR_INPUT

bStart                   : BOOL;
dwOptions                : DWORD;

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

dwOptions: 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 found consecutively, starting from 1.
DMX_OPTION_OPTICAL_FEEDBACK | After a DMX device has been found, the IDENTIFY_DEVICE function is called for two seconds.

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
uliLowerBoundSearchUID   : T_ULARGE_INTEGER;
uliUpperBoundSearchUID   : T_ULARGE_INTEGER;
arrDMXDeviceInfoList     : ARRAY [1..50] OF ST_DMXDeviceInfo;
uiNextDMX512StartAddress : UINT;
iFoundedDevices          : INT;

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.

uliLowerBoundSearchUID: During the search, the lower search address is sent to this output.

uliUpperBoundSearchUID: During the search, the upper search address is sent to this output.

arrDMXDeviceInfoList: Array with the most important information of the DMX devices found.

uiNextDMX512StartAddress: 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.

iFoundedDevices: During the search, the current number of devices found will be sent to this output.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


FB_DMXDiscovery512

This function block searches for up to 512 DMX devices and optionally sets the start address automatically. The most important information for the devices found is displayed in a structure.

VAR_INPUT

bStart                   : BOOL;
dwOptions                : DWORD;

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

dwOptions: 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 found consecutively, starting from 1.
DMX_OPTION_OPTICAL_FEEDBACK | After a DMX device has been found, the IDENTIFY_DEVICE function is called for two seconds.

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;
iFoundedDevices          : INT;

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.

uliLowerBoundSearchUID: During the search, the lower search address is sent to this output.

uliUpperBoundSearchUID: During the search, the upper search address is sent to this output.

arrDMXDeviceInfoList: Array with the most important information of the DMX devices found.

uiNextDMX512StartAddress: 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.

iFoundedDevices: During the search, the current number of devices found will be sent to this output.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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

Development environment | Target system type | PLC libraries to include
TwinCAT 2.11 R3/x64 higher than Build 2240 | PC/CX | TcDMX-library higher than V1.1.0


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() command (mute flag is not set) or not (mute flag is set).

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
wControlField            : WORD;

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.

wControlField: If the execution of the command has been completed (bBusy is FALSE), then further information about the DMX device will be output at this output. The meaning of the individual bits is defined as follows:

Bit | Description
0 - Managed Proxy Flag | This bit is set if the DMX device is a proxy device.
1 - Sub-Device Flag | This bit is set if the DMX device supports sub-devices.
2 - Boot-Loader Flag | This bit is set if the DMX device cannot receive any commands (e.g. whilst the firmware is being loaded).
3 - Proxied Device Flag | This bit is set if the response was transmitted by a proxy device.
4 - 15 | Reserve (always 0).

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


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 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, wReceivedManufacturerId and dwReceivedDeviceId outputs can now be evaluated. Further positive edges at the bStart input will be ignored as long as the 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 there are no DMX devices in this range, then the bError output is TRUE and udiErrorId is 2 (no reply from the DMX device). If there are two or more DMX devices in the address range, then bError is TRUE and udiErrorId contains a 6 (checksum error).

VAR_INPUT

bStart                       : BOOL;
byPortId                     : BYTE;
wLowerBoundManufacturerId    : WORD;
dwLowerBoundDeviceId         : DWORD;
wUpperBoundManufacturerId    : WORD;
dwUpperBoundDeviceId         : DWORD;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

wLowerBoundManufacturerId: Unique manufacturer ID from the lower address range.

dwLowerBoundDeviceId: Unique device ID from the lower address range.

wUpperBoundManufacturerId: Unique manufacturer ID from the upper address range.

dwUpperBoundDeviceId: Unique device ID from the upper address range.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
wReceivedManufacturerId  : WORD;
dwReceivedDeviceId       : DWORD;

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.

wReceivedManufacturerId: If the execution of the command has been completed (bBusy is FALSE), then the state of identification of the DMX device is displayed at this output.

dwReceivedDeviceId: If the execution of the command has been completed (bBusy is FALSE), then the state of identification of the DMX device is displayed at this output.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


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() command (mute flag is not set) or not (mute flag is set).

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
wControlField            : WORD;

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.

wControlField: If the execution of the command has been completed (bBusy is FALSE), then further information about the DMX device will be output at this output. The meaning of the individual bits is defined as follows:

Bit | Description
0 - Managed Proxy Flag | This bit is set if the DMX device is a proxy device.
1 - Sub-Device Flag | This bit is set if the DMX device supports sub-devices.
2 - Boot-Loader Flag | This bit is set if the DMX device cannot receive any commands (e.g. whilst the firmware is being loaded).
3 - Proxied Device Flag | This bit is set if the response was transmitted by a proxy device.
4 - 15 | Reserve (always 0).

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


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

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
bIdentifyActive          : BOOL;

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.

bIdentifyActive: If the execution of the command has been completed (bBusy is FALSE), then the state of identification of the DMX device is displayed at this output.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


FB_DMXSetIdentifyDevice

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

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
bIdentify                    : BOOL;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

bIdentify: This specifies whether the identification is to be activated (TRUE) or deactivated (FALSE).

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;

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.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


FB_DMXSetResetDevice

This function block activates a reset in a DMX device.

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
eResetDeviceType             : E_DMXResetDeviceType := eDMXResetDeviceTypeWarm;;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

eResetDeviceType: This specifies whether a warm start (eDMXResetDeviceTypeWarm) or a cold start (eDMXResetDeviceTypeCold) is to be preformed. No other values are possible for this input.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;

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.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


FB_DMXGetDeviceInfo

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

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
stDMXDeviceInfo          : ST_DMXDeviceInfo;

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.

stDMXDeviceInfo: If the execution of the command has been completed (bBusy is FALSE), then all relevant information for the DMX device is sent to this output in a structure. See also the description of the ST_DMXDeviceInfo structure.

uliUID                  : T_ULARGE_INTEGER;
stRDMProtocolVersion    : ST_DMXRDMProtocolVersion;
uiDeviceModelId         : UINT;
stProductCategory       : ST_DMXProductCategory;
udiSoftwareVersionId    : UDINT;
uiDMX512Footprint       : UINT;
stDMX512Personality     : ST_DMX512Personality;
uiDMX512StartAddress    : UINT;
uiSubDeviceCount        : UINT;
bySensorCount           : BYTE;

uliUID: Unique 48-bit address of the DMX device. The lower 32 bits define the device ID and the upper 16 bits the manufacturer ID.

tRDMProtocolVersion: Version number of the supported RDM standard.

uiDeviceModelId: The device model ID is defined by the device manufacturer.

stProductCategory: Device type of the DMX device. The device types are defined in the RDM standard.

udiSoftwareVersionId: Version number of the software (firmware) in the DMX device.

uiDMX512Footprint: Number of DMX512 slots occupied by the device. Each sub-device and the root device occupy their own DMX512 slots.

stDMX512Personality: DMX devices can possess various personalities. Personalities are comparable with profiles. The current profile and the number of profiles are displayed in this element.

uiDMX512StartAddress: The DMX512 start address. This lies within the range from 1 – 512. If the uiDMX512Footprint parameter is 0, then the DMX start address is 0xFFFF (65535). Each sub-device and the root device occupy different DMX512 start addresses.

uiSubDeviceCount: Number of sub-devices.

bySensorCount: The number of sensors contained in the sub-device or the root device.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


FB_DMXGetDeviceModelDescription

This function block queries the description of the device type.

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
sDeviceModelDescription  : STRING;

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.

sDeviceModelDescription: If the execution of the command has been completed (bBusy is FALSE), then a description (maximum 32 characters) of the device type will be sent to this output. The contents are specified by the DMX device manufacturer.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


FB_DMXGetManufacturerLabel

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

Applying a positive edge to the bStart input starts the 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).

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
sManufacturerLabel       : STRING;

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.

sManufacturerLabel: If the execution of the command has been completed (bBusy is FALSE), then a description (maximum 32 characters) of the DMX device type will be sent to this output. The contents are specified by the DMX device manufacturer.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


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

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
sSoftwareVersionLabel    : STRING;

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.

sSoftwareVersionLabel: If the execution of the command has been completed (bBusy is FALSE), then a description (maximum 32 characters) of the software version of the DMX device will be output at this output. The contents are specified by the DMX device manufacturer.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


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

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
iDMX512Startadresse          : INT := 1;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

iDMX512StartAddress: DMX512 start address (1 to 152)

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;

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.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


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

VAR_INPUT

bStart                       : BOOL;
wDestinationManufacturerId   : WORD;
dwDestinationDeviceId        : DWORD;
byPortId                     : BYTE;
dwOptions                    : DWORD;

bStart: The command is started by a positive edge at this input.

wDestinationManufacturerId: Unique manufacturer ID of the DMX device (for details, see DMX device address).

dwDestinationDeviceId: Unique device ID of the DMX device (for details, see DMX device address).

byPortId: Channel within the addressed DMX device. Sub-devices are addressed through the Port ID. The root device always has the Port ID 0.

dwOptions: Options (currently not used).

VAR_OUTPUT

bBusy                    : BOOL;
bError                   : BOOL;
udiErrorId               : UDINT;
iDMX512StartAddress      : INT;

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.

iDMX512StartAddress: If the execution of the command has been completed (bBusy is FALSE), then the DMX512 start address of the DMX device will be sent to this output.

VAR_IN_OUT

stCommandBuffer          : ST_DMXCommandBuffer;

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


Error codes

Value (hex) | Value (dec) | Description
0x0000 | 0 | No error.
0x8001 | 32769 | No answer from the DMX terminal
0x8002 | 32770 | No answer from the DMX device
0x8003 | 32771 | Communication buffer overflow
0x8004 | 32772 | No answer from the communication block
0x8005 | 32773 | The PortID parameter is outside the valid range.
0x8006 | 32774 | Checksum error.
0x8007 | 32775 | The eResetDeviceType parameter is outside the valid range.
0x8008 | 32776 | Timeout
0x8009 | 32777 | The LowerBoundUID parameter is larger than the UpperBoundUID parameter.
0x800A | 32778 | No RDM commands can be transmitted, because the terminal is in cycle mode.
0x800B | 32779 | The iDMX512StartAddress parameter is outside the valid range (1 – 512).
0x800C | 32780 | Error in setting the DMX512 start address.
0x800D | 32781 | No process data can be transmitted, because the terminal is not in cycle mode.
0x800E | 32782 | It is a RDM telegram received with the data length 0.


Transmission of cyclic process data as DMX master (EL6851)

File for the TwinCAT System Manager Download

File for the TwinCAT PLC Control Download

Starting the example program

The application examples have been tested with a test configuration and are described accordingly. Certain deviations when setting up actual applications are possible.

The following hardware and software was used for the test configuration:

  • TwinCAT master PC with Windows XP Professional SP 3 as operating system, TwinCAT version 2.10 (Build 1340) and INTEL PRO/100 VE Ethernet adapter
  • Beckhoff EtherCAT Coupler EK1100, EL6851 and EL9011 Terminals
  • RGB-LED DMX slave with 3 channels (one for each colour). One slot is occupied per channel.

The DMX slave is to be wired in accordance with the connection diagram.

Procedure for starting the program

  • Save the TSM file for the TwinCAT System Manager Download and the PRO file for TwinCAT PLC Control Download locally on your hard drive.
  • Start the *.TSM file and the *.PRO file; the TwinCAT System Manager and TwinCAT PLC Control open.
  • Connect the hardware in accordance with fig. 1 and connect the Ethernet adapter of your PC to the EtherCAT coupler (further information on this can be found in the corresponding coupler manuals)
  • Select the local Ethernet adapter (with real-time driver, if one) under System configuration, I/O configuration, I/O devices, Device (EtherCAT); on the "Adapter" tab choose "Search...", select the appropriate adapter and confirm (see Fig. 2a + 2b)

    Fig. 2a: Searching the Ethernet adapter

    Fig. 2b: Selection and confirmation of the Ethernet adapter

  • Activation of the configuration and confirmation (Fig. 3a +3b)

    Fig. 3a: Activation of the configuration

    Fig. 3b: Confirming the activation of the configuration

  • Confirming new variable mapping, restart in RUN mode (Fig. 4a + 4b)

    Fig. 4a: Generating variable mapping

    Fig. 4b: Restarting TwinCAT in RUN mode

  • In TwinCAT PLC Control, under the ‘Project’ menu, select ‘Compile all’ to compile the project (Fig. 5)

    Fig. 5: Compile project

  • In TwinCAT PLC Control: log in with the "F11" button, confirm loading the program (Fig. 6), run the program with the "F5" button

    Fig. 6: Confirming program start

Visualization

Fig. 7: Specification of the setting variables for the three colours of the DMX slave in TwinCAT PLC Control

The example transmits the DMX data cyclically to a DMX slave. The DMX device used here occupies three slots (bytes) in the DMX 512 frame. Each slot addresses one of the three colours. If the ‘Start/Stop’ button is pressed, then automatically generated data is transmitted to the DMX device. The speed of the changes can be altered using the horizontal slide control. If the 'Start/Stop' button is not pressed, you can change the values manually using the three vertical slide controls.


Configuration of DMX slaves via Remote Device Management (RDM)

File for the TwinCAT System Manager Download

File for the TwinCAT PLC Control Download

Fig. 2: Visualization example 2 in the TwinCAT PLC

Note 		EtherCAT functionality
The dialogue is only functioning when the ‘EtherCAT OK’ LED lights up green. A red LED indicates a fault in the EtherCAT communication.

DMX slaves are sought on the DMX line with the 'DMX Discovery (without Addressing)' button. All DMX slaves found are displayed in the list on the left. An entry is selected by clicking it. After confirming 'Identify', the RDM command is sent to identify the respective DMX device. The start address can be entered in the input field adjacent to the 'Change Start Address' button. After pressing the button, the new start address will be transmitted to the selected DMX device. The number of the DMX device, the start address in the DMX512 frame and the slot size (number of bytes in the DMX frame) for the selected device are displayed in the lower area.


Receipt of 64 bytes data to two DMX slaves (EL6851-0010) in each case

File for the TwinCATSystem Manager Download

File for the TwinCATPLC Control Download

Fig. 3: 8 arrays each with 64 bytes, full range (all PDO activated )

The EL6851-0010 is able to read max. 512 bytes (64 bytes in eight arrays in each case, see fig. 3). The arrays can assigned via PDO 0x1C13 in the TwinCAT System Manger (tab "process data").

Example:

DMX Channel 1 - 64 - > Index 0x1A01
DMX Channel 65 - 128 -> Index 0x1A02

....

DMX Channel 449 - 512 -> Index 0x1A08

Fig. 4: DMX Channel 1 - 64 (default), select PDO 0x1A01

Fig. 5: DMX Channel 65 - 128, select PDO 0x1A02

In the sample program the first DMX slave receives the first sent 64 bytes and the second one the next 64 bytes (fig. 4+ 5, it is possible to receive all 128 bytes with one EL6851-0010, the segmentation in the example is deliberately selected).

Abb. 6: DMX status object

In the DMX status object (Index 0x6000, "DMX-Status", fig. 6) a copy counter is established with Index 0x6000:11 ("Channel length").

Example: If the PDO 0x1A01 is activated, the value of "Channel length" is 64dec. If the PDO 0x1A02 is activated, the value is 128dez. If both PDOs are activated (0x1A01 and 0x1A02) the value is also 128dez.

Fig. 6: Visualization example 3 in the TwinCAT PLC

DMX Slave 1 receives 64 bytes data on channel 1 of the first array ("DMX Channel 1 - 64")
DMX Slave 1 receives 64 bytes data on channel 1 of the second array ("DMX Channel 65 - 128")

The "Receive toggle" Bit (Index 0x6000:02) is evaluated with the FB "fb_Monitor_ToggleBit" and displayed in the PLC visualization (Watchdog DMX Slave).


Support and Service

Beckhoff and their partners around the world offer comprehensive support and service, making available fast and competent assistance with all questions related to Beckhoff products and system solutions.

Beckhoff's branch offices and representatives

Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products!

The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet pages:
http://www.beckhoff.com

You will also find further documentation for Beckhoff components there.

Beckhoff Headquarters

Beckhoff Automation GmbH

Huelshorstweg 20
33415 Verl
Germany

Phone: | +49(0)5246/963-0
Fax: | +49(0)5246/963-198
e-mail: | info@beckhoff.com
Beckhoff Support

Support offers you comprehensive technical assistance, helping you not only with the application of individual Beckhoff products, but also with other, wide-ranging services:

  • support
  • design, programming and commissioning of complex automation systems
  • and extensive training program for Beckhoff system components
Hotline: | +49(0)5246/963-157
Fax: | +49(0)5246/963-9157
e-mail: | support@beckhoff.com
Beckhoff Service

The Beckhoff Service Center supports you in all matters of after-sales service:

  • on-site service
  • repair service
  • spare parts service
  • hotline service
Hotline: | +49(0)5246/963-460
Fax: | +49(0)5246/963-479
e-mail: | service@beckhoff.com