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.


Introduction

TS1500 | TwinCAT Valve Diagram Editor

TwinCAT characteristic curves - Introduction

When hydraulic cylinders are used together with the appropriate valves, the way in which the cylinder and valves are constructed often results in a non-linear transmission behaviour of the axis, and thus of the system that is to be controlled. The speed of the hydraulic cylinder is not, in other words, proportional to the valve's drive signal. This can occur, for instance, if a hydraulic cylinder is used in which the two faces to which pressure is applied to not have a 1:1 area ratio. Non-linear valve curves are another typical reason for this behaviour. The following diagram illustrates a possible form for such a characteristic curve.

Characteristic Curve Linearisation

Problems can arise in association with such non-linear controlled systems, in that a linear controller design based on this non-linear segment is found to be inadequate, because the controller can only be set up to operate optimally over one part of its working range. The consequence is a loss in the quality of regulation in many applications, or even that the behaviour of the controller is unacceptable.

The purpose of the curve linearisation module presented here is to facilitate continued use of the familiar and proven procedure for designing linear control loops, but to improve the regulation quality. The superposition of a characteristic curve module compensates for the non-linearity of the control system, resulting in approximately linear behaviour. This procedure is illustrated in the following functional diagram.

The curve employed in this procedure must describe the inverse of the transmission behaviour of the particular combination of valve and hydraulic cylinder being used as exactly as possible; the net result of the inclusion of this characteristic curve module in series with the physically existing controlled system then results in an approximation to a linear curve.

Emphasis is particularly to be placed on achieving the greatest possible accuracy of the curve where it bends, since these regions are particularly critical for the linearisation.

The following functional diagram illustrates the use of the characteristic curve linearisation to the TwinCAT axis control loop:

The curve required for the linearisation process can be created and edited with the Valve Diagram Editor. After the curve has been created and loaded into the real-time environment, it can be activated within the axis control loop. This is done in the System Manager on the drive's analog tab, or generally by means of an ADS command .

The unique table-ID for the valve curve must be entered in the "Valve Diagram: Table Id" line. It is possible to choose between the "Linear" and "Spline" types in the "Valve Diagram: Interpolation type" line. (A table with equidistant reference points is created in the real-time environment, and this is interpolated at run-time using either a linear or a spline function.)

It is also possible to insert an output offset before and after the characteristic curve module.

The parameter "Drift Compensation (DAC offset)' operates in the signal flow before the characteristic curve. An offset correction in the form of a velocity (in mm/s, for instance) can be added here.

An offset can be inserted in the signal flow after the characteristic curve with the parameter 'Valve Diagram: Output offset [-1.0 ... 1.0]'. At this point in the signal flow the offset is presented as a percentage value relative to the maximum output magnitude.

Notes:

The hydraulic characteristic curve can only be activated through entry of the table ID when

1) the table has been loaded into the real-time environment

2) controller enable has not been granted for the axis

The parameters described on the drive's analog tab can also be specified by means of ADS commands (sent, for example, from the PLC).

Drive types:

The characteristic curve linearisation described is supported by the following drive types:

  • M2400 DAC 1/ DAC 2 / DAC 3 / DAC 4
  • KL4XXX/KL2503-30K/KL2521
  • Drive (universal)


Introduction

A graphically oriented editor, similar to the cam plate editor, is used to develop the characteristic curve for a hydraulic valve. The Valve Diagram Editor integrated into TwinCAT can be found in the System Manager under the Tables item in the NC Configuration. After choosing Tables in the tree view, the right mouse button can be used to select the Append Table command, and the type of the master can then be selected in the Insert Master window. The Valve Diagram Editor is chosen by selecting Valve Diagram.

Appropriate slaves can be inserted (with the right mouse button) under this. If you then click the master in the tree, the properties pages can be used to set the properties not only of the master, but also of the associated slaves. The structure of master and slave originates in the camshaft editor. Its advantage here is that measurements can be placed into a separate slave, and that these can then be used as a graph in the background for the construction of an idealised characteristic curve.

The user's interface to the Valve Diagram Editor is largely graphical. Following interactive graphic entry of the points in the graphic window, the co-ordinates of the points are displayed in the table window above it. New points can only be inserted in the graph, and it is only possible to delete existing points via the graph. The properties of the points - the co-ordinate values - can also be interactively manipulated in the table window. The points are usually joined to one another by straight lines. The transitions between the straight lines are smoothed by entering a range for the transition (Range). The range can only be modified through the table window.

The cross that displays the intersections of the straight lines is adapted horizontally to the range.
The graphic area allows display not just of the voltage against the velocity, but also of their derivatives.
The mode of the display can be changed by a right mouse click in the graphic window, which opens the following menu:

Thus a separate graphic window is opened for each derivative.


The Properties of the Master

The master's property page

offers the facility that the name of the master can be entered.

In order to import slaves, a right mouse click on the master in the tree view allows the Import Slave... item from the menu

to be selected.

It is possible here to export the master data, including the slave data. It is possible to import this data via the tree view under the Tables item.


The Properties of the Slave

The slave's property page

offers the facility that the name of the slave can be edited. One of the axes can be assigned to the slave.

Import allows files having the format (velocity, voltage) to be read in. The values can then be displayed as cubic splines. The type of the spline still needs to be adjusted in the table, according to the values.

If the Automatic Area Ratio checkbox is activated, a fixed area ratio for the two sides of the piston can be entered in the Area Ratio A/B field. The voltages are then automatically calculated for the B-side, which means that these values can no longer be modified in either the graph or the table.

Choosing Velocity Percent or Absolute makes it possible to work either with percentage velocity or with absolute figures. If Velocity Percent is chosen, then when Velocity A 100% is changed, the velocity values in the diagram are re-scaled in such a way that the percentage values remain constant.

The Table Id provides a unique identifying number (1.0.255) for the table, with the aid of which the table data is stored in the NC. It can be changed using a right mouse click in the menu

with the Change Id... command.

Export Slave... allows the data from a movement diagram to be saved in an export file (*.tce). This data can be imported again under a master.


Graphic Window

The characteristic curve (speed against speed) for the slave and its derivatives are each displayed in a separate graphic window.

The associated toolbar includes both buttons that are only related to the graph

as well as the special commands for the cam plate editor.

The graphic commands are divided into the Input Mode [image] and the zoom and shift commands:

Zoom

Zoom all

Shift (if the Pan outside switch is active in the pop-up menu, it is also possible to shift beyond the limits).
This command only becomes active when the zoom command has been called.

Show/hide Overview Window. This window can only be switched on if you have zoomed into the window.

When the Overview Window is switched on, it is not only possible to see which section the graph window is looking at, but this section can be moved, or it is possible to zoom to a new section.

The horizontal and verticalScrollbars can be used to shift the Graphic Section; the horizontal scrollbar acts on all the graphic windows at the same time.

If you're using an IntelliMouse with a ScrollWheel then you can zoom with the ScrollWheel.

The toolbar and its commands can be displayed or hidden via the menu that is opened by a right mouse click (in the graphic window).

This window also has a horizontal scrollbar if the Horizontal Scrollbar option is activated. All the horizontal scrollbars are synchronised.

The Cross on Point option causes the starting and end points of a movement section to be indicated by a cross.

The Show Online Data displays the table data that are currently in the NC with the associated table ID as a cubic spline. Currently this can result in a distorted display, because the linear tables are displayed as natural splines (second derivative at the edges equals 0). The data is displayed in the same colour, but using a broken line.

The data is automatically transferred by ADS, as soon as Online Mode is switched on. The current data can be read by switching the mode on and off.

When the project is saved in the registry, the information required to generate and transfer the tables is created in the NC.


Table Window

The values for the movement section are displayed in the table window:

Table header | Description
Function | Indicates the function type (see function types)
Velocity | absolute velocity value
Velocity [%] | percentage velocity value
Voltage [%] | percentage voltage
Range | absolute value of the transition range
Range[%] | percentage value of the transition range

The values can be changed through the keyboard. The percentage and absolute values are directly connected, so that changing one of them leads to an immediate corresponding change in the other (once the return key has been pressed or the box has been left).

Function Types

In addition to the standard types (synchronous/automatic), which can be changed by command on the graph, the function type can also be modified in the combobox. When the combobox - or a field in the first column - is first clicked, a rectangle is temporarily shown in the position window, with the initial and end points of the section at its corners. As soon as another field in the table window is activated, either the rectangle for this one is shown, or no rectangle is displayed at all.

The types correspond to those of VDI Guideline 2143; additionally, there are the cubic splines, with the boundary conditions of natural, tangential and periodical.

Type | Description | Boundary condition
Synchronous | Synchronous movement (constant transmission ratio between slave and master, corresponds to normalised velocity) | Constant velocity v, acceleration a=0
Automatic | Automatic adaptation to the boundary values (velocity, acceleration) |
Spline | Internal section of a cubic spline |
Spline Natural | Initial or end section of a natural cubic spline | a=0
Spline Tangential | Initial or end section of a tangential cubic spline |
Spline Periodic | Initial or end section of a cyclic cubic spline |

Changing the type of spline at the first point implies that the spline type as a whole is changed, including that of the end point.


Commands

The valve diagram editor offers the following commands, and these may be called up through the toolbars on the relevant graphic window:

can only be called if

input mode is [image] active for graphic commands.

All these commands are only applicable to the associated window.

Adjustment to the extreme values

The window's co-ordinates are adjusted to the extreme values of the movement

Measurement of distance

The horizontal and vertical distance to the current point from the point first clicked with the left mouse button is displayed at the top right hand corner of the window (please hold the mouse button down for this).

Current position

The absolute horizontal and vertical position of the point currently clicked with the left mouse button is displayed at the top right hand corner of the window (please hold the mouse button down for this).

The following commands only apply in the graphic window for the position:

Horizontal shift

Moves the selected point horizontally

In the velocity window for synchronous functions: shift along a straight line in the position window.

The left-hand edge of the graphic area can be temporarily moved in this way, so that the scale can be more easily read.

Vertical shift

Moves the selected point vertically

Shift

Moves the selected point

Insert point

Inserts a point at the cursor position

Delete point

The selected point is deleted, as is the corresponding section


Example

TS1500 | TwinCAT Valve Diagram Editor

Example:

The procedure for loading measured values and constructing a correspondingly fitted characteristic curve is illustrated here.

To begin with, a new slave is created under the existing master. The measured values can be read in using the Import command on the slave's properties page. Confirm with OK when asked whether the current data should be deleted.

The graphic window is adjusted to match the data that has been read through the Adjust to extreme values command. The measured data is represented as a cubic spline. If the variation in the measured value is too large, this can result in overshoots in the display. This behaviour can be adjusted by manually changing the function type in the table.

The user either now inserts a new slave for the characteristic curve or changes to the existing slave that he wants to modify. The measurements are shown in the background using the Show other Slave command (right mouse button in the graph).

It is now possible to shift the points and zoom the display in order to adapt the current curve to the measurements. As a rule, the measurements do not fill the full range of the characteristic curves, so that the current curve extends beyond the measured values.

If a number of measurements are available, it is possible to store each in a separate slave, and to use the Disabled command in the tree view to hide those not required at the moment in the background of the view.