PLCopen axis state model

In addition to the axis state model of PLCopen, there is a further state for the torque control mode. At present, the state Disabled is not implemented completely. The following figure shows the possible transitions.

Figure 1-1: Extended PLCopen axis state model


Measurement of axis positions

Detection of positions independently of the interpolation or position control clock is necessary to realise precise positioning dependent on a measured event. In a control system, this can only be realised by additional hardware for latching the positions. This additional hardware is generally in a system close to the drive, if not directly in the drive itself. The function blocks MC_TouchProbe and MC_AbortTrigger make it possible to use this functionality.

More:

button Data structure TRIGGER_REF

button Behaviour of MC_TouchProbe and MC_AbortTrigger

button Measurement parameter definition in the axis-specific machine data


Data structure TRIGGER_REF

Via a structure variable of type TRIGGER_REF the measurement parameter are passed to an instance of the FB MC_TouchProbe or MC_AbortTrigger. The structure variable consists of the measuring channel number (element tp_channel) an the mode (element tp_mode). The mode defines whether measurement is triggered by the rising or falling edge of the trigger signal. The following values are permissible for the mode:

Falling edge of the trigger signal | 1
Rising edge of the trigger signal | 2

The data structure TRIGGER_REF is already declared in the supplied library.


Behaviour of MC_TouchProbe and MC_AbortTrigger

q Contrary to the motion commands, retriggering of a MC_TouchProbe or MC_AbortTrigger instance does not lead to an overwriting of the previous command, but instead, the new command is discarded by the FB and no new command is sent. The retriggered FB instance indicates an FB-specific error and remains ACTIVE. At the FB outputs "Error and ErrorID, a signal is output for one PLC cycle with which retriggering can be detected. If either AXIS_REF or die TRIGGER_REF has changed at the time of retriggering, this is indicated as an error at the aforementioned FB outputs and the command is also rejected.

q The "CommandAborted" output can only be set if the command has been explicitly aborted by an MC_AbortTrigger. To abort a measurement command, it must use the identical measurement channel number and mode in TRIGGER_REF, because a measurement command is exclusively identified based on agreement of all TRIGGER_REF parameters.

q Contrary to the motion commands, a measurement command does not lead to a change in the axis status. As PLCopen does not specify in what states MC_TouchProbe is permissible, it is defined that this is permissible in all states except ERROR_STOP and HOMING.

q For a measurement channel a separate state diagram is used. The current state is administered in tp_state of the AXIS_REF structure of the axis, that was commanded with the measurement instruction.

Figure 1-2: State diagram of a measurement channel

q Thus, a maximum of as many measurement commands are possible as there are axes available.


Measurement parameter definition in the axis-specific machine data

If positions of an axis are to be detected by measurement operations, this possibility must be defined by parameters in the axis-specific machine data.

On the one hand, the possibility of detection of measured values for an axis must fundamentally be enabled. This is done by means of the entry

kenngr.messachse 1

On the other hand, you must define the location of the trigger signal. Four different signal sources are currently distinguished. Here it must be pointed out, that only one of the signal sources can be defined as active and must therefore be assigned to 1. All other alternatives must be assigned to 0.

The following example shows parameter definitions if KUKA DSE drives are used. In the case of DSE drives the trigger signal is supplied by the drives and so this signal source is defined as active and the others as inactive.

kenngr.mess_signal_achs_steuer 0

kenngr.mess_signal_taster 0

kenngr.mess_signal_sercos 0

kenngr.meas_signal_drive 1


Cam functionality

Definition

A cam is a description of a motion profile that clearly assigns a slave position to each master position for a specific master position range.

More:

button Definition range of cams and their processing

button Cam processing with closed scanning

button Cam description by interpolation point tables

button Handling of interpolation pointer in tables

button Processing tables with LINE/POLY5 motion segments

button Access to cam tables

button File format of the cam tables (ASCII interpreter)


Definition range of cams and their processing

The cam functionality in the ISG-MCE is looked upon as a mechanical analogy to a cam on a vertical shaft. Cams can only be used as an absolute coupling specification between two endlessly rotating axes. Accordingly, each cam's definition range extends over the entire modulo range of the master axis. Thus, there is always precisely one association slave position for each absolute master position, i.e. the definition range is self-contained.

In this connection, we also speak of cam processing with "closed scanning" of the cam profile with the master positions.


Cam processing with closed scanning

In the case of cam processing with closed scanning, the cam profile is processed exclusively within the closed value range (= modulo range or "period") of the master axis.

It is assumed that this modulo range of the master axis is a property of the axis, i.e.: the axis keeps its position automatically within the modulo range.

Thus, there is always precisely one associated slave position for each master position. Therefore, the cam can never be scanned at an invalid position.

Only the following cam types are suitable for cam processing with closed scanning:

q Cams (a) whose speed integral in the definition interval is precisely equal to zero, e.g. for limited, oscillating motion.

q Cams (b) whose speed integral in the definition interval corresponds to the modulo range of the slave axis, e.g. for endlessly rotating cranks.

Processing of any cam by means of closed scanning that does not correspond to the definition above leads to abrupt position changes of the slave axis whenever the master position exceeds a modulo limit.

Figure 1-3: Quasi mechanical coupling between the master and slave positions with cam types a and b

When scanning the cam type a), nothing needs to be observed when the master passes through the modulo limit.

When scanning the cam type b), when the master passes through the modulo limit it is necessary to make sure that the slave position is corrected by a modulo range (for further details, see Section 1.3.4.2 further below).


Cam description by interpolation point tables

In the ISG-MCE, interpolation point tables and table with changing LINE/POLY5 motion sections are supported as cams.

The number of interpolation points (= lines in the cam table) is understood to be equidistant interpolation points of the slave axis in the modulo range of the master axis. This is why the table does not contain any master positions either. When the cam is processed, the modulo range of the master axis is subdivided into "number of interpolation points" segments of equal size. The interpolation point entries for the slave axis as understood to be metric positions of the slave axis within the associated position interval of the master axis.

Figure 1-1: Interpolation point entries and associated master position intervals

This form of cam description is exclusively suitable for use with closed scanning because, according to the definition, the slave position at the end of the cam is implicitly presupposed as being equal to the slave position at the start of the cam.

The first table above with precisely one slave position entry is therefore the simplest conceivable cam description in the form of a table. During processing, the slave would move to the entered slave position during the synchronisation phase (ramp-in) and would stay there. In chapter 1.3.4.1 and 1.3.4.2

In tables containing LINE/POLY5 motion sections the entries dont need to be equidistant. Because of this the first column contains always the master position, the second column always contains the slave position which marks the end of the motion section. The unit for master and slave position is 10-4° or 10-4mm. Chapter 1.3.5 describes the interpolation of tables with LINE/POLY5 motion sections.


Handling of interpolation pointer in tables

More:

button Online interpolation between interpolation points in tables

button Closed processing for an endlessly rotating slave axis


Online interpolation between interpolation points in tables

As shown above, the current table description defines the slave position at the end of the cam as being equal to the slave position at the start of the cam and is therefore only suitable for use with closed scanning.

If we go one step further, and want to interpolate between the interpolation points, the slave positions from the "neighbouring" modulo ranges are also used to compute information such as the pitch of the interpolated cam at a specific point.

Therefore, such an interpolation uses information that is not contained in the table as such, but in the definition of closed scanning.

Under the boundary conditions just pointed out, interpolation between the equidistant slave interpolation points is possible in linear fashion, cubically (only makes sense with very fine tables) or not at all.

The manufacturer-specific Input MC_CamIn.TableFctType to the PLCopen FB specifies how interpolation takes place between two table interpolation points:

HLI_STEP_DIRECT : UDINT := 0;

The slave position entry ssi is output within the master position interval smi, smi+1.

HLI_LINEAR : UDINT := 1;

Within the master position interval smi, smi+1, interpolation takes place in linear fashion between the slave position entries ssi, ssi+1.

HLI_POLYNOM_3 : UDINT := 2;

Within the master position interval smi, smi+1, a constant-tangent, cubic Bezier spline is interpolated between the four neighbouring slave position entries ssi-1,ssi, ssi+1, ssi+2. Polynomial coefficient calculation takes place online.

These interpolation types are shown in the following figure. Obtaining of tangent information at each interpolation point and also at the modulo limits is also hinted at in the bottom figure: at every interpolation point, the tangent is a parallel line to the straight line that passes through the two neighbouring interpolation points.

Figure 1-2: Interpolation types: "StepDirect", "Linear" and "Polynom_3"


Closed processing for an endlessly rotating slave axis

In the case of interpolation between the interpolation points, there is a need to distinguish whether the slave is to process the cam as endlessly rotating or with finite rotation. This information is also not included in the case of the current cam description. As the same cam description may be used for both types, this distinction is not a characteristic of the cam, but is rather a component of the (CamIn) command.

Figure 1-3: Endlessly rotating vs. finite-rotating cam processing

In the case of endlessly rotating processing, the table interpolation points that are used to calculate the interpolation must be corrected by one modulo range at the cam's definition limits. The correction direction depends on whether the cam has been modelled for a forwards or backwards rotating slave.

However, the ISG slope kernel for cam processing (sl_cam_kernel) can only automatically do this correctly if no intermediate interpolation is used between the table's interpolation points (MC_CamIn.TableFktType = HLI_STEP_DIRECT) by ensuring that, for two successive, scanned slave positions, the shortest modulo distance is always output as the relative distance per real-time cycle. The modulo range of the slave axis is used for this calculation and this is why cam processing exclusively with modulo rotating slave axes is also possible.

If the cam has been modelled for an endlessly rotating slave axis, in connection with the use of interpolation point interpolation (MC_CamIn.TableFktType = HLI_LINEAR or HLI_POLYNOM_3), it is necessary to specify in which direction modulo correction is to take place.

If the cam has been modelled so that it passed through the slave's modulo range in the positive direction, in "MC_CamIn.StartMode" the bit:

HLI_CI_ENDLESS_POSITIVE : DWORD := 16#0x00000020;

must be ored.

If the cam passes through the slave's modulo range in the negative direction, in "MC_CamIn.startmode" the bit:

HLI_CI_ENDLESS_NEGATIVE : DWORD:= 16#0x00000040;

must be ored.

Nevertheless, the cam profile must always match the chosen processing mode as otherwise this results in abrupt changes in the slave position.

Figure 1-4: Use of the "MC_CamIn.StartMode" flag for an endlessly rotating slave axis

More:

button Example: simplest possible linear cam for endlessly rotating processing


Example: simplest possible linear cam for endlessly rotating processing

Figure 1-5: Simplest possible linear cam for endlessly rotating processing

The table above with two slave position entries is the simplest conceivable cam description of a straight line in the form of a table.

The cam must be used endlessly in the positive direction. Otherwise, the dashed curve is run through.

In the case of closed scanning, the resulting straight line must pass through precisely the modulo range of the slave, i.e. it must have the pitch 1 as otherwise there is an abrupt position change at the modulo limit, i.e. with a straight line that has the pitch 1 as the cam a GearIn with the ratio 1:1 can be duplicated:

If you want to duplicate a GearIn with a straight line that has a pitch of 1, this is not possible with closed scanning!


Processing tables with LINE/POLY5 motion segments

More:

button Definition of the motion pattern

button Calculating the polynomial coefficients and interpolation

button Table format

button Characteristics of the tables

button Behaviour of the slave axis at the modulo limit

button Slave positions outside the modulo range

button Modifying tables with motion segments


Definition of the motion pattern

By analogy to programming a contouring motion via DIN 66025, the interpolation type is used to define along which trajectory the specified slave position is travelled to in the direction of ascending master positions. Accordingly, the POLY5-LINE interpolation type defines that the first table point is travelled to via a polynomial and thus the first interval in the table is covered with constant speed. In the case of the LINE-POLY5 type, the first slave position is accordingly travelled to at constant speed and there is a polynomial in the first interval. Figure 1-19 shows which patterns can arise in the case of LINE-POLY5 and POLY5-LINE sequences due to the position of the first interpolation point in the table.

Figure 1-6: LINE-POLY5 and POLY5-LINE sequences.


Calculating the polynomial coefficients and interpolation

The polynomials of the fifth order for determination of the slave position s as a function of the master position t in the ranges of non-constant speed are of the form

They are defined by six boundary conditions. At the start and end points, the position s and the first (speed v) and second derivations (acceleration a) must agree with the neighbouring intervals. The second derivation, i.e. the "acceleration", should be equal to 0 on the left and right. Figure 1-20 shows three successive intervals with the aid of which the polynomial coefficients are calculated.

Figure 1- 7 : Master-Slave-Intervals of a cam table

Below, a cam table of the POLY5-LINE type is calculated as an example and is presented with the position, speed and acceleration in the individual intervals.

Tablename = poly5line_2 # Table name

Table-ID = 402 # Table id

Tabletype = 7 # Table type

Functiontype = 5 # Type of interpolation, 5 = POLY5-LINE

Lines = 10 # Number of lines

Begintable # Begin of table

100000 0

200000 400000

400000 1600000

670000 1800000

900000 300000

980000 1700000

1500000 3400000

1800000 2700000

2700000 1700000

3000000 2600000

EndTable

In the first diagram, the intervals with polynomials are shown in red and the intervals with constant speed are shown in blue.

Figure 1-8: Example for cam with POLY5-LINE


Table format

The so-called zebra format is used as the table form, in which, as shown in the previous chapter, segments linked by straight lines (corresponding to constant speed) and segments linked with polynomials of the fifth order (Poly5 segment) alternate. There must always be an even number of segments. It is also necessary to define whether the first segment begins with a straight line or a polynomial. The area between the last point of the table and its first point is referred to as the first segment.

The shape of the curve in the first segment is defined by the interpolation type. The LINE-POLY5 interpolation type defines that the first segment is travelled through with a straight line. In the case of the POLY5-LINE type, this segment contains a polynomial. Contrary to the interpolation point tables, in the case of these tables the LINE-POLY5 or POLY5-LINE interpolation type can be specified in the "Functiontype" token. If this entry is to take effect, the PLC must transfer the "TableDefined" value in the "FunctionType" parameter of the PLCopen function block MC_CamIn. Otherwise, the interpolation type entered in MC_CamIn on commanding takes effect. Inconsistencies between the table entry and PLC commanding are thus avoided.

For the LINE/POLY5interpolation type, the value 4 must be specified in the table or in MC_CamIn . The POLY5/LINE type requires the value 5.

As already mentioned, for each line the useful data in the table contains master and slave value pairs, and the master position is specified in column 0 and the slave position in column 1, each in the unit 1E-4° or 1E-4 mm.


Characteristics of the tables

The tables (table entries) must have the following characteristics:

q The master positions are sequentially ascending

q The master positions are at a minimum distance of 0.1° from one another

q The master and slave value pairs need not begin at the master position 0

q The smallest table consists of two master and slave value pairs and thus of only two intervals

q The maximum table size is limited to 360 master and slave value pairs

q The master and slave axes must be a module axis.

An example of a typical cam table is shown below

Tablename = EndlessNegative # Table name

Table-ID = 422 # Table ID

Tabletype = 7 # Table type

Functiontype = 5 # Type of interpolation

Lines = 6 # Number of lines

Begintable # Begin of table

15000 0 # MasterPos[0] SlavePos[0]

450000 3400000 # MasterPos[1] SlavePos[1]

900000 2400000 # MasterPos[2] SlavePos[2]

1350000 2000000 # MasterPos[3] SlavePos[3]

2700000 1300000 # MasterPos[4] SlavePos[4]

3400000 300000 # MasterPos[5] SlavePos[5]

EndTable # End of table


Behaviour of the slave axis at the modulo limit

The behaviour of the slave at the modulo limit must be specially defined. By default, the slave will always move within its modulo limits, i.e. it maximally undergoes one revolution in the same direction. If an endlessly rotating slave is required, either "EndlessPositive" or "EndlessNegative" must be specified in the start mode of the FB MC_CamIn. The slave will then endlessly rotate beyond the modulo limit in the positive or negative direction of rotation. Cases for all three variants with regard to the behaviour of the slave axis at the modulo limit are shown in Figures 2, 3 and 4. The following cam table was used in all three examples:

Tablename = Smallest_Table # Table name

Table-ID = 404 # Table ID

Tabletype = 7 # Table type, 7 = 2-column table, SGN32-Format

Functiontype = 4 # Type of interp., 4 = LINE-POLY5,5 = POLY5-LINE

Lines = 2 # Number of lines

Begintable # Begin of table

100000 0

1500000 3400000

EndTable

Figure 1-9: Master/slave coupling without endless transition at the modulo limit

Figure 1-10: Master/slave coupling with positive endless transition at the modulo limit

Figure 1-11: Master/slave coupling with negative endless transition at the modulo limit


Slave positions outside the modulo range

If the gear ratio between the master and slave is to be very large, it may be necessary to define slave positions that lie outside the modulo range. This is why slave positions outside the modulo range are not transformed into it, but are used without change as an interpolation point. The following figure shows such a table and the profile thus run through.

Tablename = extremetable4 # Table name

Table-ID = 414 # Table ID

Tabletype = 7 # Table type

Functiontype = 5 # Type of interpolation

Lines = 8 # Number of lines

Begintable # Begin of table

0 0

200000 0

900000 -500000

1800000 -10000000

2100000 -16000000

2700000 -12000000

3200000 -19000000

3400000 -20000000

EndTable

Figure 1-12: Table with large transformation, endless negative.


Modifying tables with motion segments

Online modification of tables with motion segments (zebra tables) is done directly in the table memory (shared memory) because the kernel only works with a copy of the active cam table. As a maximum of 360 master and slave values pairs in the SGN32 format can be defined for each table, the internal memory requirement is only 2880 bytes.

The modified table is activated by commanding MC_CamIn again. If possible, the table should be switched over in a safe area in which the slave is not moving (LINE with 0 speed). Despite standstill of the slave, synchronisation to a new table requires a phase of synchronisation to speed (equal to 0) and balancing of the phase position. This operation can take a few cycles depending on the setting in the axis MDS. Presuming that the slave is not moving and does not have to perform phase compensation (characteristic of the safe range), synchronisation to the cam table will be completed in the time set in the axis MDS for dwelling within the speed window (usually for about 20 to 30 ms). If the slave is synchronised at standstill and the dwell time has already elapsed within the speed window, optimisation might have to take place here so as to ensure that the entire operation is completed in only a few cycles.

The range in which the slave is resynchronised should be of the LINE type because only then is there a guarantee that the speed is constantly equal to 0 throughout the interval. In the case of a polynomial, this will generally result in movement of the slave.


Access to cam tables

PLCopen requires provision of a structure with the name CAM_REF, which must be passed on as an input parameter to the PLCopen FB CamTableSelect. If the call is successful, the PLCopen FB CamTableSelect returns a so-called CAM_ID, which is also defined in PLCopen.

As defined by PLCopen, both CAM_REF and CAM_ID are manufacturer-specific.

As a result of the integration of data retention for cam tables and the features of the ISG-MCE, in the ISG realisation the data types CAM_REF and CAM_ID are identical. They merely contain an ordinal number to clearly identify a cam table.

For visualisation and possibly modification of table contents, there is currently no function under KW software at the PLC end because no pointers are supported in the system.

The "tab_ldr.lis" file is interpreted during start up. It contains the file names of the cam tables to be loaded. All (*.tab) table files, which must also be in the list directory of the ISG-MCE, are interpreted and are loaded into the table memory.

The following figure elucidates this.

Figure 1-13: Integration of data retention for cam tables into the overall system


File format of the cam tables (ASCII interpreter)

The cam tables are stored in ASCII format. One file is needed for each cam table. The lines of the cam table represent the equidistant interpolation points of the slave axis over the modulo range of the master axis, which is from 0° to 360°. This is why the table does not contain any master positions.

The ASCII interpreter is realised so that it internally works in two interpretation modes.

1.) Interpretation of the table header

2.) Interpretation of the table data

More:

button The table header

button Table data

button Table types

button Function types

button Tokens and separators

button Comments

button Example of a correct file format


The table header

The table header has to contain the following key words for correct interpretation of the table.

Tablename = Sinus_360°

Tabletype = 3 # 3 = TABLE_ONE_COLUMN_REAL64

Table-ID = 402 # Table-ID

Functiontype = 5 # Type of interpolation, 5 = POLY5-LINE

Lines = 36

Table 1. 1 : Example of an table header

q Table name:
User defined name without blanks.

q Table type:
The table type to be used. The selection is done via index, see. Table in 1.3.7.3 Table types.

q Table-ID:
ID of the cam table.

q Function type:
Function type, see 1.3.7.4 Function types.

q Number of lines (Lines):
Number of lines which contain the table values.


Table data

Detection of the key word "Begintable" switches the interpreter to the TSF interpreta-tion mode (= Tabulator Separated Format). That is to say, after the key word "Begin-table" the interpreter expects columns of numbers that correspond to the table type.

Begintable

625133,4396

1231272,516

1800000

2314035,395

2757759,995

3117691,454

3382893,435

3545307,911

3600000

....

-2757759,995

-2314035,395

-1800000

-1231272,516

-625133,4396

-8,82107E-10

EndTable

Table 1. 2 : Example for table data


Table types

The following table show the available table types. The table type TABLE_MOTION_PATTERNS is only used for internal purposes (automatic test).

Index | Table type | Number of culomns | Data type
1 | TABLE_ONE_COLUMN_SGN16 | 1 | Signed 16
2 | TABLE_ONE_COLUMN_SGN32 | 1 | Signed 32
3 | TABLE_ONE_COLUMN_REAL64 | 1 | Real 64
4 | TABLE_4_COLUMNS_SGN32 | 4 | Signed 32
5 | TABLE_4_COLUMN_REAL64 | 4 | Real 64
6 | TABLE_MOTION_PATTERNS | - | -
7 | TABLE_TWO_COLUMNS_SGN32 | 2 | Signed 32

Table 1. 3 : The table types


Function types

Function types for the cam tables:

Index | Function type | Description
0 | STEP_DIRECT | Constant positions are read from the cam table.
1 | LINEAR | The slave position between two table entries is interpolated linear.
2 | POLYNOM_3 | Currently not implemented.
3 | POLYNOM_3_KOEFF | Precalculated polynomial coefficients.
4 | LINE_POLY5 | Linear  Poly5
5 | POLY5_LINE | Poly5  Linear
6 | TABLE_DEFINED | Function type is defined in the cam table.

Table 1. 4 : The function types


Tokens and separators

Line by line, the interpreter separates the ASCII file contents into tokens separated by separator characters. The following separator characters are permissible within the table data:

q Blank

q Tabulator

Within the table header, the

q Equal sign

is also supported as a separator.


Comments

For comments, the "#" (hash) and ";" (semicolon) can be used as the first character in a line. If the comment characters are not the first character in the line, the entire line is interpreted quite normally, which leads to an error message. The interpreter knows the number of tokens to be extracted per line and only extracts that number, i.e. the interpreter ignores everything after the last token of a line that is separated by a separator (blank or tabulator).

Tablename = CAM-Profile-0815 0815 valid comment

Tabletype = 5 # 5 = TABLE_4_COLUMN_REAL64

Table-ID = 123 # Tabellen-ID

Lines = 36

#Begintable !!! comment with '#' !!!

0,174532925 0,173648178 0,984807753 2,342020143 valid comment

Table 1.5: Examples of syntactically correct comments


Example of a correct file format

Tablename = CAM-Profile-0815

Tabletype = 5 # 5 = TABLE_4_COLUMN_REAL64

Table-ID = 123 # Tabellen-ID

Lines = 36

Begintable

0,174532925 0,173648178 0,984807753 2,342020143

0,34906585 0,342020143 0,939692621 2,64278761

0,523598776 0,5 0,866025404 2,866025404

0,698131701 0,64278761 0,766044443 2,984807753

0,872664626 0,766044443 0,64278761 2,984807753

1,047197551 0,866025404 0,5 2,866025404

1,221730476 0,939692621 0,342020143 2,64278761

1,396263402 0,984807753 0,173648178 2,342020143

1,570796327 1 6,12574E-17 2

1,745329252 0,984807753 -0,173648178 1,657979857

1,919862177 0,939692621 -0,342020143 1,35721239

2,094395102 0,866025404 -0,5 1,133974596

2,268928028 0,766044443 -0,64278761 1,015192247

2,443460953 0,64278761 -0,766044443 1,015192247

2,617993878 0,5 -0,866025404 1,133974596

2,792526803 0,342020143 -0,939692621 1,35721239

2,967059728 0,173648178 -0,984807753 1,657979857

3,141592654 1,22515E-16 -1 2

3,316125579 -0,173648178 -0,984807753 2,342020143

3,490658504 -0,342020143 -0,939692621 2,64278761

3,665191429 -0,5 -0,866025404 2,866025404

3,839724354 -0,64278761 -0,766044443 2,984807753

4,01425728 -0,766044443 -0,64278761 2,984807753

4,188790205 -0,866025404 -0,5 2,866025404

4,36332313 -0,939692621 -0,342020143 2,64278761

4,537856055 -0,984807753 -0,173648178 2,342020143

4,71238898 -1 -1,83772E-16 2

4,886921906 -0,984807753 0,173648178 1,657979857

5,061454831 -0,939692621 0,342020143 1,35721239

5,235987756 -0,866025404 0,5 1,133974596

5,410520681 -0,766044443 0,64278761 1,015192247

5,585053606 -0,64278761 0,766044443 1,015192247

5,759586532 -0,5 0,866025404 1,133974596

5,934119457 -0,342020143 0,939692621 1,35721239

6,108652382 -0,173648178 0,984807753 1,657979857

6,283185307 -2,4503E-16 1 2

Table 1.6: Example of a correct table


Overview of the PLCopen FBs

The following table gives you an overview of the availability of PLCopen FBs depending on PLC system and drive type.

Function block | PLC System
 | KW | 3S | TwinCat
MC_Power | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_ReadAxisInfo | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_ReadMotionState | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_ReadStatus | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_ReadAxisError | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_ReadActualPosition | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_Reset | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_Home | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_MoveAbsolute | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_MoveAdditive | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_MoveRelative | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_MoveSuperImposed | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_MoveVelocity | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_Stop | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_AbortTrigger | - DSE SERCOS | - - SERCOS | -
MC_TouchProbe | - DSE SERCOS | - - SERCOS | -
MC_CamIn | SIMU DSE SERCOS | SIMU - SERCOS | -
MC_CamOut | SIMU DSE SERCOS | SIMU - SERCOS | -
MC_CamTableSelect | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_GearIn | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_GearOut | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_Phasing | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_ReadParameter | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MC_WriteParameter | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MC_SetPosition | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_SetOverride | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MC_Halt | SIMU DSE SERCOS | SIMU - SERCOS | SIMU

1) Availability depends on used MCE.

More:

button MC_Power

button MC_ReadAxisInfo

button MC_ReadMotionState

button MC_ReadStatus

button MC_ReadAxisError

button MC_ReadActualPosition

button MC_Reset

button MC_Home

button MC_MoveAbsolute

button MC_MoveAdditive

button MC_MoveRelative

button MC_MoveSuperImposed

button MC_MoveVelocity

button MC_Stop

button MC_AbortTrigger

button MC_TouchProbe

button MC_CamIn

button MC_CamOut

button MC_CamTableSelect

button MC_GearIn

button MC_GearOut

button MC_Phasing

button MC_ReadParameter

button MC_WriteParameter

button MC_SetPosition

button MC_SetOverride

button MC_Halt


MC_Power

The MC_Power FB switches the power of the drive of the axis defined by AXIS_REF on or off. It is assigned to the group of administrative FBs.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | As long as "Enable is true, power is on.
 | Enable_Positive | BOOL | As long as "Enable is true, permits motion in positive direction only. This feature is currently not supported.
 | Enable_Negative | BOOL | As long as "Enable is true, permits motion in negative direction only. This feature is currently not supported.
VAR_OUTPUT
 | Status | BOOL | Effective state of the power stage.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Errror identification.
 | DriveEnabled | BOOL | TRUE indicates that the drive is ready for enabling power.
 | DriveReady | BOOL | TRUE indicates that the drive is being controlled.

Behaviour of the FB

q The power for the drive is connected only if all three inputs have the value TRUE.

q Regardless of the status of the axis, this FB can be commanded and the command can be sent to the motion controller.

q If there is an error in other axes, the MC_Power FB reacts with an axis error ("ErrorID = 40001 and "MC_ReadAxisError.ErrorID = 294039)

q The behaviour of the axis depends on the defined drive type. If the drive type simulation (kenngr.antr_typ 4) is defined for the axis, the "status" output is also simulated.

q If the drive type DSE (see kenngr.antr_typ) is defined for the axis and motors with an integrated brake are used, the FB also contains opening of the brakes.
The setting of the braking deceleration times when setting/removing the controller enabling signals by means of this FB are defined in the axis lists achsmds[X].lis by means of the following entries:

antr_digital.typ.dse.brake_open_delay_time
antr_digital.typ.dse.brake_open_time
antr_digital.typ.dse.brake_close_premature_time.

Refer to the following timing diagrams for the exact behaviour:

Brake opening:

Figure 2-1: Timing when opening the brake

Brake closing:

Figure 2-2: Timing when closing the brake


MC_ReadAxisInfo

This FB is used to get information concerning an axis like modes and states. It is assigned to the group of administrative FBs.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | Get the values of the parameters continuously while enabled.
VAR_OUTPUT
 | Valid | BOOL | True if "Valid outputs available.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | IsHomed | BOOL | Axis referencing is completed.

Behaviour of the FB

q The information of an axis is updated cyclically as long as Enable has the value TRUE.


MC_ReadMotionState

This FB returns in detail the status of the axis with respect to the motion currently in process. It is assigned to the group of administrative FBs.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | Get the values of the parameters continuously while enabled.
VAR_OUTPUT
 | Valid | BOOL | True if "Valid outputs available.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | ConstantVelocity | BOOL | The drive has achieved rotational speed.
 | RevZero | BOOL | Drive stationary, rotational speed = 0.

InWindow | BOOL | Axis is within the control window concerning target position
InPosition | BOOL | The axis is in position.
IsMoving | BOOL | The axis is moving.
LrCommandedPos | LREAL | Target position of the axis. Default unit [0,1 µm]
LrActualPos | LREAL | Actual position of the axis. Default unit [0,1 µm]
LrSetPos | LREAL | Set position of the axis. Default unit [0,1 µm]
LrCommandedRev | LREAL | Target rotational speed of the axis. Default unit [10-3 °/ s]
LrActualRev | LREAL | Actual rotational speed of the axis. Default unit [10-3 °/s]
LrSetRev | LREAL | Set rotational speed. Default unit [10-3 °/s]
LrActualAccel | LREAL | Actual acceleration of a spindle. Default unit [1°/s2]
LrSetAccel | LREAL | Set acceleration of a spindle. Default unit [1°/s2]
IpoCommandedPos | LREAL | Target position of a spindle. Default unit [10-4 °]
IpoSetPos | LREAL | Set position of a spindle. Default unit [10-4 °]
IpoDistToGo | LREAL | Remaining distance to be moved by the axis. Default unit [10-4 °]
IpoSetVel | LREAL | Set velocity of a spindle. Default unit [10-3°/s]
IpoSetAccel | LREAL | Set acceleration of a spindle. Default unit [1°/s2]

Behaviour of the FB

q The data of an axis is updated cyclically as long as Enable has the value TRUE.


MC_ReadStatus

This FB is used to obtain the current status data of an axis. It is assigned to the group of administrative FBs.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | Get the values of the parameters continuously while enabled.
VAR_OUTPUT
 | Valid | BOOL | True if "Valid outputs available.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | Errorstop | BOOL | Axis is in state Errorstop
 | Disabled | BOOL | Axis is in state Disabled
 | Stopping | BOOL | Axis is in state Stopping
 | Homing | BOOL | Axis is in state Homing
 | Standstill | BOOL | Axis is in state Standstill
 | TorqueControl | BOOL | Axis is in state Torque Control
 | DiscreteMotion | BOOL | Axis is in state Discrete Motion
 | ContinuousMotion | BOOL | Axis is in state Continuous Motion
 | SynchronizedMotion | BOOL | Axis is in state Synchronized Motion

Behaviour of the FB

q The data of an axis is updated cyclically as long as Enable has the value TRUE.


MC_ReadAxisError

In the case of an axis error the FB MC_ReadAxisError returns error code 40001 (axis error occurred within motion controller) at its ErrorID output. At output AxisErrorID the error code of the motion controller is displayed. The associated motion controller error message texts are placed with text or XML files. All other error codes notifying internal FB-errors.

Descriptions of the values at outputs ErrorID and AxisErrorID you can find in [DIAG].

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | While enabled, the error information is displayed at the output pins.
VAR_OUTPUT
 | Valid | BOOL | If the output is TRUE, the error codes are valid.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | AxisErrorID | UDINT | Error code of the error of the motion controller.

Behaviour of the FB

q If the axis is in state Errorstop, the output Error becomes TRUE and output ErrorID displays error code 40001 (axis error within motion controller). Then output AxisErrorID shows the error code of the motion controller.


MC_ReadActualPosition

At its position output, the MC_ReadActualPosition returns the current position of an axis. It is assigned to the group of administrative FBs.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | Get the values of the parameters continuously while enabled.
VAR_OUTPUT
 | Valid | BOOL | The current position is present at the FB output position.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | Position | LREAL | Actual position of the axis. Default unit [0,1 µm]

Behaviour of the FB

q If "Enable is FALSE, the value 0.0 is output at the position output.

q If "Done is TRUE, the position of the axis at the output is updated.


MC_Reset

The MC_Reset FB takes an axis from the Errorstop state to the Standstill state and discards all axis errors. Calling up MC_Reset has no influence on the outputs of the other FBs.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Resets the axis at the rising edge.
VAR_OUTPUT
 | Done | BOOL | "Standstill state is reached.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q Commanding a reset is permissible only if the axis is in the Errorstop state. If this is not the case, the error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q No new command can be sent when this FB is active. It cannot be retriggered.

q If reset commanding cannot be sent to the axis within the number of FB calls specified by the global data item MAX_RESET_RETRAILS, the "Error output is set to FALSE and ErrorID indicates the error value 44075 (ERR_PO_AX_DID_NOT_TAKE_ORDER). The value of MAX_RESET_RETRAILS can be adjusted to the specific application.

q If reset commanding has not been successfully acknowledged within a specific number of FB calls, this is indicated by the error code 44002 (ERR_PO_AX_ANSWER_TIME_OUT) at the ErrorID output and the "Error output becomes TRUE. The number of FB calls can be specified for the specific application in the global data item MAX_RESET_WAIT_CYCLES.

q If the axis is in the "TorqueControl and then assumes an error state, this state is restored after a successful reset. In all other cases, the axis assumes the Standstill state.


MC_Home

Reference point travel of the axis is commanded with the MC_Home FB. How an axis responds to this command essentially depends on the type of referencing operation. This is specified in the axis list (achsmdsX.lis) via the kenngr.homing.homing_type element.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the axis referencing at rising edge.
VAR_OUTPUT
 | Done | BOOL | When axis referencing is finished, the output of "Done is TRUE and the axis is in state "Standstill.
 | CommandAborted | BOOL | TRUE indicates that the referencing command has been aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

General behaviour of the FB

q Commanding reference point travel is permissible only if the axis is in the Standstill state. If this is not the case, the Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q No new command can be sent when this FB is active. It cannot be retriggered. If an attempt is nevertheless made to do this, the FB returns the error 44007 (ERR_PO_AX_HOMING_RETRIGGERD).

q The axis changes to the Homing state directly after command of reference point travel.

More:

button Dependencies on the type of referencing method


Dependencies on the type of referencing method

As already mentioned, different referencing methods are available. A method is selected by means of an input in the respective axis lists (achsmdsX.lis) via the kenngr.homing.homing_type element. Here, the method is selected by means of a defined string. Refer to the following table for details of available methods:

Method | Key word
Travel to fixed stop, NC-controlled | TORQ
Compatibility mode | NONE

Axis behaviour in the case of the referencing type NONE

q If commanding has taken place, for the axis the value is accepted as the reference position that is stored in the "getriebe[i].pos_refpkt" element in the axis list (achsmdsX.lis).

q The behaviour of the axis during commanding depends on the defined drive type. If the drive type DSE (see kenngr.antr_typ) is defined for the axis, the axis will not move when the FB is commanded. The defined reference position is directly accepted and the "Done output is set to TRUE.
If the drive type Simulation (see kenngr.antr_typ) is defined for the axis, the axis will move and will assume the defined reference position after a short distance.

Axis behaviour in the case of the referencing type TORQ

q If the drive type DSE is defined for the axis, the axis will move when the FB is commanded.

q When the TORQ referencing type is used, further parameters in the axis list (achsmdsX.lis) must be assigned values. There are general parameters that refer to the referencing operation as such. These feature the kenngr.homing. prefix in the axis list.

Name | Dimension | Value range | Description
torq_min_distance | 0,1 μm | < torq_max_distance | Minimum distance up to detection of the reference position
torq_max_distance | 0,1 μm | 0 ... MAX_SGN23 | Maximum distance up to detection of the reference position
torq_homing_dir |  | [POSITIVE | NEGATIVE] | Direction of reference point travel
torq_detect_velocity_limit | 0,1 % | 0 ... 1000 | Speed limit for detection of the reference position
torq_retraction_distance | 0,1 μm | MAX_SGN32 | Withdrawal distance after detection of the reference position
torq_homing_position | 0,1 μm | MAX_SGN32 | Reference position
torq_detect_time | μs | MAX_UNS32 | Minimum time that the limit torque must be exceeded for the reference position to be detected.

General parameters for referencing to fixed stop

The gear speed-dependent parameters feature the getriebe[X].homing. prefix. An ordinal number for the respective gear speed is entered for X.

Name | Dimension | Value range | Description
torq_move_acceleration | mm/s2 | <= a_max | Acceleration
torq_move_velocity | μm/s | <= vb_max | Speed for axis motion
torq_move_torque_limit | 0,1 % | 0 ... 1000 | Percentage torque limit for motion
torq_detect_torque_limit | 0,1 % | 0 ... 1000 | Limit for detection of the standing axis. Percentage value referred to torq_move_torque_limit.

Gear speed-specific parameters for referencing to fixed stop

The following graphic shows in what way the parameters listed have an influence on travel to a fixed stop.

Figure 2-3: Influence during travel to a fixed stop


MC_MoveAbsolute

Movement of the axis to an absolute position is commanded with the FB MC_MoveAbsolute FB. The motion is always executed jerk-limited with the constant set input Jerk. This value is valid for both "acceleration" and "deceleration".

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the motion at rising edge.
 | Position | LREAL | Target position for the motion. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | Velocity | LREAL | Value of the maximum velocity (always positive, not necessarily reached). Range [1.0, 2147483647.0] Default unit [1µm/s or 10-3 °/s]
 | Acceleration | LREAL | Value of the acceleration (always positive, increasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Deceleration | LREAL | Value of the decceleration (always positive, decreasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
 | Direction | INT | Direction in which the movement is started: 1 positive direction 2 shortest way 3 negative direction 4 current direction Note: Specifying the direction is effective only if a modulo coordinate system has been defined for the axis in the axis-specific machine data, using parameter kenngr.achs_mode.
VAR_OUTPUT
 | Done | BOOL | The axis is within a range close to the target position. The range is specified by the parameter getriebe[...].window of the axis-specific machine data.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q This motion is commanded only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Within the FB, the position, velocity, acceleration, deceleration and jerk input variables are monitored only for their value range. If they are exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. Moreover, the maximum speed and acceleration data is limited within the motion controller. If speed values more than getriebe[0].dynamik.vb_max or "acceleration" or "deceleration" values more than getriebe[0].dynamik.a_max are commanded, the motion is nevertheless carried out, but the values are limited to the defined values and the motion controller issues a warning 60211 or 60188 to 60194.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "jerk".

q With this function block, active commands can be replaced with new commands and so the function block is retriggerable. The active command is thus aborted.

q If an axis not referenced is commended by this FB, the axis does not start to move. The error code 60142 is reported on the MC_ReadAxisError function block.

q The positions of the software limit switches (kenngr.swe_pos, kenngr.swe_neg, kenngr.swe_toleranz) are monitored if the axis has been defined either as a linear or a rotary axis. This means that the kenngr.achs_typ of the axis machine data has the value 0x0001 or 0x0002. If the target position exceeds the position of the software limit switches as a result of commanding, the axis nevertheless starts off. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.


MC_MoveAdditive

With the MC_MoveAdditive FB, a relative motion is commanded, in addition to the commanded position, if the axis is in the "Discrete Motion" state. The motion is always executed jerk-limited with the constant set input "Jerk". This value is valid for both "acceleration" and "deceleration".

If the axis is in the "Continuous Motion" state and receives a command from this FB, the relative distance from the current position at the time of commanding is added.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the motion at rising edge.
 | Distance | LREAL | Relative distance for the motion. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | Velocity | LREAL | Value of the maximum velocity (always positive, not necessarily reached). Range [1.0, 2147483647.0] Default unit [1µm/s or 10-3 °/s]
 | Acceleration | LREAL | Value of the acceleration (always positive, increasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Deceleration | LREAL | Value of the deceleration (always positive, decreasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
VAR_OUTPUT
 | Done | BOOL | The axis is within a range close to the target position. The range is specified by the parameter getriebe[...].window of the axis-specific machine data.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q This motion is commanded only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Within the FB, the position, velocity, acceleration, deceleration and jerk input variables are monitored only for their value range. If they are exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. Moreover, the maximum speed and acceleration data is limited within the motion controller. If speed values more than getriebe[0].dynamik.vb_max or "acceleration" or "deceleration" values more than getriebe[0].dynamik.a_max are commanded, the motion is nevertheless carried out, but the values are limited to the defined values and a warning 60211 or 60188 to 60194 is issued.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "jerk".

q With this function block, active commands can be replaced with new commands and so the function block is retriggerable. The active command is thus aborted.

q If a non-referenced axis is commanded by this FB, the axis travels at the speed defined by the getriebe[...].vb_reflow parameter of the axis machine data.

q The positions of the software limit switches (kenngr.swe_pos, kenngr.swe_neg, kenngr.swe_toleranz) are monitored if the axis has been defined either as a linear or a rotary axis. This means that the kenngr.achs_typ of the axis machine data has the value 0x0001 or 0x0002. If the target position exceeds the position of the software limit switches as a result of commanding, the axis nevertheless starts off. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.


MC_MoveRelative

A relative motion is commanded with the MC_MoveRelative FB, in addition to the current position. This is regardless of whether the axis is in the "Discrete Motion" or "Continuous Motion" state. The motion is always executed jerk-limited with the constant set input "Jerk". This value is valid for both "acceleration" and "deceleration".

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the motion at rising edge.
 | Distance | LREAL | Relative distance for the motion. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | Velocity | LREAL | Value of the maximum velocity (always positive, not necessarily reached) Range [1.0, 2147483647.0] Default unit [1µm/s or 10-3 °/s]
 | Acceleration | LREAL | Value of the acceleration (always positive, increasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Deceleration | LREAL | Value of the deceleration (always positive, decreasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
VAR_OUTPUT
 | Done | BOOL | The axis is within a range close to the target position. The range is specified by the parameter getriebe[...].window of the axis-specific machine data.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q This motion is commanded only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Within the FB, the position, velocity, acceleration, deceleration and jerk input variables are monitored only for their value range. If they are exceeded, an error number referring to the variable is output at the ErrorID output and error is set to TRUE. Moreover, the maximum speed and acceleration data is limited within the motion controller. If speed values more than getriebe[0].dynamik.vb_max or "acceleration" or "deceleration" values more than getriebe[0].dynamik.a_max are commanded, the motion is nevertheless carried out, but the values are limited to the defined values and a warning 60211 or 60188 to 60194 is issued.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "Jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "Jerk".

q With this function block, active commands can be replaced with new commands and so the function block is retriggerable. The active command is thus aborted.

q If a non-referenced axis is commanded by this FB, the axis travels at the speed defined by the getriebe[...].vb_reflow parameter of the axis machine data.

q The positions of the software limit switches (kenngr.swe_pos, kenngr.swe_neg, kenngr.swe_toleranz) are monitored if the axis has been defined either as a linear or a rotary axis. This means that the kenngr.achs_typ of the axis machine data has the value 0x0001 or 0x0002. If the target position exceeds the position of the software limit switches as a result of commanding, the axis nevertheless starts off. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.


MC_MoveSuperImposed

A relative motion is commanded with the MC_MoveSuperImposed FB, in addition to motion already active. The active motion is not interrupted, but is superimposed with the commanded one. The motion is always executed jerk-limited with the constant set input "jerk". This value is valid for both "acceleration" and "deceleration".

If the axis is already in a motion state and receives a command by means of this FB, this leads to a superimposed interpolation and thus to a speed change and a change in the target position of the active motion.

If the axis is in the "Standstill state, a command by the MC_MoveSuperImposed FB acts like a command by an MC_MoveRelative FB.

As "acceleration" values are also superimposed in the case of superimposed interpolation, corresponding axis parameters must be defined to ensure that the axis is not dynamically overtaxed.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the motion at rising edge.
 | Distance | LREAL | Additional Distance that is to be superimposed. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | VelocityDiff | LREAL | Value of the maximum velocity difference to the ongoing motion (always positive, not necessarily reached). Range [1.0, 2147483647.0] Default unit [1µm/s or 10-3 °/s]
 | Acceleration | LREAL | Value of the acceleration (always positive, increasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Deceleration | LREAL | Value of the deceleration (always positive, decreasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
VAR_OUTPUT
 | Done | BOOL | The relative distance of the active movement is superimposed.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q This motion is commanded only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Within the FB, the distance, velocitydiff, acceleration, deceleration and jerk input variables are monitored only for their value range. If they are exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. Moreover, the maximum speed and acceleration data is limited within the motion controller. If speed values more than getriebe[0].dynamik.vb_max or "acceleration" or "deceleration" values more than getriebe[0].dynamik.a_max are commanded, the motion nevertheless takes place. The values are limited to the defined values and a warning, 60211 or 60188 to 60194, is issued.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "jerk".

q With this function block, active commands can be modified by an additional, superimposed motion. The following rules apply to command assertion and command aborting:

If no interpolation is active, i.e. if the axis is in the "Standstill state, a command by the MC_MoveSuperImposed FB acts like a command by an MC_MoveRelative FB.

If interpolation is already active, i.e. the axis is in one of the "Continuous Motion", "Discrete Motion" or "Synchronized Motion" states, a command by the MC_MoveSuperImposed FB starts a further, superimposed interpolation.

If a superimposed interpolation (cf. 2.) is already active, a new command by the MC_MoveSuperImposed FB ensures that only the currently superimposed interpolation is replaced by the new MC_MoveSuperImposed command, while the subordinate interpolation is not affected.

If a superimposed interpolation (cf. 2.) is already active, and a new command is issued with any MC_Move*** except MC_MoveSuperImposed, this results in aborting of both active interpolations, i.e. both the superimposed and the subordinate interpolations are replaced by the new MC_Move*** command.

q If a non-referenced axis is commanded by this FB, the axis travels at the speed defined by the getriebe[...].vb_reflow parameter of the axis machine data.

q The positions of the software limit switches (kenngr.swe_pos, kenngr.swe_neg, kenngr.swe_toleranz) are monitored if the axis has been defined either as a linear or a rotary axis. This means that the kenngr.achs_typ of the axis machine data has the value 0x0001 or 0x0002. If the target position exceeds the position of the software limit switches as a result of commanding, the axis nevertheless starts off. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.


MC_MoveVelocity

With the MC_MoveVelocity FB, you command an endless motion at the specified speed. The motion is always executed jerk-limited with the constant set input "jerk. This value is valid for both "acceleration" and "deceleration".

To stop the motion, the FB must be interrupted by another FB that sends a new command to the axis.

The "in_velocity output is reset when a falling edge is detected at the "Execute input or when the effect of the FB is ended due to commanding of another FB.

In conjunction with an MC_MoveSuperImposed FB, the "in_velocity remains TRUE.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the motion at rising edge.
 | Velocity | LREAL | Value of the maximum velocity (always positive). Range [1.0, 2147483647.0] Default unit [1µm/s or 10-3 °/s]
 | Acceleration | LREAL | Value of the acceleration (always positive, increasing energy of the motor). range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Deceleration | LREAL | Value of the deceleration (always positive, decreasing energy of the motor). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
 | Direction | INT | Direction in which the movement is started: 1 positive direction 3 negative direction 4 current direction
VAR_OUTPUT
 | InVelocity | BOOL | Commanded velocity reached (first time reached).
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q This motion is commanded only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Within the FB, the position, velocity, acceleration, deceleration and jerk input variables are monitored only for their value range. If they are exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. Moreover, the maximum speed and acceleration data is limited within the motion controller. If speed values more than getriebe[0].dynamik.vb_max or "acceleration" or "deceleration" values more than getriebe[0].dynamik.a_max are commanded, the motion is nevertheless carried out, but the values are limited to the defined values and a warning 60211 or 60188 to 60194 is issued.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "jerk".

q With this function block, active commands can be replaced with new commands and so the function block is retriggerable. The active command is thus aborted.

q If a non-referenced axis is commanded by this FB, the axis travels at the speed defined by the getriebe[...].vb_reflow parameter of the axis machine data.

q The positions of the software limit switches (kenngr.swe_pos, kenngr.swe_neg, kenngr.swe_toleranz) are monitored if the axis has been defined either as a linear or a rotary axis. This means that the kenngr.achs_typ of the axis machine data has the value 0x0001 or 0x0002. If a software limit switch position is reached, the axis is braked, keeping to the defined acceleration.

q The acknowledgement at the "in_velocity" output depends on the setting of the kenngr.vb_prozent value [unit 0.1 %]. This value defines a percentage tolerance window for the target speed. The "in_velocity" acknowledgement appears as soon as you enter the tolerance window.


MC_Stop

The MC_Stop FB leads to stopping of motion and takes the axis to the "Stopping state. The motion stop is always jerk-limited with the constant set input "jerk for the braking rate.

It aborts every ongoing command by other motion FBs. Contrary to the definition of the state graph in the case of PLCopen, it has proven useful in practice to also be able to cancel an axis that is in the "Stopping state by commanding with another motion FB. The MC_Stop FB sets the "Done output as soon as the axis has stopped. However, the "Stopping state of the axis is retained for as long as the "Execute input is still TRUE.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the action at rising edge.
 | Deceleration | LREAL | Value of the deceleration (always positive). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
VAR_OUTPUT
 | Done | BOOL | Zero velocity reached and execute is not True. Note: The output "Done indicates merely that the axis is stationary. The automatic axis state indicator remains initially in the state "Stopping". Only in addition the input "Execute" = FALSE does the automatic axis state indicator change over to the state "Standstill.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The command for stopping the axis is issued only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion or Homing state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Within the FB, the deceleration and jerk input variables are monitored only for their value ranges. If they are exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. Moreover, the "deceleration" value is limited within the motion controller. If a "deceleration" value of more than getriebe[0].dynamik.a_max is commanded, the motion is nevertheless run, but the values are limited to the defined values and a warning is issued.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "jerk".

q No new command can be sent when this FB is active. It is not retriggerable and therefore sets the "Error error output to TRUE and indicates the ErrorID 44008 (ERR_PO_AX_STOP_RETRIGGERD).


MC_AbortTrigger

The MC_AbortTrigger FB is used to abort commands that are related to trigger events (e.g. MC_TouchProbe).

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
 | TriggerInput | TRIGGER_REF | Reference for the trigger signal source (see chapter 1.2.1).
VAR_INPUT
 | Execute | BOOL | Aborts a command from FB MC_TouchProbe at the rising edge.
VAR_OUTPUT
 | Done | BOOL | Measurement command is aborted.
 | Busy | BOOL | Is TRUE, while a measuring command is aborted.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q A measurement command is only aborted if the axis is in the state Standstill, Continuous Motion, Discrete Motion, Synchronized Motion, or Stopping. Moreover, no other command for aborting of a measurement command must be active in the measurement channel specified by "trigger_input". The measurement channel must therefore be in the state TP_IDLE or TOUCHPROBING. If this is not the case, the "Error output is set to TRUE and ErrorID indicates an error value that designates the current axis state.

q If there is already an abort of a measurement command in a measurement channel active, no further command for aborting can be sent to this measurement channel. Therefore, the FB cannot be retriggered. If it is nevertheless commanded, the "Error output becomes TRUE and reports the value 44010 (ERR_PO_AX_TPABORT_RETRIG) at ErrorID.

q Errors are also generated, if, while abort measuring in the active state, the axis reference, the measurement channel or the measurement type has changed. These error codes have the following values:
44001, , (ERR_PO_AX_REF_CHG_WHILE_ACTIVE),
44011 (ERR_PO_AX_INPREF_TPCH_CHW_ACTIVE),
44012 (ERR_PO_AX_INPREF_TPMD_CHW_ACTIVE).


MC_TouchProbe

The MC_TouchProbe FB records an axis position when a trigger event occurs. The measurement channel and method (rising or falling edge of the trigger signal) are defined via the reference for the trigger signal source.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
 | TriggerInput | TRIGGER_REF | Reference to the trigger signal source (see chapter 1.2.1).
VAR_INPUT
 | Execute | BOOL | Starts touch probe recording at rising edge.
VAR_OUTPUT
 | Done | BOOL | Trigger event recorded.
 | Busy | BOOL | Is TRUE, while it is waited for the trigger event.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | CommandAborted | BOOL | Command is aborted by another command (MC_AbortTrigger).
 | RecordedPosition | LREAL | Position where trigger event occurred. Default unit [0,1µm or 10-4 °]

Behaviour of the FB

q A measurement command is issued only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion or Stopping state. Moreover, no measurement command must be active in the measurement channel specified by "trigger_input". The measurement channel must therefore be in the TP_IDLE state. If this is not the case, the "Error output is set to TRUE and ErrorID indicates an error value that designates the state the axis is currently in.

q If a measurement command in a measurement channel is active, no further measurement command in relation to this measurement channel can be sent. Therefore, the FB cannot be retriggered. If it is nevertheless commanded, the "Error output becomes TRUE and reports the value 44009 (ERR_PO_AX_TPROBE_RETRIG) at ErrorID.

q Errors are also generated, if, while measuring is active, the axis reference, the measurement channel or the measurement type has changed. These errors' codes have the values:
44001, , (ERR_PO_AX_REF_CHG_WHILE_ACTIVE),
44011 (ERR_PO_AX_INPREF_TPCH_CHW_ACTIVE),
44012 (ERR_PO_AX_INPREF_TPMD_CHW_ACTIVE).


MC_CamIn

The MC_CamIn FB enables travel along cams that are created in the form of a table.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Master | AXIS_REF | Axis reference to the master axis.
 | Slave | AXIS_REF | Axis reference to the slave axis.
VAR_INPUT
 | Execute | BOOL | Start at rising edge.
 | MasterOffset | LREAL | Offset of master table. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | SlaveOffset | LREAL | Slave axis: Offset of the table. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | MasterScaling | LREAL | Factor for the master axis profile. From the slave point of view the master overall profile is multiplied by this factor. Range [-2147483648.0, 2147483647.0] Currently only integer values may be used!
 | SlaveScaling | LREAL | Factor for the slave axis profile. The overall slave profile is multiplied by this factor. Range [-2147483648.0, 2147483647.0]
 | StartMode | DWORD | Bits 2-0: Start mode 001: Ramp in (16#1) 010: Absolute (16#2) 100: Relative (16#4)
 | CamTableID | UINT | Identifier of cam table to be used, linked to output of MC_CamTableSelect.
 | TableFctType | UDINT | Table function types: 0: STEP_DIRECT 1: LINEAR 2: POLYNOM_3 3: POLYNOM_3_KOEFF 4: LINE_POLY5 5: POLY5_LINE 6: TABLE_DEFINED
VAR_OUTPUT
 | InSync | BOOL | Cam is engaged for the first time.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | EndOfProfile | BOOL | "Pulsed" output signals the cyclic end of the cam profile.

Behaviour of the FB

q The command for travel along a cam can only be issued only when the slave axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q The value range of the masteroffset, slaveoffset, masterscaling und slavescaling input variables is monitored and, if it is exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE.

q If no table is loaded and the CamIn FB is commanded, an axis error is indicated (ErrorID = 40001) and the error ID 60172 is output via the "MC_ReadAxisError" function block.

q The function block is retriggerable. Therefore, it can send a command again in the active state.

q For an axis to work as a cam or gear master axis and for it to transfer the necessary synchronisation information to all axes (slaves) cyclically, the "cam_gear.is_master" parameter must be set to 1 for such a master axis in the axis parameter configuration. An axis configured as the master can simultaneously also be coupled to another master axis as a slave.

q The MC_CamIn FB can be used for both rotatory and linear slave axes.

q Master/slave coupling is realised with the set points of the master.

q A slave axis is defined with the following axis parameters:

- cam_gear.v_diff_percent

- cam_gear.time_in_window

- cam_gear.time_out_in_window

- cam_gear.v_max_slave

- cam_gear.a_max_slave

- cam_gear.v_phasing

- cam_gear.a_phasing

- cam_gear.d_phasing

- cam_gear.j_phasing

- cam_gear.j_vel_sync

More:

button Use of MC_CamIn


Use of MC_CamIn

q "MC_CamIn.startmode"

HLI_CI_RAMP_IN : HLI_UNS32:= 16#00000001;

HLI_CI_ABSOLUTE : HLI_UNS32:= 16#00000002;

HLI_CI_RELATIVE : HLI_UNS32:= 16#00000004;

Ramp-In and Absolute are always used. This is why these three bits currently have no effect.

HLI_CI_LOCK_TABLE : HLI_UNS32:= 16#00000008;

Specifies whether the table used for online value modification during coupling is locked. This should always be set for table data type to which atomic access is not possible. Otherwise, the problem of simultaneous memory access must be observed.

HLI_CI_F_PERIODIC : HLI_UNS32:= 16#00000010;

If this flag is not set for MC_CamIn, the stored cam is run through exactly once per rising edge of "MC_CamIn.Execute. Travel over the cam is synchronised to the modulo passing through of the master position. If the slave axis is not already on the start position of the cam table, the slave axis is drawn immediately to the cam's starting position at rising edge of "MC_CamIn.Execute and stays there until the master axis passes through zero the next time. From there, the cam profile is run through precisely once. If "MC_CamIn.Execute is triggered again during the cycle, the cam is run through a further time as if "periodic" would be TRUE. Without re-triggering the slave axis is decoupled from the master axis at the end of the CAM-table. This means, that the slave axis is stopped immediately, if it is not in standstill already.

If the cam has been modelled for an endlessly rotating slave axis, in connection with the use of interpolation point interpolation ("MC_CamIn.TableFctType" = HLI_LINEAR or HLI_POLYNOM_3), it is necessary to specify in which direction modulo correction is to take place.

If the cam has been modelled so that it passed through the slave's modulo range in the positive direction, in "MC_CamIn.Startmode" the bit:

HLI_CI_ENDLESS_POSITIVE : HLI_UNS32:= 16#0x00000020;

must be ORed.

If the cam passes through the modulo range of the slave axis in the negative direction, in "MC_CamIn.startmode" the bit:

HLI_CI_ENDLESS_NEGATIVE : HLI_UNS32:= 16#0x00000040;

must be set.

q The manufacturer-specific "MC_CamIn.table_fkt_type" input to the PLCopen FB specifies how interpolation takes place between two table interpolation points:

HLI_STEP_DIRECT : HLI_UNS32 := 0;

The position entry of the slave axis ssi is output within the position interval of the master axis smi, smi+1.

HLI_LINEAR : HLI_UNS32 := 1;

Within the master axis position interval smi, smi+1, interpolation takes place in linear fashion between the slave position entries ssi, ssi+1.

HLI_POLYNOM_3 : HLI_UNS32 := 2;

Within the master axis position interval smi, smi+1, a constant-tangent, cubic Bezier spline is interpolated between the four neighbouring slave axis position entries ssi-1,ssi, ssi+1, ssi+2. Polynomial coefficient calculation takes place online.

HLI_POLYNOM_3_KOEFF : HLI_UNS32 := 3;

Within the position interval of the master axis smi, smi+1, the position entry of the slave axis ssi (line with four values ai) consists of the coefficients of a polynomial with the format

X = a0 + a1t + a2t2 + a3t3.

Polynomial coefficient calculation therefore takes place offline.

LINE_POLY5 : HLI_UNS32 := 4;

Motion segments alternating between LINE and POLY5, starting with LINE

POLY5_LINE : HLI_UNS32 := 5;

Motion segments alternating between LINE and POLY5, starting with POLY5

TABLE_DEFINED : HLI_UNS32 := 6;

The interpolation type is defined within the table.

q Behaviour of MC_CamIn:

Both, when the master axis is already running and it is in StandStill, a so-called amplitude-true ramp-in takes place.

Engaging a cam on a running master shaft corresponds to the following mechanical analogy: The coupling has slip until the cam to be driven along with it is at the right speed. The cam is then brought to the right position.

The following parameters of achsmds.lis influence this behaviour:

cam_gear.v_diff_percent Speed tolerance in phase 2. Default: 10

cam_gear.time_in_window Min. duration of phase 2. Default: 8000[µs]

cam_gear.time_out_in_window Max. duration of phase 2. Default: 1000000[µs].

Synchronisation of the speed is jerk-limited. The "jerk" value must be set in the "cam_gear.j_vel_sync" parameter in the axis MDS. Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "jerk".

q If the slave axis is a linear axis the software limit switch has to be attended while synchronizing on position.

q In the coupled state, the coupling is "holy", i.e. axis-specific feed hold, axis-specific override CANNOT act on the cam slave because this would be contradictory to the coupling specification.

q The situation with Emergency Stop is similar: in the current realisation, the MCE finds out about an Emergency Stop situation exclusively via the drive interface. In the event of Emergency Stop, the gear coupling is released and is decelerated with the current limit, which is entered in the achs_mds parameter: "getriebe[0].lslope_profil.a_grenz_stufe_1". This standard behaviour in the case of Emergency Stop can be rendered inactive with the cam_gear.keep_coupling_on_lr_error parameter. Then cam coupling is ensured even in the event of Emergency Stop as long as the drive still follows the setpoints. The situation when the enable feed watchdog drops out is similar; this leads to an error for coupled slave axes because motion prevention has higher priority than cam coupling because this is a safety function. This standard behaviour on dropping out of the feed enable watchdog can be rendered inactive with the "cam_gear.keep_coupling_on_fe_drop" parameter. Then, cam coupling is ensured even in the event of the feed enable watchdog dropping out.

The automatic phasing after reaching synchronization of velocity is also jerk-limited. For the slave axis the following parameters are necessary to be set:

- cam_gear.v_phasing
"Velocity" of the superimposed motion for phasing.

- cam_gear.a_phasing
"Acceleration" of the superimposed motion for phasing.

- cam_gear.d_phasing
"Deceleration" of the superimposed motion for phasing.

- cam_gear.j_phasing
"Jerk" of the superimposed motion for phasing.


MC_CamOut

Commanding of a MC_CamOut FB releases coupling of the slave axis to the master axis that has been specified via a cam. The current speed of the slave is retained (endless motion).

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Slave | AXIS_REF | Axis reference to the slave axis.
VAR_INPUT
 | Execute | BOOL | Start to disengage the slave from the master.
VAR_OUTPUT
 | Done | BOOL | Disengaging completed.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q Release of coupling of the slave axis to the master axis can only be commanded if the slave axis is in the Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Mention is made here once again of the (idiosyncratic) definition of the PLCopen standard to the effect that the commanded slave axis remains at its momentary speed after cancellation of coupling. Therefore, it does not necessarily stop.

q The function block is retriggerable. Therefore, it can send a command again in the active state.


MC_CamTableSelect

FB MC_CamTableSelect wird dazu verwendet um über den Dateinamen die CAM-Tabellen-ID zu ermitteln. Diese kann dann als Input für den FB MC_CamIn verwendet werden.

The MC_CamTableSelect FB is used to determine the CamTableID of a cam table that is referenced by the filename of the cam table. The evaluated structure CamTableID can be used to run a MC_CamIn instance or other FBs with such an input.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Master | AXIS_REF | Axis reference to the master axis.
 | Slave | AXIS_REF | Axis reference to the slave axis.
VAR_INPUT
 | Execute | BOOL | Selection at rising edge.
 | CamTable | MC_CAM_REF | Reference to cam table description.
VAR_OUTPUT
 | Done | BOOL | If TRUE, identification structure for cam table is ready to use and valid.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | CamTableID | MC_CAM_ID | Identification structure of referenced cam table

Behaviour of the FB

q If filename and cam table identification number is given by input structure CamTable, evaluation of CamTableID output structure by given filename has higher priority. Then function block evaluates the cam table ID.

q Commanding is possible at any time regardless of the state of the master or slave axis.


MC_GearIn

The MC_GearIn FB commands gear coupling with a gear ratio. The gear ratio defines the speed ratio between the master and slave axes. The synchronization to the velocity is jerk-limited. "Jerk" is set via input at the FB.

The slave axis can be coupled either to master setpoints or to actual master values. The selection is made in the "Mode" input parameter.

For test purposes, automatic phase compensation has also been implemented. This function is also activated via the "Mode" parameter. After speed synchronisation (actual value or setpoint coupling), automatic phase compensation between the master and slave takes place on the basis of the two axes' actual positions. At the moment, a phase offset unequal to 0 cannot be set, i.e. for sensible synchronisation the master and slave coordinate systems must have the same origin. Alternatively, the PLC programmer must explicitly establish position synchronicity by calling up MC_MoveSuperImposed.

If at all possible, automatic phase compensation should be used only for testing, but not for operation on a system. However, the behaviour of the respective axis mode combination must be exactly observed.

The following behaviour during automatic phasing results for the various axis modes of the master and slave:

- Master linear, slave linear
Phase compensation is realised at the zero master/slave offset

- Master modulo, slave modulo
Phase compensation is realised at the zero master/slave offset over the shortest distance. The master and slave should best have the same modulo range. If this is not the case, the modulo range of the master axis is used to determine the distance.

- Master modulo, slave linear
Phase compensation is realised at the zero master/slave offset The distance is not modulo calculated.

- Master modulo, slave modulo
Phase compensation is realised at the zero master/slave offset The distance is not modulo calculated (because the modulo range of the master axis is (+231-1) to (-231)).

Block diagram

Parameters of the FB

VAR_IN_OUT

Master

AXIS_REF

Axis reference to the master axis.

Slave

AXIS_REF

Axis reference to the slave axis

VAR_INPUT

Execute

BOOL

Start the gearing process at the rising edge.

RatioNumerator

DINT

Gear ratio Numerator.

RatioDenominator

DINT

Gear ratio Denominator.

Acceleration

LREAL

Acceleration for gearing in (always positive).

Range [1.0, 2147483647.0]
Default unit [1mm/s2 or 1°/s2]

Deceleration

LREAL

Deceleration for gearing in (always positive).

Range [1.0, 2147483647.0]
Default unit [1mm/s2 or 1°/s2]

Jerk

LREAL

Jerk for gearing in (always positive).

Range [1.0, 2147483647.0]
Default unit [1m/s3 or 1000°/s3]

Mode

UDINT

Possible values are:

0: (16#0) | Type of coupling between master axis and slave: Coupling based on command values. Automatic phase compensation: off.
128: (16#80) | Type of coupling between master axis and slave: Coupling based on actual values.
256: (16#100) | Automatic phase compensation: on. Only for testing purposes!

VAR_OUTPUT

InGear

BOOL

Commanded gearing completed.

Error

BOOL

Indicates if an error has occurred.

ErrorID

WORD

Error identification.

CommandAborted

BOOL

Command is aborted by another command.

Behaviour of the FB

q The command for gear coupling can only be issued only when the slave axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q The value range of the Acceleration, Deceleration and Jerk input variables is monitored and, if it is exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. The RatioDenominator input variable is the denominator of the gear ratio and this is why this must be unequal to 0. In the event of the RatioDenominator = 0 error, the ErrorID 44040 (ERR_PO_AX_RATIO_DENOM_ZERO) is output and "Error becomes TRUE.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "Jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "Jerk".

q The function block is re-triggerable. Therefore, it can send a command again in the active state.

q For an axis to work as a cam or gear "Master" and for it to transfer the necessary synchronisation information to all axes (slaves) cyclically, the "cam_gear.is_master" parameter must be set to 1 for such a master axis in the axis parameter configuration. An axis configured as the master can simultaneously also be coupled to another master axis as a slave.

q The MC_GearIn FB can be used for linear and rotatory slave axes. In the case of linear slave axes, software limit switch monitoring is active after homing. On deceleration to the software limit, the current limit ramp is used and gear coupling is released.

q In all other situations, gear coupling is "holy", i.e. axis-specific feed hold, axis-specific override CANNOT act on the cam slave because this would be contradictory to the coupling specification.

q The situation with Emergency Stop is similar: in the current realisation, the MCE finds out about an Emergency Stop situation exclusively via the drive interface. In the event of Emergency Stop, the gear coupling is released and is decelerated with the current limit, which is entered in the achs_mds parameter: "getriebe[0].lslope_profil.a_grenz_stufe_1. This standard behaviour in the case of Emergency Stop can be rendered inactive with the cam_gear.keep_coupling_on_lr_error parameter. Then gear coupling is ensured even in the event of Emergency Stop as long as the drive still follows the setpoints. The situation when the enable feed watchdog drops out is similar; this leads to an error for coupled slave axes because motion prevention has higher priority than gear coupling because this is a safety function. This standard behaviour on dropping out of the feed enable watchdog can be rendered inactive with the "cam_gear.keep_coupling_on_fe_drop parameter. Then, gear coupling is ensured even in the event of the feed enable watchdog dropping out.

q With the "Mode" input parameter, you can set whether master/slave coupling is to take place with the master's actual values or setpoints and whether automatic phasing is to take place after speed synchronisation.

Each SAI axis can be operated as a slave axis. The following standard axis parameters must be set in a slave axis for both actual value and setpoint coupling:

- cam_gear.v_diff_percent

- cam_gear.time_in_window

- cam_gear.time_out_in_window

- cam_gear.v_max_slave

- cam_gear.a_max_slave

- getriebe[0].vb_mit_null

In the case of actual value coupling, the following parameters must also be set in the slave axis:

Filtering of the master actual values

- cam_gear.mv_type
Digital FIR filter on/off.

- cam_gear.mv_nbr_cycles
Number of the values over which filtering takes place.

Dead time compensation for constant speed

- cam_gear.delay_time
Dead time compensation ensures that constant speed and a coupling ratio of 1 always results in the same phase between the master and slave. Compensation involves errors in phases of speed that is not constant. The dead time should be determined by trial and error.

When automatic phasing is commanded (actual value or setpoint coupling), the following axis parameters must also be set in the slave:

- cam_gear.v_phasing
"Speed" of the superimposed motion for phasing.

- cam_gear.a_phasing
"Acceleration" of the superimposed motion for phasing.

- cam_gear.d_phasing
"Deceleration" of the superimposed motion for phasing.

- cam_gear.j_phasing
"Jerk" of the superimposed motion for phasing.


MC_GearOut

The MC_GearOut FB releases coupling of the slave axis to the master axis that has been specified via a gear ratio. The current speed of the slave is retained (endless motion).

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Slave | AXIS_REF | Axis reference to the slave axis.
VAR_INPUT
 | Execute | BOOL | Start disengaging process at the rising edge.
VAR_OUTPUT
 | Done | BOOL | Disengaging completed.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q Cancellation of gear coupling is commanded only when the axis is in the Synchronized Motion state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q Mention is made here once again of the (idiosyncratic) definition of the PLCopen standard to the effect that the commanded slave axis remains at its momentary speed after cancellation of coupling. Therefore, it does not necessarily stop.

q The function block is retriggerable, i.e. it can send a command when it is in the active state.


MC_Phasing

The MC_Phasing FB is used to achieve an offset of the slave axis with respect to the master axis. To this end, a phase offset of the master axis is specified from the point of view of the master axis and the slave axis tries to eliminate this offset by accelerating or decelerating. The motion is always executed jerk-limited with the constant set input "Jerk". This value is valid for both "Acceleration" and "Deceleration".

The mechanical analogy is release coupling of the master and slave axes for a limited period.

In the case of camming, this FB results in a change in the "apparent" master position from the slave's point of view. In the case of gearing, a phase offset is produced between the master and slave by commanding a superimposed motion in the slave. Therefore, in the case of gearing, MC_Phasing has the same effect as MC_MoveSuperImposed (into which it is actually converted in the control system).

In the case of camming, the dynamics values "Velocity", "Acceleration" and "Deceleration" refer to the change in the "apparent" master position from the point of view of the slave whereas, in the case of gearing, they refer to the superimposed motion of the slave axis itself.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Master | AXIS_REF | Axis reference to the master axis.
 | Slave | AXIS_REF | Axis reference to the slave axis
VAR_INPUT
 | Execute | BOOL | Start the phasing process at the rising edge.
 | PhaseShift | LREAL | Phase shift between master axis and slave axis, as seen by the slave axis. The calculated phase shift is transferred to the slave axis as the master axis position. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm or 10-4 °]
 | Velocity | LREAL | Maximum value of the velocity that may be attained during generation of the phase shift. The velocity is not necessarily achieved. Range [1.0, 2147483647.0] Default unit [1µm/s or 10-3 °/s]
 | Acceleration | LREAL | Maximum acceleration to reach phase difference (always positive). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Deceleration | LREAL | Maximum deceleration to reach phase difference (always positive). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Maximum Jerk to reach phase difference (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
VAR_OUTPUT
 | Done | BOOL | Commanded phasing reached.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q Phase offset can only be commanded when the slave axis is in the Synchronized Motion state.

q If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q The value range of the PhaseShift, Velocity, Acceleration, Deceleration, and Jerk input variables is monitored and, if it is exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "Jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "Jerk".

q The function block is retriggerable, i.e. it can send a command when it is in the active state.


MC_ReadParameter

This function block corresponds to the function block described in PLCopen for reading parameters.

The current implementation only supports reading from the axis lists (achsmdsX.lis). Default lists (default_achs_mds.lis) are not supported.

The parameter set 0 and the list type "ACHS_MDS" are used by default.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Enable | BOOL | Get the values of the parameters continuously while enabled.
 | ParameterNumber | STRING | Number/Identification of the parameter to be read, e.g. kenngr.swe_pos.
 | ParameterType | STRING | Kind of parameter to be read. Current: ACHS_MDS
VAR_OUTPUT
 | Valid | BOOL | Parameter available.
 | Busy | BOOL | The FB with the "Busy" = TRUE has control on the axis
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | Value | STRING | Parameter value from the original list.
 | InternalErrorID | UDINT | Internal error identification of the ISG-MCP.

Behaviour of the FB

q The behaviour of this FB corresponds to that of the MCV_ReadParamValue function block.


MC_WriteParameter

This function block corresponds to the function block described in PLCopen for writing parameters.

Three steps are carried out when writing a parameter with this function block:

1) Writing the parameter value into the work list

2) Activating the work list (parameters take effect in the ISG-MCP)

3) Storing the work list back to the original list

This means that a parameter value that is written with this FB also takes effect immediately and is permanently stored.

This FB is not suitable for consistently writing several parameter values. In this case, you must use the MCV_ChgParamValue, MCV_ActivateParamChg and MCV_SaveParamChg function blocks.

The current implementation only supports writing of the axis lists (achsmdsX.lis). Default lists (default_achs_mds.lis) are not supported.

During the write operation, the axis must be at standstill and motion commands must not have been or must not be started for the axis. The axis must not be moved again until the parameter has been written and the new value is active in the controller (output Done = TRUE).

For modification of a parameter, this function block requires an original list that can be read in by the controller without warnings and error messages.

The parameter set 0 and the list type "ACHS_MDS" are used by default.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Write the value of the parameter at rising edge.
 | ParameterNumber | STRING | Number/Identification of the parameter to be written, e.g. kenngr.swe_pos.
 | ParameterType | STRING | Kind of parameter to be written. Current: ACHS_MDS
 | Value | STRING | New value of the parameter.
VAR_OUTPUT
 | Done | BOOL | Parameter successfully written.
 | Busy | BOOL | The FB with the "Busy" = TRUE has control on the axis.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.
 | InternalErrorID | UDINT | Internal error identification of the ISG-MCP.

Behaviour of the FB

A frequent cause of ISG-MCP errors are absent write privileges or a write-protected work list or original list because, in these cases, a work list is not created or an original list cannot be replaced.


MC_SetPosition

Function block shifts coordinate system of an axis by assigning a given position value to the set-point position and the actual position. No movement of the axis occurs by assigning the new value.

The FB only works if parameter kenngr.set_refpos_mode (P-AXIS-00278) of an axis parameter list is set to the value mentioned below:

kenngr.set_refpos_mode PLC

Block diagram

Parameter of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Write position to an axis at rising.
 | Position | LREAL | Position, the axis takes as new set-point position and actual position if a rising edge at input "Execute" occurs. Range [-2147483648.0, 2147483647.0] Default unit [0,1µm bzw. 10-4 °].
VAR_OUTPUT
 | Done | BOOL | Axis has taken value of input "Position as new set-point position and actual position successfully.
 | Busy | BOOL | The FB with the "Busy" = TRUE has control on the axis.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.


MC_SetOverride

With the FB MC_SetOverride a weighting factor, which affects the commanded velocity, is set.

Block diagram

Parameter of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | If this value is set to TRUE the weighting factor is applied to the commanded velocity.
 | VelFactor | LREAL | Range [0.0 .. P-AXIS-00109 / 1000]
VAR_OUTPUT
 | Enabled | BOOL | If this value signs TRUE the weighting factor at the input is continuously applied to the axis.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q This function does not affect axes which reside in state SYNCHRONIZED_MOTION!

Note: Applications in packaging environment often consist of machine elements, that interact closely with other machine elements and are synchronized by a Cam/Gear-coupling. Loosing the synchronisation of this coupling leads in many cases to severe machine damage. Therefore the implementation of the MCP prohibits that axis specific override has influence onto the Cam/Gear slave axis, because this violates the coupling directive.

q VelFactor always may be set, if ISG-MCP has been initialised correctly.

q If the value of "VelFactor" is larger than P-AXIS-00109/1000 the value will be restricted to P-AXIS-00109/1000 (typical maximum value is 200%).

q The given value at the input VelFactor is cyclically applied to the axis as long as the input Enable is set to TRUE. If Enabled changes from TRUE to FALSE the applying velocity weighting factor is set to the value which was set at the input VelFactor while the transition at the input Enabled occurred.


MC_Halt

The MC_Halt FB leads to stopping of motion. The motion stop is always jerk-limited with the constant set input "Jerk" for the braking rate. It aborts every ongoing command by other motion FBs. Contrary to the FB MC_Stop the FB MC_Halt may be aborted by commanding another motion FB. In this case, the output "CommandAborted" is set.

The MC_Halt FB sets the "Done output as soon as the axis has stopped.

Block diagram

Parameter of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Start the action at rising edge.
 | Deceleration | LREAL | Value of the deceleration (always positive). Range [1.0, 2147483647.0] Default unit [1mm/s2 or 1°/s2]
 | Jerk | LREAL | Value of the Jerk (always positive). Range [1.0, 2147483647.0] Default unit [1m/s3 or 1000°/s3]
VAR_OUTPUT
 | Done | BOOL | Zero velocity reached and execute is not True.
 | CommandAborted | BOOL | Command is aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q Within the FB, the Deceleration and Jerk input variables are monitored only for their value ranges. If they are exceeded, an error number referring to the variable is output at the ErrorID output and "Error is set to TRUE. Moreover, the "Deceleration" value is limited within the motion controller. If a "Deceleration" value of more than getriebe[0].dynamik.a_max is commanded, the motion is nevertheless run, but the values are limited to the defined values and a warning is issued.

q Values that correspond to a minimum ramp time of TA (cycle time of the IPO, e.g. 2 ms) and a maximum ramp time of 100s make sense as the "Jerk". The limit transition to non-jerk-limited speed realisation lies at the minimum ramp time of TA. In the case of a value of 0, the maximum ramp time from the axis MDS is used to determine the "Jerk".


PLC-Library "McpPLCopenP1" - ISG enhancement

TwinCAT CNC: Overview

PLC-Library McpPLCopenP1  ISG enhancement

The function blocks described in chapter provide additional functionality on the standard PLCopen function blocks. Theyre also located in the library where the PLCopen function block Function blocks for motion control are located.

More:

button Overview of the additional ISG FBs

button MCV_CamSwitch

button MCV_TorqueLimit

button MCV_RmvPlug

button MCV_SetFollowUp

button MCV_SetDriveMode

button MCV_SetTorqueValue

button MCV_PosLagMonitor

button MCV_Home

button MCV_DisableFeedbackMon

button MCV_ChgParamSet

button MCV_ReqParamSetId

button MCV_ChgParamValue

button MCV_ActivateParamChg

button MCV_SaveParamChg

button MCV_ReadParamValue

button MCV_DiscardParamChg

button MCV_UnHome

button MCV_DeactivateAxis

button MCV_UpdateDriveData

button MCV_Decouple

button MCV_Couple

button MCV_ConveyorControl

button MCV_SetReducedFilter

button MCV_SuppressSoftLimSw

button MCV_TorqueFreeStop


Overview of the additional ISG FBs

The following table gives you an overview of the availability of the additional ISG FBs depending on PLC system and drive type.

FB | PLC System
 | KW | 3S | TwinCat
MCV_CamSwitch | SIMU DSE SERCOS | SIMU - SERCOS | SIMU
MCV_TorqueLimit | - DSE SERCOS | - - SERCOS | -
MCV_SetFollowUp | SIMU DSE - | SIMU - - | -
MCV_SetDriveMode | - DSE SERCOS | - - SERCOS | -
MCV_SetTorqueValue | - DSE SERCOS | - - SERCOS | -
MCV_PosLagMonitor | - DSE - | - - - | -
MCV_Home | - - - | - - - | -
MCV_DisableFeedbackMon | - DSE - | - - - | -
MCV_ChgParamSet | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_ReqParamSetId | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_ChgParamValue | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_ActivateParamChg | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_SaveParamChg | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_ReadParamValue | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_DiscardParamChg | SIMU DSE SERCOS | SIMU 1) - SERCOS 1) | -
MCV_UnHome | - DSE - | - - - | -
MCV_DeactivateAxis | - DSE - | - - - | -
MCV_UpdateDriveData | - DSE - | - - - | -
MCV_Decouple | - DSE - | - - - | -
MCV_Couple | - DSE - | - - - | -
MCV_ConveyorControl 1) | SIMU DSE SERCOS | SIMU DSE SERCOS | SIMU DSE SERCOS
MCV_ SetReducedFilter | SIMU DSE SERCOS | SIMU DSE SERCOS | SIMU DSE SERCOS
MCV_SuppressSoftLimSw | SIMU DSE SERCOS | SIMU DSE SERCOS | SIMU DSE SERCOS
MCV_TorqueFreeStop | - - SERCOS | - - SERCOS | -

1) Availability depends on used MCE.


MCV_CamSwitch

The MCV_CamSwitch FB realises the output of a cam-controlled switch that is assigned to an axis. The cam's range can be defined freely.

The FBs internal calculations are based on a modulo coordinate system with the value range [0, 3600000] 0,1 µm or 10-4°.

The prerequisite that no more than half the modulo value range is covered by the axis in each PLC cycle must also be fulfilled.

Block diagram

Parameters of the FB

VAR_IN_OUT

Axis

AXIS_REF

Axis reference.

VAR_INPUT

Enable

BOOL

Activates the cam-driven switch.

FirstOnPosition

DINT

Position of the axis at which the output of the cam-driven switch changes from FALSE to TRUE, if the axis is rotating in a positive direction.

Default unit [0,1µm or 10-4 °]

LastOnPosition

DINT

Position of the axis at which the output of the cam-driven switch changes from TRUE to FALSE, if the axis is rotating in a positive direction.

Default unit [0,1µm or 10-4 °]

CompTime

DINT

Compensation time by which the switch-on phase of the cam-driven switch is advanced or delayed.

Unit [1ms]

PosType

INT

Selection whether command position or actual position of the axis should be used for comparison with the input variables and for calculation of the switch-on position / switch-off position that is changed by the compensation time.

0: Actual position of the axis (ACTIVE_POS)

1: Command position of the axis
(CURRENT_POS)

VAR_OUTPUT

Active

BOOL

Indicates the current state of the cam-driven switch.

State

BOOL

Output of the cam-driven switch.

The output is TRUE, if:

Case 1:
FirstOnPosition < LastOnPosition
The value of the axis position lies between FirstOnPosition and LastOnPosition.

Case 2:
 FirstOnPosition > LastOnPosition
The value of the axis position lies at time t0in front of and at the following time t1behind the range spanned by FirstOnPosition and LastOnPosition The signal remains for at least one PLC cycle at TRUE.

Error

BOOL

Indicates if an error has occurred.

ErrorID

WORD

Error identification.

Pulsed

BOOL

For visualization purposes. If "State" = TRUE, "Pulsed" is assigned TRUE for one second.

Behaviour of the FB

q Input values for FirstOnPosition and LastOnPosition that are less than the low limit of the modulo coordinate system are set to the low limit and input values that are more than the high limit are set to the high limit. This is done internally in the FB without acknowledgement.

q Specification of a compensation time leads in the FB to modification of the switching positioned defined by  FirstOnPosition and LastOnPosition. If values should result for the modified switching positions that are outside the value range of the modulo coordinate system, these are converted to values within the range. This is done internally in the FB without acknowledgement.

q Modification of the switching positions by specification of a compensation time is done directly in the PLC cycle by virtue of the fact that they are passed on at the "CompTime" input and fully take effect immediately.

q Specification of the compensation time "CompTime" acts equally on the FirstOnPosition and LastOnPosition. Positive values for "CompTime" lead to a situation in which the "State" output changes after a delay to reach a switching position. Negative values lead to a situation in which the "State" output changes before the switching position is reached.

Figure 3-1: Impact of the compensation time on the switching times

q Behaviour of the State output of the cam-controlled switch and the positions that are passed on to the FirstOnPosition and LastOnPosition inputs. The axis moves in positive direction from the low limit of the modulo coordinate system to the high limit.

Case 1:  FirstOnPosition<LastOnPosition

Figure 3-2: Behaviour of the "State" output when FirstOnPosition < LastOnPosition

Case 2:  FirstOnPosition>LastOnPosition

Figure 3-3: Behaviour of the "State" output when FirstOnPosition < LastOnPosition

q The FB takes two special cases into account, which result from the fact that the PLC system is a discreet system. These are:

- The axis position at the time tn is before the switch-on position and the axis position at the time tn+1 is after the switch-off position. Therefore, the switching range is less than the distance covered by the axis in one PLC cycle.

- If the axis position is before the switch-on position at the time tn, specification of a compensation time may result in a situation in which the axis position at the time tn+1 is after the switch-off position due to modification of the switch-on points.

q In these special cases, the "State" output becomes TRUE for at least one PLC cycle although it was not detected within one revolution of the axis that the axis position was between the switching positions.


MCV_TorqueLimit

The MCV_TorqueLimit FB limits the maximum torque of the drive for every motion direction independently.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Enable | BOOL | If "Enable = TRUE, the torque limitation is active.
 | TorqueLimitPositive | INT | Maximum torque of the drive in the positive direction of motion. Unit [0.1%].
 | TorqueLimitNegative | INT | Maximum torque of the drive in the negative direction of motion. Unit [0.1%].
VAR_OUTPUT
 | ActualTorque | INT | Currently effective torque of the drive. Unit [0,1%]
 | LimitActive | BOOL | Torque limitation is activated.
 | LimitReachedPositive | BOOL | The maximum torque for the positive direction of motion has been attained.
 | LimitReachedNegative | BOOL | The maximum torque for the negative direction of motion has been attained.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The torque limit can always be specified whenever the ISG-MCP has been initialised correctly.

q The torque limit must be specified separately for each motion direction of the axis. If no value is specified for the torque limit via the "TorqueLimitPositive" or "TorqueLimitNegative" inputs, the default of 100% is specified by the FB. Input values less than 0% and more than 130% are limited to 0% or 130% without any further acknowledgement.

q The MVC_PosLagMonitor FB is used to deactivate following error monitoring.

q The "LimitReachedPositive" and "LimitReachedNegative" outputs become TRUE whenever the currently acting torque corresponds to at least 95% of the torque commanded via this FB.


MCV_RmvPlug

The MCV_RmvPlug FB is used to check whether and which of the 16 axes interfaces are blocked by unacknowledged commands of the PLCopen FBs. After checking, this FB can be used to remove detected blockages.

This FB serves diagnostic purposes and must only be used during the development phase of a project.

Block diagram

Parameters of the FB

VAR_INPUT
 | check_plug | BOOL | Starts the check to discover which of up to 16 axis interfaces are blocked by a task not acknowledged by the PLC.
 | clear_all_plugs | BOOL | Acknowledges all tasks which are blocking an axis interface.
 | clear_ax_01 | BOOL | The blocking of each axis interface by an unacknowledged task can be removed separately.
 | clear_ax_16 | BOOL
VAR_OUTPUT
 | any_blocked | BOOL | Is TRUE if after the start of the check of the axis interfaces a blocking due to an unacknowledged task is detected at one or more axis interfaces.
 | highest_id_blocked | BOOL | Indicates the index number of the axis with the highest number that is blocked due to an unacknowledged task.
 | blocked_ax_01 | BOOL | The blocking of each axis interface by an unacknowledged task can be indicated separately. The value is TRUE at each blocked axis interface.
 | blocked_ax_16 | BOOL

Behaviour of the FB

q The function block can be command independently of the state of the axis.

q The check for blocked axis interfaces is started via the "check_plug" input. An axis interface is considered to be block and thus incapable of reporting other commands issued to the assigned axis if a command is applied at the interface as processed for more than 10 successive PLC cycles, but has not been acknowledged by the PLC. The blocking command is identified by its ordinal number and this is stored.

q The "any_blocked" output becomes TRUE if at least one axis interface is blocked.

q If an axis is blocked, the "blocked_ax_01" ... "blocked_ax_16" assigned to an axis becomes TRUE.

q If any axis is blocked, the "highest_id_blocked" output indicates the highest ordinal number of all blocked axes.

q Via the "clear_all_plugs" input, for every blocked axis precisely the command is acknowledged by this FB whose ordinal number has been stored for the axis.

q For each axis, blockage can be individually removed via the "clear_ax_01" ... "clear_ax_16" inputs.


MCV_SetFollowUp

Follow-up mode is activated or deactivated with the MCV_SetFollowUp FB.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Enable | BOOL | If "Enable = TRUE, follow up mode is active.
VAR_OUTPUT
 | Active | BOOL | Follow up mode is active.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q Follow-up mode is activated or deactivated via the Enable input.

q Commanding of follow-up operation is not possible during interpolation and leads to the error with the ErrorID 44051 (ERR_PO_AX_FOLLOW_UP_NOT_ALLOWED) in the FB.


MCV_SetDriveMode

Different operating modes can be set with the MCV_SetDriveMode FB. For the available drive modes see the table below.

Block diagram

Parameters of the FB

VAR_IN_OUT

Axis

AXIS_REF

Axis reference.

VAR_INPUT

Execute

BOOL

Change drive mode at rising edge.

DriveMode

INT

Drive mode to be set (see above).

VAR_OUTPUT

ActiveDriveMode

BOOL

The FB MCV_SetDriveMode is active.

ActualDriveMode

INT

Currently supported drive modes:

(0) | position control
(1) | speed control
(2) | torque control
(3) | position control with torque pilot control

Error

BOOL

Indicates if an error has occurred.

ErrorID

WORD

Error identification.

Behaviour of the FB

q Following error monitoring must be deactivated to ensure that no following error will occur during torque control (see MCV_PosLagMonitor FB).

q Use of an inadmissible mode sets the "Error output to TRUE. ErrorID is assigned the error code 44049 (ERR_PO_AX_INVALID_DRIVE_MODE).

q The mode change to "TorqueControl takes place only when the axis is in the Standstill or Continuous Motion or Discrete Motion or Synchronized Motion state. If this is not the case, the "Error output becomes FALSE and ErrorID = 44050 (ERR_PO_AX_TNA_TORQUE_CTRL_ACTIVE).


MCV_SetTorqueValue

The value for the maximum torque in ±0.1% is set with the MCV_SetTorqueValue FB.

Block diagram

Parameters of the FB

 | VAR_IN_OUT
 |  | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 |  | Enable | BOOL | Activates torque for drive mode torque control.
 |  | TorqueValue | INT | Maximum torque value. Unit [0.1%]
VAR_OUTPUT
 |  | ActiveTorqueCommand | BOOL | Torque is active.
 |  | ActualTorqueValue | INT | Current torque value. Unit [0.1%]
 |  | Error | BOOL | Indicates if an error has occurred.
 |  | ErrorID | WORD | Error identification.

Behaviour of the FB

The maximum torque is entered in the value range -1000 ≤ 0 ≤ +1000. The unit is 0.1% of the maximum torque, in the positive or negative direction of rotation.

The entered value is active as soon as "Enable is set to TRUE. The entered value is accepted immediately if the FB is permanently activated.


MCV_PosLagMonitor

Position lag monitoring may be deactivated with the FB MCV_PosLagMonitor. The default setting for position lag monitoring is active.

Block diagram

Parameters of the FB

 | VAR_IN_OUT
 |  | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 |  | Enable | BOOL | Function block is active if "Enable = TRUE.
 |  | DisableMonitoring | BOOL | Set DisableMonitoring = TRUE for deactivating position lag monitoring.
VAR_OUTPUT
 |  | IsDisabled | BOOL | Indicates if position lag monitoring is deactivated.
 |  | Error | BOOL | Indicates if an error has occurred.
 |  | ErrorID | WORD | Error identification.

Behaviour of the FB

The "DisableMonitoring input signal serves as the on/off switch for following error monitoring. The setting is activated by "Enable. Coupling of the two inputs is possible.


MCV_Home

Reference point travel of the axis is commanded with the MCV_Home FB. MCV_Home extends the functionality of the PLCopen FB MC_Home with an additional input "CamSignal" which is evaluated as signal for the take-over of the referencing position. Normally, the source of "CamSignal" is the reference cam signal of the drive.

It is required that for correct function the parameter P-AXIS-00036 has to be set to 0. If the take-over of the referencing position is done at rising or falling edge at "CamSignal" is set with the parameter P-AXIS-00038.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start the axis referencing at rising edge.
 | CamSignal | BOOL | Signal for the take-over of the referencing position.
VAR_OUTPUT
 | Done | BOOL | When axis referencing is finished, the output of "Done is TRUE and the axis is in state "Standstill.
 | CommandAborted | BOOL | TRUE indicates that the referencing command has been aborted by another command.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB:

q Commanding reference point travel is permissible only if the axis is in the Standstill state. If this is not the case, the "Error output is set to FALSE and ErrorID indicates an error value that designates the state the axis is currently in.

q No new command can be sent when this FB is active. It cannot be retriggered. If an attempt is nevertheless made to do this, the FB returns the error 44007 (ERR_PO_AX_HOMING_RETRIGGERD).

q The axis change to the Homing state directly after command of reference point travel.


MCV_DisableFeedbackMon

The MCV_DisableFeedbackMon disables the feedback monitoring, e.g. for online decoupling.

The FB deactivates the following DSE error messages:

q Encoder errors

q Actual velocity errors

q Position lag errors

q Resolver errors

q Motor temperature errors

By default, the feedback monitoring is enabled.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | Setting "Enable TRUE for disables feedback monitoring.
VAR_OUTPUT
 | IsDisabled | BOOL | TRUE indicated that the feedback monitoring is disabled.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.


MCV_ChgParamSet

Change parameter set

A parameter set can be changed with this function block. The original list of the selected parameter set is interpreted and the parameters take effect in the ISG-MCP. For example, it is necessary to change to another parameter set when changing tools.

During the parameter set change, the axis must be at standstill and motion commands must not have been or must not be started for the axis. The axis must not be moved again until all parameters of the new parameter set have been read in and have taken effect in the controller ("Valid = TRUE).

The controller's behaviour may change when the parameter set is changes. This may modify or deactivate functions critical to safety.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Start changing of parameter set at rising edge.
 | NcListTypeIn | STRING | Identification for parameter or list type, e.g. ACHS_MDS.
 | NcParamSetIDIn | UINT | Number of parameter set to be changed. The value 0 for the parameter set ID indicates the default parameter set that is interpreted and activated while the start up of the Motion Controller. Please consider the directive for alternative parameter sets.
VAR_OUTPUT
 | Valid | BOOL | Indicates if the change of the parameter set has been successful.
 | Busy | BOOL | Indicates if the function block is still busy.
 | NCListTypeOut | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDOut | UINT | Number of the parameter set.
 | NCParamConsistent | BOOL | Indicates if all parameters has been successfully set while changing the parameter set.
 | NCWarning | BOOL | Indicates if a warning in the ISG-MCP has occurred.
 | NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
 | NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
 | Error | BOOL | Indicates if an error has occurred. Change of parameter set is not executed.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if "Error = TRUE. The parameter set has not been changed correctly. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.

q If NCError = TRUE and NCParamConsistent = TRUE, the new parameter set has not been correctly interpreted. No new parameters have been read in and the old parameters remain unchanged.

If the function block assumes the error state when the parameter set is changed, i.e. Error = TRUE and at the same time

· NCError = TRUE and

· NCParamConsistent = FALSE,

then the controller has inconsistent data. Either a new parameter set must be correctly read in or the controller must be restarted.

q If the FB returns a warning (NCWarning = TRUE), it was not possible to accept at least one parameter and this parameter's value has been internally corrected by the controller.

If the parameter set are saved in files, the default parameter set for the specified axis is the one specified in the start up list. It is interpreted and activated while starting up the Motion Controller. Example for the first axis in the system:

achs_mds[0] isgnc\listen\achsmds1.lis

For choosing the default parameter set NCParamSetIDIn has to be set to 0.

The names of all further files with alternative parameter sets for this axis consist of the name of the default parameter set, appended with the underline sign _ and an additional number.

achsmds1_1.lis

achsmds1_2.lis

...

The appended number has to be set to NCParamSetIDIn if a alternative parameter set is to be activated.

The files containing the alternative parameter sets must be located in the same directory as the file of the default parameter set.


MCV_ReqParamSetId

Request parameter set number

So that it is known in the PLC which parameter set is currently being used for an axis, the active parameter set's number can be requested by the axis administration.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Request for current parameter set started at rising edge.
 | NCListTypeIn | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
VAR_OUTPUT
 | Valid | BOOL | Indicates if the parameter set is being successfully read.
 | Busy | BOOL | Indicates if the function block is still busy.
 | NCListTypeOut | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIdOut | UINT | Number of parameter set which is currently used for this axis.
 | NCWarning | BOOL | Indicates if a warning in the ISG-MCP has occurred.
 | NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
 | NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
 | Error | BOOL | Indicates if an error has occurred. Change of parameter set is not executed.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if Error = TRUE. The active parameter set number could not be read. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.


MCV_ChgParamValue

Change parameter value

With this function block, a parameter is written into the work list of the specified parameter set. This parameter set need not correspond to the active one. When a parameter is changed in a parameter set for the first time, a copy of the original list is created as the work list.

The modified parameters of the work list are not accepted by the ISG-MCP, and do not take effect, until after activation with the MCV_ActivateParamChg function block.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Change of parameter value at rising edge.
 | NCListTypeIn | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDIn | UINT | Number of parameter set in which the value is to be changed.
 | NCParamIdentIn | STRING | Identification of the parameter to be changed, e.g. kenngr.swe_pos.
 | NCParamValueIn | STRING | New value of the parameter.
VAR_OUTPUT
 | Valid | BOOL | Indicates if the change of the parameter has been successful.
 | Busy | BOOL | Indicates if the function block is still busy.
 | nc_list_type_out | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCListTypeOut | UINT | Number of parameter set in which the parameter value should have been changed or is changed.
 | NCParamSetIDOut | STRING | Identification of the parameter to be changed, e.g. kenngr.swe_pos.
 | NCParamIdentOut | STRING | New value of the parameter.
 | NCParamValueOut | BOOL | Indicates if a warning in the ISG-MCP has occurred.
 | NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
 | NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
 | Error | BOOL | Indicates if an error has occurred. Change of parameter set is not executed.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if Error = TRUE. The parameter has not been written to the work list. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.

q A frequent cause of ISG-MCP errors are absent write privileges or a write-protected work list because, in these cases, a work list is not created or a parameter cannot be written.


MCV_ActivateParamChg

Activate modified parameters from the work list

As a result of this activation, the modified parameters stored in the work list are accepted by the ISG-MCP and take effect in the controller. On the occasion of this activation, the parameter values are simultaneously checked for plausibility.

During activation of a parameter set, the axis must be at standstill and motion commands must not have been or must not be started for the axis. The axis may only be moved again after completed activation of all parameters ("Valid = TRUE).

The controller's behaviour may change on activation of a parameter with the work list. This may modify or deactivate functions critical to safety.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Activation of the parameter at rising edge.
 | NCListTypeIn | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDIn | UINT | Number of parameter set to be activated.
VAR_OUTPUT
 | Valid | BOOL | Indicates if the activation has been successful.
 | Busy | BOOL | Indicates if the function block is still busy.
 | NCListTypeOut | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
NCParamSetIDOut | UINT | Number of parameter set in which the parameter value should have been activated or is activated.
NCParamConsistent | BOOL | Indicates if all parameters has been successfully activated while changing the parameter set.
NCWarning | BOOL | Indicates if a warning in the ISG-MCP has occurred.
NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
Error | BOOL | Indicates if an error has occurred. Activation of parameter set is not executed.
ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if "Error = TRUE. The parameter set has not been updated correctly. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.

q If NCError = TRUE and NCParamConsistent = TRUE, the new parameter set has not been correctly interpreted. No new parameters have been read in from the work list and the old parameters remain unchanged in the controller.

If the function block assumes the error state when the parameter set is updated with the work list, i.e. "Error = TRUE and at the same time

· NCError = TRUE and

· NCParamConsistent = FALSE,

then the controller has inconsistent data. Either a new parameter set must be correctly read in or the controller must be restarted.

q If the FB returns a warning (NCWarning = TRUE), it was not possible to accept at least one parameter and this parameter's value has been internally corrected by the controller.

q Successful activation of the work list is the prerequisite for it to be written back as the original list with the MCV_SaveParamChg function block.

q If the parameters of the work list could not be activated successfully, the work list can be deleted with the MCV_DiscardParamChg function block, thus discarding all parameter changes made.


MCV_SaveParamChg

Save modified parameters

After successful activation of a work list, this function block saves it as the original list. The previous work list is deleted after successful storage.

Thus, after a restart of the controller or after a parameter set change, the modified parameters are permanently available in the original list.

If a warning has occurred on activation of the work list, at least one parameter has been corrected in the controller. This corrected value is not included in the original list. When the original list is read in, the warning appears again and the parameter value is corrected again.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Saving of changed parameters at rising edge.
 | NCListTypeIn | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDIn | UINT | Number of parameter set to be saved.
VAR_OUTPUT
 | Valid | BOOL | Indicates if saving of the changed parameters has been successful.
 | Busy | BOOL | Indicates if the function block is still busy.
 | NCListTypeOut | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDOut | UINT | Number of the parameter set which had to be saved or has been saved.
 | NCWarning | BOOL | Indicates if a warning in the ISG-MCP has occurred.
 | NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
 | NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
 | Error | BOOL | Indicates if an error has occurred. Save of parameter set is not executed.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if Error = TRUE. The parameter set has not been saved correctly. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.

q A frequent cause of ISG-MCP errors are absent write privileges or a write-protected original list because, in these cases, the original list cannot be replaced.


MCV_ReadParamValue

Read parameter value

The parameter values from the original list or work list of a selected parameter set can be read with this function block. If the parameter sought is in the always-existing original list, it is returned as the "old parameter". If a work list exists and contains the parameter value, it is returned as the "new parameter".

· The parameter value effective in the controller may differ from the two parameter values read in if the parameter value has been corrected in the controller due to a warning when interpreting the original or work list.

· After activation without a warning, the parameter value of the work list is active in the controller. Otherwise, it is the value of the original list.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference.
VAR_INPUT
 | Execute | BOOL | Reading of parameter value at rising edge.
 | NCListTypeIn | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDIn | UINT | Number of parameter set from which the parameter value is to be read.
 | NCParamIdentIn | STRING | Identification of the parameter to be read, e.g. kenngr.swe_pos.
VAR_OUTPUT
 | Valid | BOOL | Indicates if the parameter value has been read successfully.
 | Busy | BOOL | Indicates if the function block is still busy.
 | NCListTypeOut | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDOut | UINT | Number of parameter set from which the parameter value has to be read or has been read.
 | NCParamIdentOut | STRING | Identification of the parameter, e.g. kenngr.swe_pos.
 | NCOldParamValueRead | BOOL | Indicates if the parameter identification could be found in the original list.
 | NCOldParamValueOut | STRING | Parameter value from the original list.
 | NCNewParamValueRead | BOOL | Indicates if the parameter identification could be found in the working list.
 | NCNewParamValueOut | STRING | Parameter value from the working list.
 | NCWarning | BOOL | Indicates if a warning in the ISG-MCP has occurred.
 | NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
 | NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
 | Error | BOOL | Indicates if an error has occurred. Save of parameter set is not executed.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if Error = TRUE. The parameter value could not be read correctly. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.

q The ISG-MCP returns an error if the parameter value cannot be found in any of the lists.


MCV_DiscardParamChg

Discard changes

With this function block, the work list can be deleted, thus discarding all parameter changes in the work list.

If the work list has already been activated with the MCV_ActivateParamChg function block, these changes are active in the controller and can no longer be reversed with this function block. If these modified parameter values are also to be reversed, the original list must be read in with the MCV_ChgParamSet function block.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Discard changes at rising edge.
 | NCListTypeIn | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDIn | UINT | Number of parameter set to be discarded.
VAR_OUTPUT
 | Valid | BOOL | Indicates if the changes have been discarded successfully.
 | Busy | BOOL | Indicates if the function block is still busy.
 | NCListTypeOut | STRING | Identification of parameter or list type, e.g. ACHS_MDS.
 | NCParamSetIDOut | UINT | Number of parameter set for which the changes have to be discarded.
 | NCWarning | BOOL | Indicates if a warning in the ISG-MCP has occurred.
 | NCError | BOOL | Indicates if an error in the ISG-MCP has occurred.
 | NCErrorCode | UDINT | Error identification of the error in the ISG-MCP.
 | Error | BOOL | Indicates if an error has occurred. Save of parameter set is not executed.
 | ErrorID | WORD | Error identification.

Behaviour of the FB

q The FB is in an error state if "Error = TRUE. The parameter changes could not be reversed correctly. An error has occurred either in the function block itself or in the ISG-MCP. The NCError output parameter indicates whether an error has occurred in the ISG-MCP.

A frequent cause of ISG-MCP errors are absent write privileges or a write-protected work list because, in these cases, the work list cannot be deleted.


MCV_UnHome

With this function block an axis may be unreferenced

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Unreferencing is command at a rising edge.
VAR_OUTPUT
 | Done | BOOL | Indicates if unreferencing is done.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.


MCV_DeactivateAxis

With the MCV_DeactivateAxis FB an axis may be deactivated. In this state it is not possible to command any motion and no error will be shown.

By default the axis is activated.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | Set "Enable TRUE to deactivate the axis.
VAR_OUTPUT
 | IsDeactivated | BOOL | Indicates if the axis is deactivated.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.


MCV_UpdateDriveData

With the MCV_UpdateDriveData FB drive parameter of an axis may be updated. For DSE drives the servo files are updated.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Updating starts with a rising edge.
VAR_OUTPUT
 | Done | BOOL | Indicates if the updating has been finished successfully
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.


MCV_Decouple

With the MCV_Decouple FB an axis may be decoupled, i.e. it will be deactivated.

The sequence of the internally commanded function block is shown in the flow chart.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Axis will be decoupled at a rising edge.
VAR_OUTPUT
 | Done | BOOL | Axis has been decoupled successfully.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

FB flow chart


MCV_Couple

With the MCV_Couple FB an axis may be recoupled, i.e. it will be reactivated.

The sequence of the internally commanded function block is shown in the flow chart.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Execute | BOOL | Axis will be coupled at a rising edge.
VAR_OUTPUT
 | Done | BOOL | Axis has been coupled successfully.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

FB flow chart


MCV_ConveyorControl

With the MCV_ConveyorControl FB the state of the dynamic behaviour of an axis is sent to the motion controller. This is done for an axis that isnt under control of the motion controller, because the axis is configured as encoder axis (see P-AXIS-00015).

This information influences the synchronisation motion of an axes group that is synchronized with that encoder axis, because the encoder axis is configured as master axis of the axes group.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | TRUE, state of dynamic behaviour is sent to the motion controller
 | ControlMode | UDINT | Actual dynamic behaviour of the axis. Allowed values are: 0: HLI_CONVEYOR_SPEED_CONST 1: HLI_CONVEYOR_ACCELERATION 2: HLI_CONVEYOR_DECELERATION 3: HLI_CONVEYOR_SPEED_ZERO
VAR_OUTPUT
 | Valid | BOOL | TRUE, value at output ActiveControlMode is valid.
 | ActiveControlMode | UDINT | Actual dynamic behaviour of the encoder axis, which was delivered to the motion controller.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB:

q This functionality isnt available for all motion controller variants.

q To use this functionality with motion controllers containing it, you have to configure axis parameters of group conv_sync within axis parameter list ([AXIS]) and within channel parameter list ([CHAN]) parameters of the group conveyor_sync.


MCV_SetReducedFilter

The MCV_SetReducedFilter FB influences the filtering of actual position values of the axis and is usually used in combination with an axis that is configured as encoder axis (see P-AXIS-00015), which is not under control of the motion controller.

The FB only works, if a slave axis is configured to use the encoder axis as her master axis.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | TRUE, parameter that indicates that fewer amount of values should be used to do filtering of actual position values of the axis, gets active.
VAR_OUTPUT
 | FilterReduced | BOOL | TRUE; filter calculation of actual values of an axis, that is configured as encoder axis, is based upon fewer values as parameterized.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB:

q To influence the filtering of actual position values its necessary to configure the parameters of the group conv_sync within the axis parameter list ([AXIS]).


MCV_SuppressSoftLimSw

Using MCV_SuppressSoftLimSw FB its possible to suppress diagnosis messages in combination with axis positions exceeding configured software limits switches.

Block diagram

Parameters of the FB

VAR_IN_OUT
 | Axis | AXIS_REF | Axis reference
VAR_INPUT
 | Enable | BOOL | TRUE, output of diagnosis messages concerning axis positions exceeding software limit switches are suppressed.
VAR_OUTPUT
 | Valid | BOOL | TRUE, Suppression of diagnosis messages concerning software limit switches is active.
 | Error | BOOL | Indicates if an error has occurred.
 | ErrorID | WORD | Error identification.

Behaviour of the FB:

q Suppressed diagnosis messages concerning axis positions exceeding software limit switches are P-ERR-50041 , P-ERR-50042 , P-ERR-60158 and P-ERR-60159 .


MCV_TorqueFreeStop

MCV_TorqueFreeStop FB influences the behaviour of SERCOS drives, if power is switched off by using a MC_Power FB instance. Dependent on input Enable drive will stop with torque attached to stop as quick as possible or to spin without torque attached until the drives stands still.

Block diagram

Parameters of the FB

VAR_IN_OUT

Axis

AXIS_REF

Axis reference

VAR_INPUT

Enable

BOOL

TRUE, the drive will spin until stop without torque attached, if Enable = FALSE at a MC_Power instance and the same axis reference.

FALSE, the drive will stop with torque attached if Enable = FALSE at an MC_Power instance and the same axis reference.

VAR_OUTPUT

Enabled

BOOL

TRUE; torque free spinning until stop of dive if power is switched off via MC_Power instance with same axis reference.

Error

BOOL

Indicates if an error has occurred.

ErrorID

WORD

Error identification.

Behaviour of the FB:

q Until now only available for SERCOS drives.


Application note: Configuration of a "Synchronization Master"

TwinCAT CNC: Overview

Application note: Configuration of a Synchronization Master

The following procedure shows a way to realise some kind of Synchronization Master.

More:

button Configuration of a simulated axis in the ISG-CNC

button Setting up axis parameter

button Handling of the Control Units on the HLI

button GearIn coupling

button Filtering of actual values

button CamIn coupling


Configuration of a simulated axis in the ISG-CNC

hochlauf.lis

zahl_mds increase with 1 und add further axis
achs_mds[X-1] isgnc\listen\achsmdsX.lis

achsmdsX.lis:

#-------------------------------------------------

# Allgemeine Attribute

#-------------------------------------------------

kenngr.antr_typ 4 /* 1=KONV, 2=SERCOS, 4=SIMU, 17=DSE */

kenngr.achs_mode 0x104

kenngr.achs_typ 4

The axis is already simulated in the ISG-CNC. For this there no changes necessary in the servo files (number of DSE axes NumAx in global.servo not to be changed).


Setting up axis parameter

To deactivate the real behaviour of a simulated axis the following axis parameter has to be set:

antr_simu.ist_gleich_soll 1

Additionally the resolution values have to be set to 1:

getriebe[0].wegaufz 1

getriebe[0].wegaufn 1


Handling of the Control Units on the HLI

At the PLC interface (HLI) the following Control Unit have to be activated:

hli.axis[X-1].lr_mc_control.add_cmd_values.enable_w = TRUE

After that it is possible to provide additional values to the interpolator setpoint setting of the axis.

Additive position-setpoint setting:

hli.axis[X-1].lr_mc_control.add_cmd_values.command_w.m_add_pos_value

Additivite velocity-setpoint setting:

hli.axis[X-1].lr_mc_control.add_cmd_values.command_w.m_add_speed_value

These value are added to the current interpolator position or velocity within every interpolator cycle, and put to the drive (be careful while using real drives!).

I.e. if an axis has been move to position 90 with MC_MoveAbsolute an additional setpoint setting of 10 causes a movement of the axis to position 100. This position will be kept until a new position is set.

For a contiuous motion it is recommended to use the additive velocity setpoint interface. If the accuracy is not sufficient, additive position setpoints have to be set continuously without modulo break, to avoid the axis driving back.


GearIn coupling

The actual position of the Synchronized Master may be observed with the described interface. Please note that only position control values maybe modified (MC_ReadStatus.Lr*). The interpolator setpoint is not affected. For that, coupling to the Synchronized Master axis has to be done with actual values ("MC_GearIn.Mode" = 16#80).


Filtering of actual values

The actual values of the Synchronized Master (MC_GearIn-Master) may be filtered in the known way (cam_gear.mv_type).


CamIn coupling

If the Synchronized Master is used as master axis for MC_CamIn a further simulated axis has to be configured in the ISG-CNC (see above). This axis may be coupled as slave axis to the Synchronized Master, using coupling with actual values ("MC_GearIn.Mode" = 16#80). Then, the slave axis may be used as master axis for the CamIn coupling.


Abbreviations

AXHLI Axis-specific High-Level-Interface

CM Continuous Motion (endless rotation)

DM Discrete Motion (positioning)

FB Function Block

FBSD FB-State Diagram

HLI High-Level-Interface between MC and PLC

MC Motion Controller

MCP Motion Control Platform

MCE Motion Control Engine

MC-FB Motion Controller Function Block

NL Slope Non-Linear slope

PLC Programmable Logic Control

SAI Single Axis Interpolator


Explanations of terms

Function block: internal order format of the ISG motion controller

HLI library: access to the memory interface to the ISG-MCE

ISG-MCE: this stands for the ISG NC kernel which is also referred to as the "Motion Control Engine" in connection with this documentation

MC-FB: designates the PLC function blocks that are used for issuing commands to the ISG-MC

Motion library: a PLC software application that contains function blocks for moving axes in conformity with the PLCopen specification as well as further FBs to assume motion generation tasks