FAQs (from V3.0)

Here you will find answers to frequently asked questions.

Name

Description

FAQ #1

How do I integrate one or more axes into a PLC application?

FAQ #2

What data has to be created in the PLC application for the axes?

FAQ #3

How do I initialize the data and load the parameters for an axis when the PLC starts?

FAQ #4

How is the actual position of the axes determined?

FAQ #5

How is the control value for an axis created?

FAQ #6

How is the control value for an axis prepared for output?

FAQ #7

How is the control value output to an axis?

FAQ #8

In what order should the function blocks of an axis be called?

FAQ #9

How do I control a valve output stage (on-board or externally)?

FAQ #10

How do I create a message buffer?

FAQ #11

How do I abort monitoring of a function?

FAQ #12

How do I monitor the communication with an I/O device?

FAQ #13

How do I assign my own labels to customer-specific axis parameters?

FAQ #14

How do I control a current valve?

FAQ #15

Which axis variables should be logged with the Scope?

FAQ #16

What is the purpose of the variable nDebugTag in Axis_Ref_BkPlcMc?

FAQ #17

What has to be taken into account when Sercos drives are used?

FAQ #18

How is a pressure or a force determined?

FAQ #19

What has to be taken into account when AX5000 drives are used?

FAQ #20

How do I prepare an axis for blending based on PLC Open?

FAQ #21

How can I access registers of a terminal, to which an encoder or a valve of an axis is connected?

FAQ #22

What is the structure of an ASCII file for a linearization table?

FAQ #23

How can PlcMcManager commands be blocked?

FAQ #24

What format do import/export files with characteristic curve data have?

Setup

How is operation of the axis begun, and how is it optimized?

FAQ #1 How do I integrate one or more axes into a PLC application?

The procedure here differs fundamentally from an axis guided by the NC task, because in this case everything done by the NC task is performed by the PLC. Ready-made function blocks are, however, available in most areas, so that the additional programming effort is held within reasonable limits. The following particular points must be considered:

FAQs (from V3.0) 1:

If only the usual blocks (encoder, generator, finish, drive) for the axis are to be called, a block of type MC_AxStandardBody_BkPlcMc should be used for simplicity.

FAQ #2 What data has to be created in the PLC application for the axes?

For each axis, one variables of each type Axis_Ref_BkPlcMc, ST_TcPlcDeviceInput and ST_TcPlcDeviceOutput has to be created. The use of variable fields is highly recommended for multiple axes. Examples for one and five axes can be found in the first sample programs.

The procedure using MC_AxUtiStandardInit_BkPlcMc function blocks shown in these examples ensures correct initialization on start-up of the PLC and initiates loading of the axis parameters from files.

Further data are required for realizing message logging. See also FAQ #10.

Further data are required for assigning one's own IDs to customer-specific axis parameters in the PlcMcManager. See also FAQ #13

Further data are required in order to utilize blending according to PLC Open. See also FAQ #20.

FAQ #3 How do I initialize the data for an axis?

A number of initializations must be carried out when the PLC applications starts. This is best done in three stages, which are provided by an MC_AxUtiStandardInit_BkPlcMc function block and should only be realized directly by the application in special cases. They are described here only for the sake of completeness.

  1. A number of pointers must be correctly set up to link the components of the axes together. This task should be solved with a function block of type MC_AxUtiStandardInit_BkPlcMc, which detects a shift or change in size in the memory or the change of a type code during a subsequent online change and then ensures that the pointers are reinitialised and the parameters are reloaded.
  2. The parameters for the axis must be appropriately set. Although it would be technically possible for the application to do have these assignments hard-coded, this is not usually helpful. It is preferable to save the settings in files, which are loaded on system startup under control of the application through the MC_AxUtiStandardInit_BkPlcMc function block. Notes on setting up an axis can be found under Setup.
  3. The task cycle time should be applied in the axis parameters. This should be done at the end of the parameter loading procedure, in order to set this value correctly, in view of the fact that it is important for the function of many function blocks. An MC_AxUtiStandardInit_BkPlcMc function block deals with this task automatically.
FAQs (from V3.0) 2:

If a function block of type MC_AxAdsCommServer_BkPlcMc is used in the application, the function block must be called in the same task that carries out the pointer assignments. If this is not possible, or for some reason difficult, then calling the function block must be prevented while the assignments are being carried out. The result, otherwise, can be that the PLC application crashes as a result of serious runtime errors (Page Fault Exception).

FAQs (from V3.0) 3:

All activities listed here should through be realized and coordinated by an MC_AxUtiStandardInit_BkPlcMc function block. If the nInitState variable in Axis_Ref_BkPlcMc of the axis adopts either the value 2 or -2, then the initialization has been successful or has ended with an error. If the initialization is successful, MC_AxUtiStandardInit_BkPlcMc.Ready and bParamsEnable in Axis_Ref_BkPlcMc are TRUE, otherwise this variable remains FALSE.

FAQs (from V3.0) 4:

The sample programs provided specify the name of the axis and the name (included the path) of the corresponding parameter file. It is essential that these specifications are modified to match the particular application.

FAQ #4: How is the actual position of the axes determined?

A range of signal transducers may be considered for use as position sensors, operating according to a variety of physical principles to generate a position-dependent electrical magnitude. This magnitude determines the type of I/O components that must be used. The variables of types ST_TcPlcDeviceInput and ST_TcPlcDeviceOutput must be created for each axis, and contain elements that are to be linked to the actual value, counter, latch, control and status variables associated with the I/O hardware.

Here are a few examples:

I/O component

Signal

Encoder Type

AX2000 B110 with absolute encoder

EtherCAT

iTcMc_EncoderAx2000_B110A

AX2000 B110 with resolver

EtherCAT

iTcMc_EncoderAx2000_B110R

AX2000 B200 with resolver

EtherCAT

iTcMc_EncoderAx2000_B200R

AX2000 B750 with absolute encoder

EtherCAT

iTcMc_EncoderAx2000_B750A

AX2000 B900 with resolver

EtherCAT

iTcMc_EncoderAx2000_B900R

AX5000 B110 with multi-turn absolute encoder

EtherCAT

iTcMc_EncoderAX5000_B110A

EtherCAT servo controllers with CoE DS402 support and
multi-turn encoder

EtherCAT

iTcMc_EncoderCoE_DS402A

EtherCAT servo controllers with CoE DS402 support and resolver or single-turn encoder

EtherCAT

iTcMc_EncoderCoE_DS402SR

EL3102

-10V .. 10V

iTcMc_EncoderEL3102

EL3142

0mA .. 20mA

iTcMc_EncoderEL3142

EL3162

0 .. 10V

iTcMc_EncoderEL3162

EL3255

Potentiometric displacement transducer

iTcMc_EncoderEL3162

EL5001

SSI

iTcMc_EncoderEL5001

EL5101

A/B increments, RS422="TTL"

iTcMc_EncoderEL5101

EL7041

A/B increments, RS422="TTL"

iTcMc_EncoderEL7041

EtherCAT encoder with CoE_DS406 profile

EtherCAT

iTcMc_EncoderCoE_DS406

IE5009

SSI

iTcMc_EncoderIx5009

IP5009

SSI

iTcMc_EncoderIx5009

KL10xx

2 bit, A/B increments

iTcMc_EncoderDigIncrement

KL11xx

2 bit, A/B increments

iTcMc_EncoderDigIncrement

KL12xx

2 bit, A/B increments

iTcMc_EncoderDigIncrement

KL13xx

2 bit, A/B increments

iTcMc_EncoderDigIncrement

KL14xx

2 bit, A/B increments

iTcMc_EncoderDigIncrement

KL17xx

2 bit, A/B increments

iTcMc_EncoderDigIncrement

KL10xx

4 bit, position cams

iTcMc_EncoderDigCam

KL11xx

4 bit, position cams

iTcMc_EncoderDigCam

KL12xx

4 bit, position cams

iTcMc_EncoderDigCam

KL13xx

4 bit, position cams

iTcMc_EncoderDigCam

KL14xx

4 bit, position cams

iTcMc_EncoderDigCam

KL17xx

4 bit, position cams

iTcMc_EncoderDigCam

KL2521

Pulse Train

iTcMc_EncoderKL2521

KL2531

Stepper motor, direct (encoder emulated through pulse counter)

iTcMc_EncoderKL2531

KL2541

Stepper motor, direct (with encoder or encoder emulates through pulse counter)

iTcMc_EncoderKL2541

KL2542

DC motor, direct with encoder

iTcMc_EncoderKL2542

KL3001

-10V .. 10V

iTcMc_EncoderKL3002

KL3002

-10V .. 10V

iTcMc_EncoderKL3002

KL3011

0mA .. 20mA

iTcMc_EncoderKL3042

KL3012

0mA .. 20mA

iTcMc_EncoderKL3042

KL3021

4mA .. 20mA

iTcMc_EncoderKL3042

KL3022

4mA .. 20mA

iTcMc_EncoderKL3042

KL3041

0mA .. 20mA

iTcMc_EncoderKL3042

KL3042

0mA .. 20mA

iTcMc_EncoderKL3042

KL3044

0mA .. 20mA

iTcMc_EncoderKL3042

KL3051

4mA .. 20mA

iTcMc_EncoderKL3042

KL3052

4mA .. 20mA

iTcMc_EncoderKL3042

KL3054

4mA .. 20mA

iTcMc_EncoderKL3042

KL3061

0V .. 10V

iTcMc_EncoderKL3062

KL3062

0V .. 10V

iTcMc_EncoderKL3062

KL3064

0V .. 10V

iTcMc_EncoderKL3062

KL3162

0V .. 10V

iTcMc_EncoderKL3162

KL5001

SSI

iTcMc_EncoderKL5001

KL5101

A/B increments, RS422="TTL"

iTcMc_EncoderKL5101

KL5111

A/B increments, RS422="HTL"

iTcMc_EncoderKL5111

M2510

-10V .. 10V

iTcMc_EncoderM2510

M3100

A/B increments, RS422="TTL"

iTcMc_EncoderM3120

M3120

A/B increments, RS422="TTL"

iTcMc_EncoderM3120

If one of the components mentioned here is used, then one of the encoder function blocks provided will usually be applied. The interfaces of these function blocks are not guaranteed and should therefore not be called directly by the application. It is better to set the encoder type according to the constants in E_TcMcEncoderType under nEnc_Type in ST_TcHydAxParam, and to use a function block of type MC_AxRtEncoder_BkPlcMc. This then automatically calls the correct type of sub-function-block for the type concerned.

All encoder function blocks use the parameters fEnc_IncWeighting and fEnc_IncInterpolation as increment assessment. fEnc_ZeroShift is also used as a zero shift for absolute displacement sensors. Incremental sensors usually require a reference travel using a MC_Home_BkPlcMc function block, during which fEnc_RefShift in ST_TcHydAxRtData is determined. This value then does the job of the zero shift. It goes without saying that in special cases the zero shift can also be defined with an MC_SetPosition_BkPlcMc function block. The referenced status of the axis should be defined with MC_SetReferenceFlag_BkPlcMc().

If it is not possible to determine the actual position with function blocks from the library for technical reasons, this task can be handled by application function blocks, and the result can be entered in fActPos, and fActVelo can be entered in ST_TcHydAxRtData, if required. For the sake of uniformity use should again be made here of the fEnc_IncWeighting, fEnc_IncInterpolation and fEnc_ZeroShift or fEnc_RefShift parameters.

FAQs (from V3.0) 5:

If only the usual function blocks (encoder, generator, finish, drive) for the axis are to be called, a function block of type MC_AxStandardBody_BkPlcMc should be used for simplicity.

FAQs (from V3.0) 6:

Commissioning of an actual pressure determination with function blocks of type MC_AxRtReadPressureSingle_BkPlcMc or MC_AxRtReadPressureDiff_BkPlcMc is described in the documentation for the function block.

FAQ #5: How is the control value for an axis created?

In each cycle, the PLC application must call a function block of type MC_AxRuntime_BkPlcMc, or alternatively a suitable controller function block (e.g. a pressure regulator) for each axis. The parameter nProfileType in ST_TcHydAxParam specifies the procedure that is to be used to generate the control value. Velocity control values are calculated here according to the type, and depending on other parameters associated with the axis and on the movement data. These control values are, however, normalized to the abstract numerical range ±1.0, and have not yet been prepared for immediate output to I/O hardware.

FAQs (from V3.0) 7:

If only the usual function blocks (encoder, generator, finish, drive) for the axis are to be called, a function block of type MC_AxStandardBody_BkPlcMc should be used for simplicity.

FAQ #6: How is the control value for an axis prepared for output?

After calling the MC_AxRuntime_BkPlcMc function block, a function block of type MC_AxRtFinish_BkPlcMc must be called for each axis. This function block assembles a number of velocity components (control value, controller output, offset compensation, overlap compensation), and also takes into account in the bends in the feed forward characteristic curve.

Numerical adjustment is usually necessary prior to output to an I/O module. An MC_AxRtDrive_BkPlcMc function block is to be called for each axis for this purpose. The value of nDrive_Type in ST_TcHydAxParam selects the hardware-specific sub-function-block to be used.

The variables of types ST_TcPlcDeviceInput and ST_TcPlcDeviceOutput must be created for each axis, and contain elements that are to be linked to the set value and control variables of the I/O hardware.

FAQs (from V3.0) 8:

If only the usual function blocks (encoder, generator, finish, drive) for the axis are to be called, a function block of type MC_AxStandardBody_BkPlcMc should be used for simplicity.

FAQ #7: How is the control value output to an axis?

A range of devices and equipment might be functioning as actuators, applying a variety of physical principles to create a variable velocity that depends on an electrical magnitude. This magnitude determines the type of I/O components that must be used. The variables of types ST_TcPlcDeviceInput and ST_TcPlcDeviceOutput must be created for each axis, and contain elements that are to be linked to the variables of the I/O hardware.

Here are a few examples:

I/O component

Signal

Drive Type

AX2000 B110 with absolute encoder

EtherCAT

iTcMc_DriveAX2000_B110A

AX2000 B110 with resolver

EtherCAT

iTcMc_DriveAX2000_B110R

AX2000 B200 with resolver

EtherCAT

iTcMc_DriveAX2000_B200R

AX2000 B750 with absolute encoder

EtherCAT

iTcMc_DriveAx2000_B750A

AX2000 B900 with resolver

EtherCAT

iTcMc_DriveAX2000_B900R

AX5000 B110 with absolute encoder

EtherCAT

iTcMc_DriveAX5000_B110A

EtherCAT servo controllers with CoE DS402 support and resolver, single-turn or multi-turn encoder

EtherCAT

iTcMc_DriveCoE_DS402

EtherCAT valve with CoE_DS408 profile

EtherCAT

iTcMc_Drive_CoE_DS408

EL2535

PWM

iTcMc_DriveEL2535

EL4031, EL4032, EL4034, EL4038
EL4131, EL4132, EL4134

-10 V .. 10 V

iTcMc_DriveEL4132

EL4011, EL4012, EL4014, EL4018,
EL4112
EL4021, EL4022, EL4024,
EL4028,
EL4122, EL4124

0..20 mA

 

4..20 mA

iTcMc_DriveEL4x22

EL7031

Stepper motor, direct

iTcMc_DriveEL7031

EL7041

Stepper motor, direct

iTcMc_DriveEL7041

IE2512

PWM

iTcMc_DriveIx2512_1Coil

iTcMc_DriveIx2512_2Coil

IP2512

PWM

iTcMc_DriveIx2512_1Coil

iTcMc_DriveIx2512_2Coil

KL20xx, KL21xx, KL22xx, KL24xx

5 bit for operating a frequency converter with fixed frequencies

iTcMc_DriveLowCostInverter

KL20xx, KL21xx, KL22xx, KL24xx

4 bit for operating a voltage-controlled stepper motor

iTcMc_DriveLowCostStepper

KL2521

Pulse Train

iTcMc_DriveKL2521

KL2531

Stepper motor, direct

iTcMc_DriveKL2531

KL2532

DC motor, direct with encoder

iTcMc_DriveKL2532

KL2535

PWM

iTcMc_DriveKL2535_1Coil

iTcMc_DriveKL2535_2Coil

KL2541

Stepper motor, direct

iTcMc_DriveKL2541

KL2542

DC motor, direct with encoder

iTcMc_DriveKL2542

KL4031

-10 V .. 10 V

iTcMc_DriveKL4032

KL4032

-10 V .. 10 V

iTcMc_DriveKL4032

KL4034

-10 V .. 10 V

iTcMc_DriveKL4032

M2400

-10 V .. 10 V

iTcMc_DriveM2400_D1, iTcMc_DriveM2400_D2, iTcMc_DriveM2400_D3, iTcMc_DriveM2400_D4

If one of the components mentioned here is used, then one of the drive function blocks provided will usually be used. These interfaces of these function blocks are not guaranteed and should therefore not be called directly by the application. It is better to set the drive type according to the constants in E_TcMcDriveType under nDrive_Type in ST_TcHydAxParam, and to use a function block of type MC_AxRtDrive_BkPlcMc.

FAQs (from V3.0) 9:

If only the usual function blocks (encoder, generator, finish, drive) for the axis are to be called, a function block of type MC_AxStandardBody_BkPlcMc should be used for simplicity.

FAQ #8: In what order should the function blocks of an axis be called?

  1. Obligatory: all function blocks, which detect the actual status of the axis. These include function blocks of types MC_AxRtEncoder_BkPlcMc, MC_AxRtReadPressureDiff_BkPlcMc or MC_AxRtReadPressureSingle_BkPlcMc.
  2. Usual: function blocks or commands, which update the enable signals of the axis. This is usually a function block of type MC_Power_BkPlcMc. For axes with an incremental encoder, which is referenced using a cam, a function call MC_AxRtSetReferencingCamSignal_BkPlcMc is used in addition.
  3. Optional: Function blocks, which derive a decision or trigger a command based on an actual axis status, an I/O signal or an application signal. For example, an axis start can be triggered in response to the signal of a proximity limit switch, or an axis movement can be stopped before the target position is reached, depending on the pressure increase.
  4. Obligatory: Control value generators such as function blocks of type MC_AxRuntime_BkPlcMc.
  5. Optional: Various controllers can be called at this point, as required. This can be a function block of type MC_AxCtrlSlowDownOnPressure_BkPlcMc or similar.
  6. Obligatory: An adaptation function block of type MC_AxRtFinish_BkPlcMc.
  7. Optional: If required, a function block for the automatic commissioning can be called at this point.
  8. Obligatory: An output function block of type MC_AxRtDrive_BkPlcMc.

Instead of the library function blocks, application function blocks can be used. However, one should check carefully whether this is necessary, in which case compatibility with the library must be ensured. In some applications this may become necessary, in order to adapt a non-standard sensor or actuator, or to solve a special control task.

FAQ #9: How do I control a valve output stage (on-board or externally)?

The ST_TcPlcDeviceOutput structure is intended for the bPowerOn and bEnable signals and for controlling the output stage supply and activation. Both signals are set by function blocks of type MC_Power_BkPlcMc, if the input Enable is set. At the same time this function block sets the software controller enable in ST_TcHydAxRtData.nDeCtrlDWord.

The ST_TcPlcDeviceInput structure is intended for the signals bPowerOk, bEnAck and bReady for the output stage supply control, feedback from the output stage activation and the status signal. The differences in the signals provided by different manufacturer can be very significant. Currently, only the bPowerOk signal is used for specifying the Status output of the MC_Power_BkPlcMc function block. If no suitable signal is available, or if no monitoring is to be realised, ST_TcHydAxParam.bDrive_DefaultPowerOk should be set.

FAQ #10: How do I create a message buffer?

Direct output of messages from the function blocks would result in runtime variations that would be difficult to calculate. For this reason, the messages are stored in a buffer and output in the Windows Event Viewer one after another, if required.

In order to be able to use a message buffer, a variable of type ST_TcPlcMcLogBuffer must be created. This buffer is used to hold the messages from all axes. It is important that only one such variable is created in the project, irrespective of the number of axes. The address of this buffer should be transferred to the MC_AxUtiStandardInit_BkPlcMc function blocks of all axes, together with the addresses of the other individual axis components. This function blocks are usually called in the initialization part of the project. This address is stored in the element pStAxLogBuffer in the structure Axis_Ref_BkPlcMc and by the function block.

nLogLevel in Axis_Ref_BkPlcMc is used to specify the significance level threshold for storing messages in the buffer. The values to be used are defined in the global variables of the library. Note that this setting is required for each axis.

The library function blocks detect the preparations mentioned above and will commence issuing messages. However, if the message output is enabled, the buffer would fill up quickly and not accept further messages. There are two ways to avoid this.

FAQ #10.1: Passing on messages to the Windows Event Viewer

In order to transfer messages from the LogBuffer of the library to the Windows Event Viewer, a function block of type MC_AxRtLoggerSpool_BkPlcMc should be called cyclically. Witch each call a message is removed from the LogBuffer.

FAQs (from V3.0) 10:

Computers running Windows CE are also capable of amending an Event Viewer for the messages created by TwinCAT. To this end this service is emulated by the TwinCAT system service. However, usually only a flash disk will be available. In order to avoid overloading the relatively small message capacity of the Event Viewer, only errors should be logged.

FAQ #10.2: Deleting the oldest messages

In order to ensure a minimum number of messages that can be handled, a function block of type MC_AxRtLoggerDespool_BkPlcMc should be called cyclically. With each call, this function block removes the oldest message from the LogBuffer, until a transferred number of free messages is available. The deleted messages are lost.

FAQ #10.3: Generating logger entries through the application

An application can output a message either axis-related or non-axis-related. The function blocks MC_AxRtLogAxisEntry_BkPlcMc and MC_AxRtLogEntry_BkPlcMc are available for this purpose.

FAQ #10.4: Library-internal message buffer

A cyclic call to the MC_Communications_BkPlcMc function block uses a library-internal message buffer. For this purpose, the MC_Communications_BkPlcMc function block references the internal message buffer in the transferred axes and calls the MC_AxRtLoggerSpool_BkPlcMc function block. A message buffer created in the PLC application is no longer required here. In addition, the message buffer referenced when calling MC_AxUtiStandardInit_BkPlcMc is ignored when calling the MC_Communications_BkPlcMc function block.

FAQ #11: How do I abort monitoring of a function?

Some library function blocks start an activity, for which cyclic calling is no longer essential. However, these function blocks are also structured according to the rules of the PLCopen Motion Control guidelines in such a way that they fully monitor the activity and present it at their outputs. This is indicated by the output Busy, which most function blocks provide.

Omitting the cyclic call of a function block that is in this monitoring state would usually result in significant problems. The next function start with the respective function block would have problems with evaluating the edges at its inputs, or it would detect that meanwhile the axis has executed another function and indicated a problem that doesn't exist (CommandAborted).

In older versions of the library a function block of type MC_AxUtiCancelMonitoring_BkPlcMc() was provided, which for a few motion functions aborted the monitoring by the function block initiating the function. This function block is no longer required, in view of the fact that in the meantime the PLC Open rules have been implemented more fully.

To instruct a function block to terminate monitoring its function, in most cases it is sufficient to call it once or several times with Execute:=FALSE. This applies in particular to MC_MoveAbsolute_BkPlcMc(), MC_MoveRelative_BkPlcMc() and MC_MoveVelocity_BkPlcMc().

Subsequently, a new functionality can be started in same or a later cycle with the same function block or an instance of the same or another type. This procedure can be repeated as required.

FAQs (from V3.0) 11:

Complex functions composed of several sub-actions, such as MC_Home_BkPlcMc(), require the continuous calling of the function block as the latter organizes the required processes itself ( MC_Home_BkPlcMc ())

FAQ #12: How do I monitor the communication with an I/O device?

ST_TcPlcDeviceInput and ST_TcPlcDeviceOutput variables provide an element with the name uiBoxState. If the Bus Couplers or the interface cards of the power units used offer a corresponding variable and the variable assumes the value 0 with undisturbed communication in the fieldbus used, a link should be created. This is possible, for example, with Beckhoff Lightbus and Real-time Ethernet. If an MC_Power_BkPlcMc function block is used for the axis, the function block monitors the uiBoxState and reports problems with the communication. In such a case the axis is put in an error state.

EtherCAT offers enhanced options.

FAQ #13: How do I assign my own labels to customer-specific axis parameters?

The Axis_Ref_BkPlcMc structure uses the pAuxLabels pointer to support the application of an array of texts, which are displayed by the PlcMcManager. These texts can be loaded by the MC_AxUtiStandardInit_BkPlcMc function block when the application is started from a file. To this end this function block must be provided with the address of an ST_TcMcAuxDataLabels variable and a suitable file.

It goes without saying that it is also possible to define the elements of the ST_TcMcAuxDataLabels variable through direct assignment from the application. In this case, the file is not required.

FAQs (from V3.0) 12:

A number of controller function blocks of the library define the arrays texts automatically.

FAQ #14: How do I control a current valve?

In contrast to a 4/2 or 3/2 directional proportional valve or a servo-valve, a current valve is controlled with a 0..10 V signal (if a valve output stage is present) or actuated with a load-independent current of 0...INominal. In this control, only the magnitude of the velocity is transferred. The direction is transferred not with the sign, but by other means. This usually requires digital signals, which are used for controlling switching valves. The ST_TcPlcDeviceOutput structure provides elements such as bBrakeOff, bMovePos and bMoveNeg for this purpose. For generating an absolute control value, bDrive_AbsoluteOutput should be set in the axis parameters.

FAQs (from V3.0) 13:

This also enables the use of conventional frequency converters with asynchronous motor, encoder and brake, if the converter provides an analog input.

FAQ #15: Which axis variables should be logged with the Scope?

The following signal composition is recommended:

FAQs (from V3.0) 14:

The signal selection in ScopeView is simplified if the Axis_Ref_BkPlcMc variables contain a name that begins with aaa_. This approach is used in the sample programs and ensures that the variables can be found quickly in the symbol list.

FAQs (from V3.0) 15:

In the signal composition of ScopeView, channels can be temporarily disabled. In this way it is possible to maintain a comprehensive configuration but limit logging to data that are currently of interest.

FAQ #16: What is the purpose of the variable nDebugTag in Axis_Ref_BkPlcMc?

FAQs (from V3.0) 16:

This variable exists in some versions. It has no meaning for the PLC project.

This variable is used by nearly all library function blocks to store a unique ID for the duration of their execution. To this end the content that was found is stored in a local variable of the function block and restored immediately before the function block is exited.

Should the program crash, or if there is a suspicion that there was a problem in a library function block, the nDebugTag variables of all axes should be checked. If a value <> 0 is present, the function block was affected by the crash, and the reason should be investigated. The numeric values used are listed in the library under "Global constants". In addition, the contents of ST_TcHydAxRtData.sTopBlockName should be determined. Usually, the name of the function block called directly by the application can be found here.

FAQ #17: What has to be taken into account when Sercos drives are used?

If Sercos drives (from V3.0.26) are used, the following rules must be followed:

FAQ #18: How is a pressure or a force determined?

To determine an actual pressure or an actual force, one or several function blocks of types MC_AxRtReadPressureDiff_BkPlcMc, MC_AxRtReadForceDiff_BkPlcMc, MC_AxRtReadForceSingle_BkPlcMc or MC_AxRtReadPressureSingle_BkPlcMc have to be called for each axis. Details for the call sequence can be found under FAQ #8.

The AD converter values to be transferred to the function blocks have to be linked with allocated variables of the application. Details regarding selection and parameterization can be found in the function blocks descriptions.

FAQ #19: What has to be taken into account when AX5000 drives are used?

For AX5000 devices, a number of IDNs are read from the device, and a number of different parameters are calculated automatically.

IDN

Used for parameter

44

Reference velocity, internally: scaling of the velocity output

45

Internal: scaling of the velocity output

46

Internal: scaling of the velocity output

76

Encoder interpolation

79

Encoder interpolation

91

Reference velocity

The following parameters are thus set automatically and cannot be influenced via the PlcMcManager:

Parameter

 

influences which other parameters

Global: reference velocity

Calculated from the maximum speed of the device and the revolutional feed rate

Manuel velocities, max. appl. velocity

Encoder: inc. interpolation

Read from IDN79 of the device

Attention: the revolutional feed rate has to be entered as inc. evaluation

FAQ #20: How do I prepare an axis for blending based on PLC Open?

In Hydraulik.lib it is possible to command up to 12 buffered movements. For this purpose, a command buffer of type ST_TcPlcCmdCmdBuffer_BkPlcMc must be passed to the MC_AxUtiStandardInit_BkPlcMc function block for updating the axis reference and a function block MC_AxRtCmdBufferExecute_BkPlcMc must be called cyclically.

If Move function blocks such as MC_MoveAbsolute_BkPlcMc, MC_MoveRelative_BkPlcMc or MC_MoveVelocity_BkPlcMc are now activated, they enter their data in the command buffer.

In buffered mode make sure that the Move function blocks and the MC_AxRuntime_BkPlcMc function block of the axis run in a PLC task.

Transition between a slow and a fast section.

FAQs (from V3.0) 17:

Transition between a fast and a slow section.

FAQs (from V3.0) 18:

FAQ #21: How can I access registers of a terminal, to which an encoder or a valve of an axis is connected?

For register communication with terminals to which the encoder or the valve of an axis is connected, it is recommended to use function blocks of types MC_AxUtiReadRegDriveTerm_BkPlcMc(), MC_AxUtiReadRegEncTerm_BkPlcMc(), MC_AxUtiWriteRegDriveTerm_BkPlcMc() and MC_AxUtiWriteRegEncTerm_BkPlcMc().

FAQ #22: What is the structure of an ASCII file for a linearization table?

The format of an ASCII file from a linearization table is specified as follows:

Example: The following (idealized) table describes a cylinder, which in negative direction only reaches half the velocity of the positive direction due to asymmetric effective areas (due to single-sided piston rod). It is assumed that the cylinder is operated with a zero overlap valve with a bend in the characteristic curve at 40%

Normalized velocity

Normalized output

-0.500

-1.000

-0.430

-0.900

-0.360

-0.800

-0.290

-0.700

-0.220

-0.600

-0.150

-0.500

-0.080

-0.400

-0.060

-0.300

-0.040

-0.200

-0.020

-0.100

0.000

0.000

0.040

0.100

0.080

0.200

0.120

0.300

0.160

0.400

0.300

0.500

0.440

0.600

0.580

0.700

0.720

0.800

0.860

0.900

1.000

1.000

FAQ #23: How can PlcMcManager commands be blocked?

In some situations the triggering of commands by the PlcMcManager can be problematic. This would be the case if a certain sequence of actions has to be processed completely, for example. In order to prevent inadvertent issuing of commands by the PlcMcManager in such cases, the MC_AxRtCommandsLocked_BkPlcMc function can be used to enter a lock in the status double word of the axis. If this lock is active, any command sent by PlcMcManager sent is rejected with a write protection error.

FAQs (from V3.0) 19:

It is essential to remove the lock, once the action to be protected has been processed. This also and in particular applies in the event of errors.

An example is available.

FAQ #24: What format do files with characteristic curve data have?

If an axis is equipped with components for a characteristic curve-controlled linearization, the interpolation points can be exported to a file using a function block of the type MC_LinTableExportToAsciiFile_BkPlcMc(). The function block MC_LinTableImportFromAsciiFile_BkPlcMc() is available if such data are to be imported from a file created or modified in this way or in other ways.

So that such files can be used, the following format must be strictly adhered to.