Configuration by means of the TwinCAT System Manager

The TwinCAT System Manager tool is used for the configuration of the EL6751 CANopen master/slave terminal. The System Manager provides a representation of the number of programs of the TwinCat PLC systems, the configuration of the axis control and of the connected I/O channels as a structure, and organizes the mapping of the data traffic.

Configuration by means of the TwinCAT System Manager 1:
TwinCAT System Manager logo

For applications without TwinCAT PLC or NC, the TwinCAT System Manager Tool configures the programming interfaces for a wide range of application programs:

System Manager – Features

The procedure, and the configuration facilities in the System Manager are described below.

EL6751 - CANopen master terminal

Context menu

Configuration by means of the TwinCAT System Manager 2:
Add Box... <Insert>

Adds CANopen slaves (boxes). The following boxes are currently supported (more detailed description of the boxes is given further down):

Supported boxes

Description

BK5110

Economy Bus Coupler

BK5120

Economy + Bus Coupler

LC5100

Low-Cost Bus Coupler

BK5150

Compact Bus Coupler

BK5151

Compact Bus Coupler with D-Sub connection

BC5150

Compact Bus Terminal Controller with 48 kbyte program memory

BX5100

BX Bus Terminal Controller with 256 kbyte program memory

IPxxxx-B510

Fieldbus compact box: CANopen in/output module, protection class IP67

CANopen Node

General CANopen device or general CAN device (access via CAN layer 2)

Delete Device... <Del>

Removes the EL6751 and all subordinated elements from the I/O configuration.

Online Reset

Initiates an online reset on the CANopen bus.

"EL6751" tab

Configuration by means of the TwinCAT System Manager 3:
EL6751 tab

EtherCAT 

Terminal ID in the terminal network.

Master Node ID

Node address of the EL6751. Value range: 1...127. Determines the identifier of the master heartbeat telegram. Ensure that it is not the same as a slave node address.

Baud rate

Set the baud rate here. Automatically tests whether the connected slave also supports this baud rate.

Cycle time

Displays the cycle time of the corresponding highest priority task. The display is updated when the mapping is generated.

Sync-Cycle Multiplier

CANopen SYNC Cycle Time = (Task) Cycle Time x Sync-Cycle Multiplier. Event driven PDO communications and cyclical synchronized PDO communication are frequently combined when used in conjunction with CANopen. In order to be able to respond rapidly to an event, the TwinCAT task cycle time has to be less than the CANopen SYNC cycle time. If the sync cycle multiplier is set to values > 1, the TwinCAT task is called repeatedly before the SYNC telegram is sent again.

Sync-Cycle Time

The cycle time of the CANopen snyc telegram is displayed here. It results from the cycle time of the highest-priority task, whose process data are linked with the card, and from the sync cycle multiplier.

Sync-Tx-PDO Delay

Directly after the SYNC telegram, the synchronized slaves send their input data/actual values. The EL6751 can delay the transmission of the output data or setpoint values (TxPDOs from the point of view of the terminal) in order to minimize the telegram burst directly after the SYNC. This delay is set in percent of the SYNC cycle time with the parameter Sync-Tx-PDO -Delay.

Sample:

Configuration by means of the TwinCAT System Manager 4:
Diagram: Sync-Tx-PDO-Delay sample

Task Cycle Time = 2000µs, Sync Cycle Multiplier = 5, Sync Tx-PDO Delay =40. Event-controlled PDOs can be processed by the PLC task every 2 ms; the CANopen sync cycle is 10 ms; the EL6751 transmits its synchronous PDOs 4 ms (= 40% of 10 ms) after the SYNC.

Input Shift Time [EL6751 only]

Specifies the fraction of the EtherCAT cycle (in %) after which the inputs in the EtherCAT slave controller are updated. The later this is the case, the shorter the dead time from receipt of a TxPDO until the time when the associated input data of the task are available. The minimum time to be maintained between the start of the input update and the next EtherCAT cycle is the CalcAndCopy time (0x1C33:06), which depends on the number of configured CAN slaves and can be measured in OPERATIONAL state (set entry 0x1C32:08 to 1, then read entry 0x1C33:06).

Search...

This function searches for all existing channels of the EL6751 and the desired one can be selected.

Hardware Configuration... [FC510x only]

In which the address is set in the lower memory area (below 1 MB) of the PC.

Upload Configuration

This function scans the CANopen network and all devices found are added to the EL6751 (no box may be appended). In the case of Beckhoff boxes, reads the configuration precisely. In the case of external devices, the PDO configuration and the identity object are read and evaluated. This function is possible only in Config mode.

Verify Configuration

Allows a comparison of the expected (entered) network configuration with the devices actually found in the network. The data from the CANopen Identify Object are read and compared. In the case of Beckhoff boxes the connected Bus Terminals or extension modules are read and compared (under preparation). This function is possible only in Config mode.

Firmware

Shows the current firmware version of the EL6751.

Firmware Update... [FC510x only]

The firmware update is carried out via the associated hardware.

“ADS” tab

The EL6751 is an ADS device with its own net ID, which can be changed here. All ADS services (diagnostics, acyclical communication) associated with the EL6751 device must address the card via this NetID.

”Box States" tab

Configuration by means of the TwinCAT System Manager 5:
”Box States" tab

Displays an overview of all current box statuses.

"(Online) DPRAM" tab

Refer to "Online display of DPRAM" in the System Manager documentation

CAN interface

Insert the "CAN interface" box directly behind the EL6151 device (see fig. Selection dialog "Inserting a box")

Configuration by means of the TwinCAT System Manager 6:
Selection dialog "Inserting a box"

After the box has been inserted, the following dialog appears for the configuration of the CAN interface:

Configuration by means of the TwinCAT System Manager 7:
Can Queue Sizes setting

Tx queue and Rx queue define the number of messages that are exchanged between the task and the CANopen master in a task cycle. If the message queues are to transmit 29-bit identifiers in addition, activate the checkbox "29 Bit Identifier supported".

The process image of the CAN interface then looks like this:

Configuration by means of the TwinCAT System Manager 8:
CAN interface process image

Message structure with 29-bit support

Message structure without 29-bit support

The "CAN Rx Filter" tab of the CAN interface box in the TwinCAT tree is used for the setting of the filter for the Rx messages (default: all messages are received).
After clicking the "Append..." button, the following dialog appears:

Configuration by means of the TwinCAT System Manager 9:
Dialog „Add CAN Filter“

An "Enable Filter" defines an area or a mask of COB-ID that is received; a "Disable Filter" defines an area or a mask of COB-ID that is not received.

Sample code: Sending messages from the PLC

if Outputs.TxCounter = Inputs.TxCounter then
          for i=0 to NumberOfMessagesToSend do
                  Outputs.TxMessage[i] = MessageToSend[i];
          End_for
          Outputs.NoOfTxMessages = NumberOfMessagesToSend;
          Outputs.TxCounter := Outputs.TxCounter + 1;
end_if

Sample code: Receiving messages from the PLC

if Outputs.RxCounter <> Inputs.RxCounter then
          for I := 0 to (Inputs.NoOfRxMessages-1) do
                   MessageReceived[i] := Inputs.RxMessage [i];
          End_for
          Outputs.RxCounter := Outputs.RxCounter+1;
end_if

EL6751-0010 - CANopen slave terminal

In the system configuration tree structure right-click on I/O Devices and "Append Device" to open the selection list of supported fieldbus cards:

Configuration by means of the TwinCAT System Manager 10:
EL6751-0010: Dialog "Appending an I/O device"

Select EL6751-0010 CANopenSlave. TwinCAT searches for the terminal and displays the memory addresses and slots it finds. Select the required address and confirm.

I/O Device EL6751-0010 CANopen Slave

Selecting the inserted I/O device in the tree structure opens a dialog with different configuration options:

"EL6751-0010" tab

Configuration by means of the TwinCAT System Manager 11:
"EL6751-0010" tab

EtherCAT

Terminal ID in the terminal network.

Baud rate

Set the baud rate here.

Cycle Time

Displays the cycle time of the corresponding highest priority task. The display is updated when the mapping is generated. The network variables are updated with the cycle of this task.

Search...

Searches for all available EL6751-0010 channels, from which the required channel can be selected. In the case of an FC5102 both channels A and B appear. These behave in logical terms like two FC5101 cards.

Firmware

Displays the current EL6751-0010 firmware version.

Firmware Update... [FC510x only]

The firmware update for the EL6751-0010 is carried out via the associated EL6751-0010 terminal.

“ADS” tab

The EL6751-0010 is an ADS device with its own net ID, which can be changed here. All ADS services (diagnostics, acyclic communication) associated with the EL6751-0010 device must address the card via this NetID. Additional ADS Net IDs can be entered for addressing subordinate ADS devices (e.g. an additional fieldbus card in the same PC) via the card.

"(Online) DPRAM" tab

Read access to the DPRAM of the card is provided for diagnostic purposes.

EL6751-0010 Slave box

An "EL6781-0010 (CANopen Slave)" box is created automatically. Further parameters have to be set:

CAN Node tab:

Configuration by means of the TwinCAT System Manager 12:
EL6751-0010 TwinCAT tree
Configuration by means of the TwinCAT System Manager 13:
"CAN node" tab

Node ID:

Set the EL6751-0010 node address.

The profile number and the Add. Information form the DeviceType that can be read via object 0x1000.

Configuring network variables

PLC variables communicated by the EL6751-0010 device are referred to as network variables. These variables must be created and added to the associated PDOs. To this end right-click on the PDO and select "Inserting variables". The following dialog box opens:

Configuration by means of the TwinCAT System Manager 14:
EL6751-0010 TwinCAT tree, outputs
Configuration by means of the TwinCAT System Manager 15:
Dialog "Inserting variables"

If several variables of the same type are added at the same time ("multiple"), the start address for the data is calculated automatically within the PDO. If individual variables are added the start address must be specified explicitly.

The network variables added in this way can then be linked in the familiar way (see System Manager documentation in the TwinCAT Information System) with the variables for the different tasks.