×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 21780055, Entry date: 07/15/2005
(1)
Rate

Technology CPUs: Diagnostics of an axis with Technology variables

  • Entry
  • Associated product(s)

Diagnostics of an axis with Technology variables
When, for example, the parameters of an axis are to be changed during commissioning, the S7T Config trace function provides extensive support.
In order to implement the trace function usefully, for example, with the different setpoint and actual values, it is advisable to have an overview of the setpoint value channel and the controlling structure of the CPU 31xT. In this overview we demonstrate where and how Technology variables are processed.

Setpoint value channel
In particular in the case of superimposed functions, the setpoint values are made up of different components. Then it is of course decisive whether, for example, the basic motion, the superimposed motion or the resulting overall motion is to be analyzed for trace recording.
Basically the variables of the basic motion are in the structure "basicMotion", and those of the superimposed motion in the structure "superimposedMotion". The resulting setpoint position is in the structure "positioningState"; speed and acceleration in the structure "motionState".
These values are updated in the runtime level IPO cycle (interpolation cycle).


Fig. 1: Technology variables in the setpoint value channel

 

The function blocks for active motion of an axis have effect at different points of the setpoint channel.

Basic functions
These include all positioning jobs (e.g.: MC_MoveAbsolute). They only have effect on the basic motion of the axis. When you start a basic function, all the running basic and superimposed jobs are terminated. There is a smooth transition to the new job. When a superimposed motion is interrupted, all the current values for position, speed and acceleration of the superimposed variables are calculated into the basicMotion start conditions.

Superimposed functions
Here there is only the FB MC_MoveSuperImposed. The start of this function has no influence on the basic functions that are running.

Synchronous operation in the basic system
The FBs for synchronous operation in the basic system serve to start, change or terminate synchronous operation of a drive or cam. Here the setpoint values are not influenced in the axis directly, but in the assigned synchronous operation object. From there they then enter the basicMotion structure of the axis. When you start synchronous operation in the basic system, all the running motions are terminated just as for the basic functions.

Synchronous operation in the superimposed system
The functions of the superimposed synchronous operation have an influence on a second synchronous operation object. When you start such a function, it has no influence on the basic functions. A running MC_MoveSuperImposed job however is superseded.

The behavior described here when jobs are superseded is the standard setting that can be changed via the experts list for special applications.

Controlling structure
The functions required for position controlling of the axes are processed in the runtime level "Servo". The variables required for the analysis are mainly in the structure "servodata".

Depending on the drive being used, there are two position control procedures available:

  • Position controlling takes place in the CPU. Due to the delays in the communication, long dead times occur in the position control loop.
  • The connected drive supports the DSC procedure. Here position controlling takes place in the drive. With this procedure you can also realize highly dynamic applications.

Since with the CPU 317T or CPU 315T drives are only ever connected remotely via PROFIBUS, the delays due to the communications must always be taken into account. In the CPU therefore, setpoint and actual positions always come from different scan times. The simple difference between the two values never gives a real following error.

The servo block (Fig. 2) has the setpoint position as input. General limitations and filter functions are not taken into account in this simplified view.


Fig. 2: Position controlling in the CPU (simplified structure)

 

The setpoint position can include an offset with respect to the variables of the associated axis DB or of the structure positioningState. If you set or correct position values in running operation, this offset changes, because the position correction is not used in the servo block.

Example:

An axis is at Position 500.
positioningState.actualPosition  = 500
positioningState.commandPosition  = 500
servoData.actualPosition   = 500.

With the function MC_Home the position of the axis is reduced by 100 (Mode = 4; Position = 100). Then the following values are set:
positioningState.actualPosition = 400
positioningState.commandPosition = 400
servoData.actualPosition = 500.

The speed precontrol value comes from the differentiation of the setpoint position and weighting with kpc ("TypeOfAxis.NumberOfDataSets.DataSet1.ControllerStruct.PV_Controller.kpc"). Compensation values can also come into play, for example through friction compensation (temporary supplementary setpoint value to overcome static friction).
In order to check the effect of the precontrol or the correct scaling, you can greatly reduce the influence of the position controlling. For this you must set the position controlling gain kv to very low values. This test procedure is independent of whether the position controlling takes place in the CPU or in the drive.
The position setpoint value goes through a symmetry filter whose filter time constants are set to very small values for standard applications (<< 20ms) and are practically ineffective. Using this filter you can optimize the overshoot behavior of the position controlling in highly dynamic applications. The filter is only effective when you work with precontrolling.

Position controlling in the CPU
If position controlling takes place in the CPU, then the output of the position controller (servodata.ControllerOutput) is a result of the position difference servodata.controllerDifference and the position controlling gain kv. The position controller output is added to the precontrols and forwarded to the drive as speed setpoint.

DSC procedure
In the DSC procedure (Fig. 3) the speed precontrol (NSOLL_B), position controlling gain (KPC) and the difference between setpoint position and actual position (XERR) are sent to the drive as signals relevant to position controlling. The drive forms the actual position setpoint value from the XERR signal. Position controlling takes place in the drive.


Fig. 3: Position controlling structure using the DSC procedure (simplified structure)

 

Using the DSC procedure the effective following error "servodata.followingError" is simulated in the controller.

Observing Technology variables with the trace function
Using the Trace Tool of S7T Config you can record and store signal paths and values of the technology variables. You can display and edit the recorded measurements in a diagram.
Before starting the Trace Tool you must put S7T Config in Online Mode and load the technology into the PLC.

In the Navigator mark the technology and select the menu command PLC > Trace, to start the Trace Tool. Via Trace signal selection (Fig. 4) you select the technology variable and assign it to the recording channels.


Fig. 4: Selecting the technology variables (Trace)

 

Note:
More information on the Trace Tool is available in the manual "S7 Technology", section 8.7 "Testing with the Trace Tool", in Entry ID 30119663.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.