Beckhoff El5021

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 40
At a glance
Powered by AI
The document describes how to use sample programs for Beckhoff EL5021 terminals for commissioning. It provides details on connecting hardware, configuring the system in TwinCAT, and running the sample program.

The document describes the TwinCAT master PC, Beckhoff EtherCAT Coupler EK1100, EL5021 and EL9011 terminals, and rotary encoder that are part of the test configuration. It also discusses features of the sample program such as displaying process data and manipulating outputs.

The sample program works by downloading and extracting the configuration and PLC program files, selecting the Ethernet adapter in TwinCAT, activating the configuration, generating variable mapping, rebuilding the project, logging into TwinCAT PLC, loading and running the program.

BECKHOFF EL5021: Commissioning

Example program
Using the sample programs

Attention

This publication contains statements about the suitability of our products for certain areas of
application. These statements are based on typical features of our products. The examples
shown in this publication are for demonstration purposes only. The information provided
herein should not be regarded as specific operation characteristics. It is incumbent on the
customer to check and decide whether a product is suitable for use in a particular
application. We do not give any warranty that the source code which is made available with
this publication is complete or accurate. This publication may be changed from time to time
without prior notice. No liability is assumed for errors and/or omissions.

Download sample program:

Fig. 1: Connection for sample program


Starting the example program
The application examples have been tested with 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.11

Beckhoff EtherCAT Coupler EK1100, EL5021 and EL9011 terminals

Rotary encoder ~ 1 VSS

Features of the sample program:

Display of the process data, manipulation of outputs

Calculation of the mechanical position considering the bit shifting

Permanent readout of the CoE directory and setting when changing

Procedure for starting the program

After clicking the Download button, save the zip file locally on your hard disk, and unzip the *.TSM
(configuration) and the *.PRO (PLC program) files into a temporary working folder

Run the *.TSM file and the *.PRO file; the TwinCAT System Manger and TwinCAT PLC will open

Connect the hardware in accordance with Fig. 1 (other electrical or mechanical switching elements
configured for a normally open function can be used instead of the inductive proximity limit switch), and
connect the Ethernet adapter of your PC to the EtherCAT coupler (you will find further instructions on this in
the corresponding coupler manuals)

Select the local Ethernet adapter (with real-time driver, if appropriate) 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 confirm (Fig. 3a +3b)

Fig. 3a: Activation of the configuration

Fig. 3b: Confirm activation of the configuration

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

Fig. 4a: Generate variable mapping

Fig. 4b: Restart TwinCAT in RUN mode

In TwinCAT PLC, under the "Project" menu, select "Rebuild all" to rebuild the project (Fig. 5)

Fig. 5: Build project

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

Fig. 6: Confirm program start

Fig. 7: Screenshot visualization PLC

BECKHOFF EL7031, EL7041-x00x, EP7041-000x: Commissioning

Application example
EtherCAT XML Device Description

Note

The display matches that of the CoE objects from the EtherCAT XML Device Description.
We recommend downloading the latest XML file from the download area on the Beckhoff
Website and installing it according to the installation instructions.

Motor control with visualization


Download example program:
Used Master: TwinCAT 2.11 (for older versions the control loop has to be programmed manually; in this case it is
already implemented in the NC).
This application example demonstrates movement of a motor to any position or in continuous mode with the aid of
visualization. The velocity, the starting acceleration and the deceleration can be specified.
The sample program consists of 2 files (PLC file and System Manager file).
First open the PLC file and compile it so that you have the *.tpy file available that is required for the System Manager.
Please note that you may have to adjust the target platform in the PLC program (default: PC or CX 8x86). If required,
you can select the target platform under Resources -> Controller configuration.

Fig. 1: Selection of the target platform


Please note the following for the System Manager file:

Start the System Manager in Config mode.

Please ensure that the I/O configuration matches your actual configuration. In the sample program only one
EL7041 is integrated. If further terminals are connected you have to add them or re-scan your configuration.

You have to adjust the MAC address. To do this click on your EtherCAT device, then select the Adapter tab
and click onSearch after the MAC address (see Fig. 2). Select the right adapter.

Fig. 2: Selecting the MAC address

In the PLC configuration you have to adjust the path for the PLC program. Click on the appended PLC
program and select the tab IEC1131 (see Fig. 3). Select Change and enter the correct path.

Fig. 3: Changing the PLC path

Under NC configuration an EL7041 is already linked to the NC. To change the link or add additional devices
proceed as described under Integration into the NC configuration.

The PLC program is configured as follows. The libraries TcMC.lib and TcNC.lib must be integrated (see Fig. 4).

Fig. 4: Required libraries


Subsequently certain global variables are declared (see Fig.5). The data
types PLCTONC_AXLESTRUCT andNCTOPLC_AXLESTRUCT deal with the communication between the PLC and
the NC.

Fig. 5: Global variables


Once the global variables have been declared, programming can commence. Start with declaring local variables (see
Fig. 6).
MC_Direction is an enumeration type that specifies the direction of travel for the block MC_MoveVelocity, which in
turn initiates continuous travel of the motor.
An axis reset is carried out with the function block MC_Reset. Absolute positioning is carried out with the function
block MC_MoveAbsolute. The current axis position can be read with the function block MC_ActualPosition.
MC_Power enables the axis; MC_Stop is required for stopping the axis.

Fig. 6: Local variables

The program code is as follows (see Fig. 7):

Fig. 7 Program code


The motor can then be operated with the aid of the following visualization (see Fig. 8).
Press Enable to enable the axis. In "Free run mode" you can now use the Left or Right buttons, and the motor will run
with a speed defined under fbMoveVelocity_Axis_1 in the selected direction. In "Absolute mode" you can specify
a Velocity,Acceleration, Deceleration and the Setpoint Position and initiate the motion with Start Job. If no values are
entered foracceleration and deceleration the default value of the NC is used.

Fig. 8: Visualization

Information on function blocks and data types


Further information on the function blocks and data types used can be found in the Beckhoff
Information System.
Note

Beckhoff AX5000: Homing

Homing
Homing refers to an axis initialisation run during which the correct actual position is determined by means of a
reference signal. This procedure is referred to as homing, referencing or calibration. A switch that is triggered at a
known, unique position along the travel path serves as reference signal. Further signals such as the encoder zero
track can be analysed in order to increase the precision.
In general a distinction is made between drive-controlled homing and NC-controlled homing. Drive-controlled homing
is carried out automatically by a suitable drive without input from the control system and is not discussed in detail in
this documentation. NC-controlled homing is fully controlled by the control system and supports a wide range of drive
types. The different NC-controlled homing mechanisms are described below.

Position reference systems and encoder systems


A distinction is made between different position reference systems (measurement systems), depending on which
position measuring system is used. An absolute measurement system provides an absolute position (directly after
switching on) that is unique over the whole travel path. Such a measurement system is calibrated once and set via a
persistently stored position offset. In this case homing is not required even after a system restart. In contrast, relative
measurement systems provide a non-unambiguous position value (after switching on) that must be calibrated through
homing. Relative measurement systems are subdivided further into purely relative systems (incremental encoders)
and part-absolute systems, which only provide a unique position during a motor or encoder revolution.

Absolute position - e.g. multi-turn encoder

BiSS

EnDat

Hiperface

SSI

Part-absolute position - e.g. single-turn encoder

BiSS

EnDat

Hiperface

MES (Beckhoff)

Resolver

Relative position - incremental encoders

Sine / cosine (sine 1 Vss)

TTL, HTL (rectangle)

General description of a homing procedure


Figure A shows a schematic diagram of a homing procedure with individual velocity profile phases.
1.

When the machine is switched on the axis is in a random position (1).

2.

Homing is initiated, and the axis travels towards the reference cam.

3.

Once the reference cam is detected, the axis stops and reverses.

4.

The axis moves away from the reference cam and detects the falling edge of the reference cam signal.

5.

The axis continues and searches for a sync pulse or another distinctive event, depending on the reference
mode setting. This step may be omitted where appropriate.

6.

The occasion is detected and the specified reference position is set.

7.

The axis stops at a certain distance from the reference position, which was set shortly beforehand with
maximum precision.

Figures B and C show the position and velocity profile during homing.

Referencing modes
The NC system supports different referencing modes, depending on the encoder system type.

Homing based on reference cam (Plc Cam)


The simplest axis referencing mode uses a reference cam that generates a digital signal at a defined
position along the travel path. During homing the NC determines the signal edge and allocates a

configurable reference position to this position. Referencing based on a reference cam is always possible,
irrespective of the encoder type, and is a prerequisite for other, more precise modes.

Software Sync
Software Sync mode enhances the homing precision by additionally detecting the encoder count overflow
after an encoder or motor revolution, after the reference cam signal has been detected. This mode requires
a part-absolute encoder (e.g. resolver) with constant overflow interval relative to the reference cam.
Overflow detection is parameterised via the Reference Mask parameter (see System Manager section).

Hardware Sync
Some encoder systems provide a sync pulse per revolution (zero track) in addition to the count. The homing
precision can be enhanced by selecting this mode, if the encoder evaluation logic is able to pick up the sync
pulse. The precision is comparable with Software Sync. Hardware Sync mode may require parameterisation
or special wiring of the drive or encoder system.

Hardware Latch
Hardware Latch reference mode (Hardware Latch Pos or Hardware Latch Neg, depending on edge) requires
an external digital latch signal for storing the encoder position in the evaluation unit of the encoder system.
The encoder system must support such a latch function and may have to be configured first in order to be
able to utilise this function.
Absolute encoder
system

Part-absolute encoder system

Relative encoder system

NC

Referencing not required

Recommended reference
modeSoftwareSync
(also possible: PlcCam, HardwareSync)

Recommended reference
modeHardwareSync
(also possible: PlcCam)

Drive

Referencing not required

Drive setting not required

Drive parameterisation required


(for Sercos/SoE see Probe Unit)

Parameterisation in the System Manager

Reference system: The encoder parameters reference system determines whether the encoder system used is
incremental or absolute. In an absolute encoder system the encoder value is taken from the control system without
modification.

Not all NC encoders support this optional parameter, i.e. only those types that offer a choice between
absolute and incremental encoder reference system (measurement system) support it (e.g. SERCOS,
KL5001, M3000, ProfiDrive, Universal). This choice determines whether the actual encoder position is
interpreted and evaluated as an absolute or incremental position, based on an absolute or incremental
reference system (measurement system).
In an absolute reference system no further processing takes place with regard to encoder counter value
overflow or underflow. It is assumed that the counter value is unique within the axis traversing range and
no encoder counter value overflow or underflow occurs. Otherwise there would be a discontinuity in the
actual position, resulting in a position following error. Axis referencing via MC_Home is not possible.
Instead, the actual position is calibrated once via the Position Bias parameter (zero offset / position
offset).

In an incremental reference system axis referencing via MC-Home is generally required. In addition the
NC automatically detects and accounts for encoder counter value overflow or underflow events, so that
continuous axis operation is possible over many months ("infinite range").
Encoder Mask (maximum value): The encoder mask determines the bit width for the incremental encoder position.
The encoder mask is used for detecting and counting in range overflow events.
Scaling Factor: The scaling factor is multiplied with the incremental encoder position (including all overflows) and
used as the basis for calculating an absolute axis position with the parameterised physical unit.
Position Bias (zero offset): Position offset; moves the axis coordinate system relative to the encoder coordinate
system. This value is mainly used in absolute encoder systems. In relative systems an offset is usually not required,
since the system moves to a parameterised reference position after homing.
Invert Encoder Counting Direction: The encoder count direction can be inverted if it does not match the required
logical count and travel direction.

Reference Mode: Referencing mode as described above (Plc CAM, Hardware Sync, Hardware Latch Pos, Hardware
Latch Neg, Software Sync). The default mode corresponds to Plc CAM mode.

The Reference Mode parameter is used to specify the type of reference event (physical or logical event)
for the referencing process. Depending on which referencing mode is parameterised the referencing
procedure is either based on the hardware characteristics of the drive/encoder (e.g. hardware latch),
or the reference event is only detected within the control system, i.e. without additional hardware
reference.
Reference Mask: The reference mask parameterises overflow detection for Software Sync reference mode. It is less
or equal the encoder mask and defines an encoder value range, which is part-absolute. Examples include the bit
width of a motor revolution or the bit width of a sine period in a sine/cosine encoder. Software Sync therefore always
detects the same overflow position in a part-absolute encoder system.
Calibration Value: Reference position to which the axis position is set after homing.
Invert Direction for Calibration Cam Search: The parameter inverts the axis travel direction for searching the
referencing cam during homing. The standard direction is negative, i.e. towards the axis coordinate system origin.
Invert Direction for Sync Impulse Search: The parameter inverts the axis travel direction for searching the sync
pulse during homing.

Referencing of coupled axes


TwinCAT enables axis coupling during referencing. The coupled axes do not necessarily have to be referenced. Axis
coupling enables referencing of gantry axes, for example, provided the system can ensure that the two axes are
suitably oriented relative to each another before homing. In this case the procedure is as follows:

Ensure that both axes can be moved in coupled mode. (Position comparison is not possible at this stage,
because none of the axes is referenced.)

Couple axis 2 with axis 1.

Start homing for axis 1. Slave axis 2 will travel with axis 1.

Decouple the axes after the homing procedure.

Couple axis 1 with axis 2.

Start homing for axis 2. Slave axis 1 will travel with axis 2.

Decouple the axes after the second homing procedure.

Move both axes to a set position for alignment. The travel path for both axes should be minimal and may
correspond to the mean value from both positions, for example.

Couple the axes. The coupled system is now referenced.

Programming a homing procedure in the PLC


MC_Home
The MC_Home function block is used to initiate homing from the PLC. The reference mode and further parameters
are configured in the System Manager as described above. Only the reference cam signal (bCalibrationCam) is fed
into the block.

Drive types and I/O interface


Homing is largely independent of the drive types used. In some cases the drive has to be parameterised, particularly
if a drive latch function is used. The following section describes the AX5000 version.

BECKHOFF EL73x2: Commissioning

Program example: motor controller with visualization


Installation of the latest XML device description

Note

Please ensure that you have installed the corresponding latest XML device description in
TwinCAT. This can be downloaded from the Beckhoff website
(http://www.beckhoff.de/german/default.htm?download/elconfg.htm) and installed according
to the installation instructions.

Download example program:


Used Master: TwinCAT 2.11 (for older versions the control loop has to be programmed manually; in this case it is
already implemented in the NC).
This application example demonstrates movement of a motor to any position or in continuous mode with the aid of
visualization. The velocity, the starting acceleration and the deceleration can be specified.

The example program consists of 2 files. On the one hand the PLC file and on the other System Manager file.
First open the PLC file and compile it so that you have the *.tpy file available that is required for the System Manager.
Please note that you may have to adjust the target platform in the PLC program (default: PC or CX 8x86). If required,
you can select the right target platform under tab Resources -> Controller configuration.

Attention must be paid with the System Manager file to the following:

Start the System Manager in Config mode.

Please ensure that the I/O configuration matches your actual configuration. In the sample program only one
EL7342 is integrated. If further terminals are connected you have to add them or re-scan your configuration.

You have to adjust the MAC address. To do this click on your EtherCAT device, then select the Adapter tab
and click onSearch after the MAC address (see Fig. ). Select the right adapter.

In the PLC configuration you have to adjust the path for the PLC program. Click on the appended PLC
program and select the tab IEC1131 (see Fig. ). Select Change and enter the correct path.

Under NC configuration an EL7041 is already linked to the NC. To change the link or add additional devices
proceed as described under Integration into the NC configuration.

The PLC program is configured as follows. The libraries TcMC.lib and TcNC.lib must be integrated (see Fig. 1).

Fig. 1: Required libraries


Subsequently certain global variables are declared (see Fig.2). The data
types PLCTONC_AXLESTRUCT andNCTOPLC_AXLESTRUCT deal with the communication between the PLC and
the NC.

Fig. 2: Global variables


Once the global variables have been declared, programming can commence. Start with declaring local variables (see
Fig. 3).
MC_Direction is an enumeration type that specifies the direction of travel for the block MC_MoveVelocity, which in
turn initiates continuous travel of the motor.
An axis reset is carried out with the function block MC_Reset. Absolute positioning is carried out with the function
blockMC_MoveAbsolute. The current axis position can be read with the function block MC_ActualPosition.
MC_Power enables the axis; MC_Stop is required for stopping the axis.

Fig. 3: Local variables


The program can then be programmed as follows (see Fig. 4):

Fig. 4: Program code


The motor can then be operated with the aid of the following visualisation (see Fig. 5).
Press Enable to enable the axis. You now have the choice. You can press the Left or Right button in free run mode
and the motor will turn at the velocity defined in fbMoveVelocity_Axis_1 in the selected direction. Or you can
specify velocity, acceleration, deceleration and the position to be driven to and start the drive with Start Job. If no
values are entered foracceleration and deceleration the default value of the NC is used.

Fig. 5: Visualisation

Information on function blocks and data types

Further information on the function blocks and data types used can be found in the Beckhoff
Information System.

Note

BECKHOFF EL515x: Commissioning

Operating modes and settings


Contents
Parameterization
Explanatory notes for
parameters and modes
- DC
- Main PDO
- Optional PDO
- Features CoE
- Frequency
- Period calculation
- Latch
- Reset
- Up-/Down counter
- Micro increments
- Digital filter
Process data description
The EL515x incremental encor interface terminal enables connection of incremental encors with the Bus Coupler or
the PLC. A 32 bit counter (two fpr the EL5152) with quadrature decor and a 32-bit latch (only EL5151) can be read,
set or activated (switchable to 16 bit). In addition to encor inputs A, B, C (EL5151), an additional gate/latch input (24
V) for disabling/latching the counter is available.
The EL5151 can also be used as a single-channel 32/16 bit counter on channel A, in which case the signal level on
channel B defines the count direction. The changeover to this mode takes place via the CoE directory.
The "Counter Value" input value represents a 32-bit "position counter". At the period input the period between two
positive edges of channel A is measured with a resolution of 100 ns (default setting, decimal value x 100 ns).
Depending on the setting (index 8000:14, index 8000:16), the period length may be up to 1.6 or 3.2 s.
The latch/gate input of the EL5151 can be parameterized via the CoE directory as follows: no function, or disabling
the counter at HIGH or LOW signal level.

Parameterization
The following modes are available for the EL515x. They apply both for the encor analysis and counter terminal mode.
The combination of DC, PDO and CoE settings permissible for each mode is specified below.

EL5151

Mo
de

Featu
res
CoE

DC

Main
PDO

Comme
nt

Optional
PDO 1

Comm
ent

Optional
PDO 2

Comm
ent

FreeR
un

1A00+1
600

Count/L
atch
in 32 bit

1A02 or1
A03

Freque
ncy
(32bit)
or
Period
(32 bit)

--

--

8000:
nn

Combinati
ons of the
CoE
8000:nn

FreeR
un

1A01+1
601

compac
t:
Count/L
atch
in 16 bit

1A02 or1
A03

Freque
ncy
(32bit)
or
Period
(32 bit)

--

--

8000:
nn

Combinati
ons of the
CoE
8000:nn

DC/D
Ci

1A00+1
600

Count/L
atch
in 32 bit

1A02 or1
A03

Freque
ncy
(32bit)
or
Period
(32 bit)

1A04 or1
A05

Timesta
mp 64
bit
Timesta
mp 32
bit
(compa
ct)

8000:
nn

Combinati
ons of the
CoE
8000:nn

DC/D
Ci

1A01+1
601

compac
t:
Count/L
atch
in 16 bit

1A02 or1
A03

Freque
ncy
(32bit)
or
Period
(32 bit)

1A04 or1
A05

Timesta
mp 64
bit
Timesta
mp 32
bit
(compa
ct)

8000:
nn

Combinati
ons of the
CoE
8000:nn

EL5152

Commen
t

Mo
de

DC

Main
PDO

Comm
ent

Optional
PDO 1

Comme
nt

Optio
nal
PDO 2

Comm
ent

Featur
es
CoE

Comment

FreeR
un

1A00+ 1
600
(Ch.1)
1A04+ 1
602
(Ch.2)

Count
in 32 bit

1A02 or1
A03
(Ch.1)
1A06 or1
A07
(Ch.2)

Freque
ncy
(32bit)
or
Period
(32 bit)

--

--

80n0:n
n

Combinati
ons of the
CoE
80n0:nn

FreeR
un

1A00+ 1
600
(Ch.1)
1A04+ 1
602
(Ch.2)

compa
ct:
Count i
n 16 bit

1A02 or1
A03
(Ch.1)
1A06 or1
A07
(Ch.2)

Freque
ncy
(32bit)
or
Period
(32 bit)

--

--

80n0:n
n

Combinati
ons of the
CoE
80n0:nn

DC/D
Ci

1A00+ 1
600
(Ch.1)
1A04+ 1
602
(Ch.2)

Count
in 32 bit

1A02 or1
A03
(Ch.1)
1A06 or1
A07
(Ch.2)

Freque
ncy
(32bit)
or
Period
(32 bit)

--

--

80n0:n
n

Combinati
ons of the
CoE
80n0:nn

DC/D
Ci

1A00+ 1
600
(Ch.1)
1A04+ 1
602
(Ch.2)

compa
ct:
Counti
n 16 bit

1A02 or1
A03
(Ch.1)
1A06 or1
A07
(Ch.2)

Freque
ncy
(32bit)
or
Period
(32 bit)

--

--

80n0:n
n

Combinati
ons of the
CoE
80n0:nn

Other settings may result in irregular process data and lead to error messages in the TwinCAT System Manager
logger window.

EL5151x parameterization

Note

Use a CoE reset in order to deactivate any previous settings

To activate the new operation mode, reload the EtherCAT slaves (button

Explanatory notes for parameters and modes

DC (Distributed Clocks)

Describes whether the terminal is operated with distributed clocks support:

Fig. 1: "DC" tab

FreeRun: The terminal operates frame-triggered. Cyclic operation is started via the SyncManagers of the
EtherCAT frame processing.

DC-Synchron: Cyclic operation in the terminal is started by the local distributed clock at exact intervals. The
start time is chosen such that it coincides with other output slaves in the EtherCAT system.

DC Synchron (input based): As DC Synchron mode, with the cyclic start time chosen such that it
coincides with other input slaves in the EtherCAT system.

Main PDO
Selection of basic process data (example of EL5151):

A: Selection of data direction: input or output


B: Selection of (optional) PDOs (process data objects)
C: Explanatory notes for PDOs
Fig. 2: "Process data" tab

compact: The process data can be represented with 16 bits (compact) or with 32 bits.

Optional PDOs
Optional PDOs, in addition to the main PDO:

EL5151

PDO 1 (1A02 or 1A03): The frequency or the period can be selected as optional PDO 1

PDO 2 (1A04 or 1A05): In one of the DC modes a 32-bit or 64-bit timestamp can be selected. The
timestamp specifies the time of the last registered increment edge, based on the DistributedClocks system.

EL5152

PDO 1 (1A02 or 1A03 [Ch.1], 1A05 or 1A06 [Ch.2]): The frequency or the period can be selected as
optional PDO 1

Features CoE
Depending on the main PDO/optional PDOs further settings can be selected in the CoE list (CAN over EtherCAT).

Parameterization via the CoE list (CAN over EtherCAT)

Note

Please note the following general CoE information when using/manipulating the CoE
parameters:
- Maintain startup list in case components have to be replaced
- Differentiation between online/offline dictionary, existence of current XML description
- "CoE reload" for resetting changes

The following CoE settings from object 8000 are possible and are shown below in their default settings:

Fig. 3a: "CoE-Online" tab EL5151

Fig. 3b: "CoE-Online" tab EL5152

The parameters are described on page object description and parameterization (EL5151 / EL5152).

EL5151 / EL5152
The Objects containing a "n" describe the EL5151 and the EL5152 (with n = 0 for Ch.1; n =
1 for Ch.2)
Note

Frequency

The time window for the frequency calculation and the resolution can be parameterized in CoE
objects 80n0:11,80n0:13, 80n0:15, 80n0:17 .

The positive edges for track A within the specified time window (see frequency modes) and the next edge
including the time until then are counted. The waiting time for the edge can be set in CoE
object 80n0:17 "Frequency Wait Time" (unit: ms). The default value is 1.6 sec. This is also the maximum
value.

The frequency is always specified as a positive number, irrespective of the sense of rotation.

The value of the time window is 10 ms (default), but at least the basic unit in Index 80n0:0F.

This calculation is carried out in the terminal in free-running mode without reference to the distributed clocks
system. It is therefore independent of the DC mode.

EL5151:No frequency measurement is possible if the counter is blocked by the gate. In this case the period
can be measured regardless.

EL5151: A C or external reset restarts the frequency measurement. The last frequency value remains
unchanged until a new frequency value is determined.

Index 80n0:0F is used for switching the basic unit for the Frequency window between 1 s and 1 ms, in
order to adjust the time window for the measurement. The following maximum measuring windows are
therefore possible:

Basic unit

max. time
window

1 s

65.5 ms

1 ms

65 sec

After the measuring window time has elapsed (index 80n0:11), the system waits for the following rising edge
at track A or a maximum of 1.6 sec or the time from index 80n0:17

The precision of the frequency measurement depends on the selected basic unit 8000:0F and the window size.

Frequency mode A

Basic unit 1 s: all window sizes

Basic unit 1 ms: up to 600 ms window size

Measurement sequence
- The measurement starts with a rising edge at track A. The current counter value and time (resolution: 100 ns) are
stored.
- After the measuring window time has elapsed (index 80n0:11), the system waits for the following rising edge at track

A or a maximum of 1.6 sec or the time from 80n0:17


- The frequency is calculated from the edge difference and the actual elapsed time.

Fig.4a: Frequency measurement principle in enhanced operation mode - frequency mode A

Frequency mode B

Basic unit 1 ms: from 601 ms window size

Measurement sequence
- At the start of the measurement the time and the current position are stored with a resolution of 100 ns, irrespective
of the current signal position.
- After the measurement the current position is stored irrespective of the current signal position.
- The frequency is calculated from the number of edges and the actual elapsed time.
- The frequency measurement therefore takes place with reduced accuracy.
- The larger the measuring window in relation to the basic unit, the more precise the frequency calculation.

Fig.4b: Frequency measurement principle in enhanced operation mode - frequency mode B

Period calculation

This calculation is carried out free-running in the slave without reference to the distributed clocks system. It
is therefore independent of the DC mode.

During each cycle the interval between 2 positive edges of input A is counted.

Depending on the setting, the measuring periods can be up to 1.6 or 3.2 s long.

If no edge change occurs for approx. 1.6 s, any period specification is cancelled.

Latch (only EL5151)


Activation of latch C input ("C") and saving ("latching") of the counter value (index 7000:01)

The counter value is saved at the first external latch pulse (positive edge at input "C") after the bit has been
set ("TRUE") in index 7000:01 (has priority before 7000:02 / 7000:04). The subsequent pulses at the other
inputs have no influence on the latch value in index 6000:12 if the bit is set.

Note for "Latch C valid" bit: A new counter value at the latch input can only be written once the value of the
Latch C valid bit (index 6000:01) is FALSE.

Activation of the external latch input ("gate/latch") and latching of the counter value (index 7000:02, 7000:04)

The counter value at the latch input (Index 6000:12) will be saved upon the first external latch pulse with a
rising edge if the bit (TRUE) is set in index 7000:02. The subsequent pulses have no influence on the latch
value in index6000:12.

The counter value at the latch input (Index 6000:12) will be saved upon the first external latch pulse with a
falling edge if the bit (TRUE) is set in index 7000:04. The subsequent pulses have no influence on the latch
value in index6000:12.

Note for "Latch extern valid" bit: A new counter value at the latch input can only be written once the value of
the Latch extern valid bit (index 6000:02) is FALSE.

Reset (only EL5151)

Counter reset (index 8000:01, 8000:02, 8000:10): For a counter reset via input C set the bit in
index 8000:01, for a reset via the external latch input set the bit in index 8000:02.

The functions "Enable C reset" (8000:01) and "Enable extern reset" (8000:02) cannot be activated
simultaneously.

Note for "Extern reset polarity", index 8000:10: The edge for setting the counter to zero can be selected via
index8000:10.
Bit not set: counter is set to zero with falling edge.
Bit set: counter is set to zero with rising edge.

Up/down counter

The mode (encor or up/down counter) is set via the CoE objects (profile-specific objects, tab CoE - Online,
index80n0:03 "Non-volatile settings"). Click on the corresponding row of the index to be parameterized,
enter 1 in the SetValue dialog and confirm with OK.

Only EL5151: Set the gate polarity accordingly via object 8000:04.

The counting direction (up/down) is specified via the signal level at channel B.

An additional option for reversing the rotation direction is available by setting the bit in index 80n0:0E.

Connection:

Fig.5: Counter connection principle

Micro-increments

Works with and without distributed clocks, but in the EL5151 this is only meaningful in conjunction with one
of the DC modes

By setting the counter value only the integer component can be modified.

The principle:

Fig.5: Frequency measurement principle


The highly constant query cycles (accuracy: 100 ns) of the distributed clocks systems enable the EL5151 to
interpolate axis positions between the counted encor increments from a certain speed. The interpolation
resolution is 8 bit, corresponding to 256 values. A standard encor with 1,024 bars with 4-way evaluation and
micro-increments thus becomes a high-resolution axis encor with 4096 * 256 = 1,048,567 bars.

Underrunning of the minimum velocity is indicated by the object 60n0:08 (extrapolation stall) in the process
data.
Digital filter (from firmware 02)
The EL515x provides a switchable digital filter (CoE x80n0:08) for the encoder channels A and B. This filter works as
a diffuse low-pass filter at approx. 400 kHz, the permitted limit frequency
You have to check for the particular application, if it is advantageous to deactivate the filter. Fast axis movements
should be better detected in this case.

Process data description


The process data are generated from CoE objects 6000 (inputs) [EL5151 / EL5152] and 7000 (outputs)
[EL5151 / EL5152] and are described in section Object description and parameterization (EL5151 / EL5152).

You might also like