Simatic S7 User Guide Engl
Simatic S7 User Guide Engl
User Guide
Simatic S7 modules for COMPAX with profibus DP
(COMPAX option F3)
TIFIE
Head office Great Britain:
ER D Parker Hannifin GmbH Parker Hannifin plc
C
DIN EN ISO 9001 EMD Hauser EMD Digiplan
P. O. Box: 77607-1720 21 Balena Close
We automate motion Robert-Bosch-Str. 22 Poole, Dorset
D-77656 Offenburg, Germany BH17 7DX UK
Q
LI TE
TY SYS
Fax: +49 (0)781 509-176 Fax: +44 (0)1202 69 5750
Reg. Nr. 36 38
[Link] [Link]
Contents
1. General ......................................................................................................6
2
7.2 FB11: Parameter setting module "ParaUp"....................................30
7.2.1 Description of function ...............................................................30
7.2.2 Setting parameters ....................................................................30
7.2.3 Status.........................................................................................32
7.2.4 Structure of data area for ParameterRead ................................32
7.2.5 Supplementary comments .........................................................33
7.2.6 Call-up example.........................................................................33
7.2.7 Example of a parameter DB (ParameterRead)..........................34
7.3 FB12: Programmer module "LinesDn" ...........................................35
7.3.1 Description of function ...............................................................35
7.3.2 Setting parameters ....................................................................35
7.3.3 Status.........................................................................................36
7.3.4 Structure of the data area for ProgramLines .............................37
7.3.5 Supplementary comments .........................................................37
7.3.6 Call-up example.........................................................................37
7.4 FB13: Programming module "LinesUp" .........................................38
7.4.1 Description of function ...............................................................38
7.4.2 Setting parameters ....................................................................38
7.4.3 Status.........................................................................................40
7.4.4 Structure of the data area for ProgramLines .............................40
7.4.5 Supplementary comments .........................................................40
7.4.6 Call-up example.........................................................................41
7.5 FB14: Curve module "CurveDn"......................................................42
7.5.1 Description of function ...............................................................42
7.5.2 Setting parameters ....................................................................42
7.5.3 Status.........................................................................................44
7.5.4 Structure of the data area for FixPoints .....................................44
7.5.5 Supplementary comments .........................................................45
7.5.6 Call-up example.........................................................................45
7.6 FB15: Curve model "CurveUp"........................................................47
7.6.1 Description of function ...............................................................47
7.6.2 Setting parameters ....................................................................47
7.6.3 Status.........................................................................................49
7.6.4 Structure of the data range for FixPoints ...................................49
7.6.5 Supplementary comments .........................................................50
7.6.6 Call-up example.........................................................................50
7.7 FB16: Positioning module "PosMod" .............................................52
7.7.1 Description of function ...............................................................52
7.7.2 Parameter setting ......................................................................52
7.7.3 Status.........................................................................................54
7.7.4 Structure of the data area for PosPara ......................................55
7.7.5 Supplementary comments .........................................................57
7.7.6 Call-up example.........................................................................57
3
Simatic S7 modules for COMPAX with profibus DP
4
Unit assignment:
This documentation describes simatic S7 modules which
support communication between a Simatic S7 and the
following units:
• COMPAX 10XXSL with option F3
• COMPAX 25XXS with option F3
• COMPAX 45XXS with option F3
• COMPAX 85XXS with option F3
• COMPAX P1XXM with option F3
• COMPAX 02XXM with option F3
• COMPAX 05XXM with option F3
• COMPAX 15XXM with option F3
• COMPAX 35XXM with option F3
XX: any characters
F3:profibus option
Key to unit designation
e.g.: COMPAX 0260M:
COMPAX: name
02: performance class
60: variante.g. "00": standard model
M: model M: multiple axis unit
S:single-axis unit
HAUSER rating plate
The rating plate is found on the top of the unit and
contains the following information:
equipment
option name
name
serial number part number
5
Simatic S7 modules for COMPAX with profibus DP
1. General
Liability waiver
PARKER will not provide warranty for ensuring that these modules function
perfectly under all circumstances. Using current technology, there is not
generally any software, which functions perfectly under all circumstances and
requirements. PARKER therefore declines any liability for direct and indirect
damage of any nature caused through the use of the software modules, even
if the modules are used in accordance with the descriptions provided in this
manual.
Right of amendment
PARKER has the right to update the manual and the software modules at any
time without announcing such action beforehand. Software modules can also
be quarantined without notification if PARKER detects dangers which do not
allow for perfect operation. PARKER is not generally obliged to rectify a
detected error immediately or to prepare new functions when asked to do so
by a customer.
Copyright
This manual and the associated software modules contain information, which
is the intellectual property of PARKER. The authorized user is obliged to use
this information exclusively for the operation of the COMPAX position
controllers and their integration. Reproduction and dissemination to third
parties of the documentation or extracts of it is only permitted following
approval from PARKER. The reproduction of software modules is only
permitted in the sense of data back-up.
6
2. Software modules for COMPAX with
profibus DP connection
COMPAX position controllers have been available for several years now with
standardized field buses. Here the profibus DP, as defined in EN 50170,
proves to be a simply designed and easy to use command interface with a
high degree of efficiency. Despite this, when working with position controllers
with profibus DP engagement, the system programmer does however often
face start-up problems as a result of the high functionality of such units. If
binary controller information is still assigned actions such as positioning or
referencing, non-standardized controller instructions are usually used for the
unit parameter settings. Another obstacle may then be encountered since the
controller computers, which exchange data with the position controllers by
means of the profibus master engagement, display their data using different
internal methods and data is not therefore transformed from the position
controller to one particular controller computer type. As a result of the
restricted band width of a DP transfer channel, associated data also often has
to be transferred in blocks. The programmer is then left to handle data
transformation and division or combination into or from blocks with the
support of driver software.
PARKER will provide you with an open collection of Simatic S7 modules 1 as
handling software for some frequently repeated tasks such as the transfer of
unit parameters, command lines of the record memory and of support points
of the electronic curve disc to and from the position controller, but also for the
creation of travel orders, including all travel parameters such as acceleration
and speed. The system also supports conversion of the position controller's
internal DSP data format into the standardized IEEE floating point data format
and vice versa from IEEE floating point data format into the DSP data format
of the position controller. The collection should be continually updated and
supplemented which is why PARKER is always grateful for information from
customers.
☞ For a general understanding, it is essential that you are familiar with the
key contents of the operating instructions for the profibus option [1] and
of the COMPAX Product Manual [2] because this product is based on
knowledge of these two sources. This description is also based on a
basic understanding of Step7 programming.
3. System conditions
The COMPAX basic unit must have software version of at least 3.x and the
COMPAX profibus engagement F03 of at least 1.40. Both software versions
can be easily determined using the ServoTerminal (contained in the
COMPAX scope of supply) [2] by requesting the S31 COMPAX status values
for the basic unit and S36 for the field bus engagement. The Step7
programming package with basic or mini authorization should have a version
status of at least V3.x or greater.
The use of the S7 function modules is associated with certain hardware
and firmware version statuses.
8
4. COMPAX as a profibus DP slave
4.1 Data exchange with COMPAX via profibus DP
Information on the profibus DP is transferred via the cyclic exchange of data
frames for request and response between the profibus DP master and
profibus DP slave. The working data of these data frames in the Simatic S7
station are blended into the address area of the CPU, the working data
passing from the DP slave is loaded into the input addresses (input byes
(EB)) of the CPU, the working data passing to the DP slave is written from the
output addresses (output bytes (AB)) of the CPU. During this process, one
byte is assigned in the I/O address area of the CPU per working data byte for
the request and response frame. As a result of the different selections of
these address areas, the DP slave station numbers and address areas are
assigned in an unambiguous manner. One address area is assigned
exclusively to one DP slave. One exception here is CPU's, which have the
option of supplying several DP slaves via what are commonly referred to as
boilerplate units from a shared address area. In this instance, the address
area assignment also takes place using the boilerplate unit number.
Furthermore, different input and output address positions can be selected for
some DP slaves. If a piece of working data, e.g. a nominal value, is
distributed over more than one byte, this piece of working data has to be
transferred in an associated manner in a profibus master I/O cycle. An
associated area is designated as a consistency area. Assurance is provided
for a consistency area to the effect that the working data leaves the DP
master and/or reaches the DP master in an associated manner.
9
Simatic S7 modules for COMPAX with profibus DP
10
The structure of the working data frame should be considered in more detail if
further understanding is to be possible. Different pieces of information can be
transferred depending on the working data length selected. The two main
data types which can be transferred are command data and process data.
Command data has an acyclic character and is used to read or write a unit
parameter, amongst other things. Process data has a cyclic character and is
often used to set nominal values or to record actual values. A permanent
space is assigned for both types of data in the working data frame and both
are transferred in a quasi-parallel manner in a telegram.
The following terms from [1] have been selected on the basis of the
PROFIBUS profile for speed changing drives. [1] also contains an
explanation and diagram of these terms.
The area for the command data type is designated "command identification
data" (BKD) and that for the process data type as "process data" (PZD). The
entire data frame, consisting of BKD and PZD, is designated as the
"command-process data object" (BPO). The BKD consists of three sub-areas:
"command identification" (BKE), "sub-index" (IND) and "command data"
(BDA). In the BKE of the request frame, a request code is transferred to
identify the type of command, the associated command data can be found in
the BDA. For example, the identification for writing a parameter is in BKE and
the parameter contents themselves are in BDA. In the BKE of the response
frame, you will find the response code for identification of command
acknowledgement. If the example is changed so that the COMPAX
parameter is not changed but its current value should be queried, there will
be a command code for reading a parameter in the BKE of the request frame,
the command acknowledgment can be found in the BKE of the response
frame and the parameter contents themselves are in the BDA of the response
frame. The sub-index IND is only ever required when a command cannot be
processed in an I/O cycle by the BKD. This may be the case if there is a
command or acknowledgement from several partial commands or
acknowledgments. One such command is e.g. the POSR-SPEED-ACCEL
COMPAX command for speed-profiled travel of the servo axis, which
comprises a total of three request and 3 response frames.
The PZD of the request frame always consists of one control word or byte,
that of the response frame consists of one status word or byte. Depending on
the width of the PZD, 6 bytes of cyclic information can also be exchanged in
both directions (PED or PAD). The data contents of these 6 bytes can be
configured [1].
11
Simatic S7 modules for COMPAX with profibus DP
The presence and width of the BKD and PZD depend on the working data
length selected. The working data length can be 18, 12, 8 or 1 byte. The data
frames are sub-divided into the BPO1, BPO2, BPO3 and BPO4 types in
accordance with these four working data lengths. Only the BPO1 and BPO2
types transfer both the PZD data type and the BKD data type.
12
☞ P196 = 0 + 0 + 8 + 96 = 104 should be selected for the first tests. The
PZD channel can be fully utilized with this setting. When using the
Simatic S7 modules, only those settings printed in bold may be used
from each table line.
Each DP slave logs onto the bus with its station number. COMPAX station
numbers are issued exclusively within a range of 1 to 126. The S7 CPU as
the DP master occupies a certain station number which must not then be
issued for a COMPAX slave.
☞ Select a setting within the range P194 = 1 .. 126.
The Simatic S7 modules can be used together with the functions of the cyclic
channel (BPO type 1). The assignment of the PED's (COMPAX to
programmable controller direction) is of no real significance to the function of
the modules.
13
Simatic S7 modules for COMPAX with profibus DP
14
5. Simatic S7 configuration for COMPAX
The Simatic S7 configuration for COMPAX can be undertaken using the
hardware configurator of the Step7 programming package. As of version
status V3.x of the Simatic development environment, the configuration is
usually supported by means of core unit files (GSD). Earlier version statuses
of this configurator operate with what are commonly referred to as type files.
Both types of configuration files form part of the COMPAX standard supply
package. Following installation of the ServoManager [2], the corresponding
CPX0EE95 (or [Link]) file will be in the installation directory
../SRVBOX/DATA on the hard disk. Now, for example, proceed as follows:
1. The [Link] or [Link] file must be copied into the
../STEP7/S7DATA/GSD directory on the hard disk.
2. A SUBNET PROFIBUS must be added to the working project for the
SIMATIC station. Once the change has been made to the hardware
configuration, the hardware catalogue has to be refreshed once using
UPDATE GSD FILES so that COMPAX is recorded in the catalogue.
3. Now open the hardware catalogue and configure all the assemblies used.
The selected master engagement is then connected with the subnet
PROFIBUS. Select the master address and a baud rate of no more than
1.5 MBaud.
4. You will find the "COMPAX with F03" entry in the hardware catalogue
under +PROFIBUS+OTHER FIELD UNITS+MISCELLANEOUS.
5. By pressing the left-hand mouse button, a COMPAX entry appears on the
line of dashes behind the DP profibus for each COMPAX. Now select an
entry from the configuration list proposed for COMPAX. This entry should
correspond to the settings for COMPAX parameter P196. If you have
selected P196 = 104, you should select BPO_1_BKD/PZD. A station
number (address) must also be specified in the dialogue.
6. Finally, you must assign I/O addresses to each of the two consistency
areas. Once you have double clicked on the DP slave entries, the
addresses can be edited. Use associated address areas for both
consistency areas. With some Simatic CPU types (e.g. 400 series) only
addresses which can be divided by four can be set whereby a gap of two
bytes is created.
15
Simatic S7 modules for COMPAX with profibus DP
16
Figure 4.2 Hardware configurator S7, issuing of I/O addresses
17
Simatic S7 modules for COMPAX with profibus DP
SFC14 SFC15
"DPRD_DAT" "DPWR_DAT"
M1.0 EN RET_VAL MW200 M2.0 EN
W#16#0 P#M40.0 BYTE 10 W#16#0 MW204
LADDR RECORD LADDR RET_VAL
ENO P#[Link] 0.0 RECORD ENO
BYTE 10 BYTE 10
"DPRD_DAT" "DPWR_DAT"
M1.0 EN RET_VAL MW202 M2.0 EN
W#16#A LADDR RECORD P#M50.0 BYTE 8 W#16#A LADDR RET_VAL MW206
ENO P#[Link] 10.0 RECORD ENO
BYTE 10 BYTE 8
Process- I / O
Figure 5.1 Communication structure with DPRD_DAT and DPWR_DAT with
an integrated master (e.g. CPU 315-DP2)
☞ Unlike its predecessor model, the Simatic S5, the Simatic-S7 can no
longer describe the communication directly via the accumulator
commands (output bytes (AB) or periphery) or read from this (input bytes
(EB) or periphery), if the associated consistency area is bigger than the
accumulator width (32 bits). To update the COMPAX consistency areas
when using the software modules, it is essential that the system
functions for reading/writing SYSTEM_READ and SYSTEM_WRITE are
used.
19
Simatic S7 modules for COMPAX with profibus DP
The modules are FB's and/or FC's, which can be simply linked by coping and
setting parameters in the user program. FB's are always used if the module
call-up is required over several programmable controller cycles. During this
time, the FB's edit an internal step string, the status of which is saved in the
event DB. This also applies for instances where only one frame has to be
transmitted and received because the response can wait several
programmable controller cycles.
DBxx - Instanz-DB
FBxx
"FB_Name"
M1.0 EN
P#[Link] 0.0 BYTE 10 REQUEST
P#M 40.0 BYTE 10 RESPONSE
P#M 2.0 BOOL 1 START
20
REQUEST and RESPONSE (FB's)
From the user's point of view, the setting of COMPAX addresses only occurs
via the incoming and outgoing box, an explicit station address is therefore not
required at the FB level. The system modules for receiving and transmitting
the programmable controller firmware create a relationship between the
incoming and/or outgoing box and the input and/or output addresses of the
programmable controller. The relationship between the programmable
controller input and/or output addresses and the station number required for
setting COMPAX addresses is determined within the programmable controller
with the aid of the hardware configuration. The MODULE FC's do not use an
incoming and outgoing box because direct communication with the COMPAX
is not usually required via the FC's.
☞ The setting of COMPAX addresses occurs via the assigned incoming
and outgoing box. Station numbers are not therefore required.
21
Simatic S7 modules for COMPAX with profibus DP
With reference to one single COMPAX, at any one time only one MODULE
FB may be called up using active START in order to transfer data. The
parallel call-up of FB's, with reference to one COMPAX, is only possible if
only one FB has an active START input. Note that when the flank of the
START input decreases, zero bytes are transferred once into the BKD. FB's
with an inactive START only implement initializations of their temporary
variables and are then completed without writing to the outgoing box.
On the other hand, MODULE FB's may transfer data in parallel, if they are
determined for different COMPAX. If the same FB is to be used in parallel, it
should be called up each time with a different event DB. Since according to
the profibus DP principle, all stations are usually involved in the exchange of
information, even without a current FB call-up, there is no additional
expenditure (in terms of time) for the transfer of data. The programmable
controller cycle time is simply increased by the FB call-up.
☞ Parallel data transfer is not possible for one COMPAX using different
FB's. The same or different FB's can be called up in parallel for different
COMPAX but exclusive usage of the event DB's should be noted. All
MODULE FB's are capable of multiple events.
22
7. Module description
7.1 FB10: Parameter setting module "ParaDn"
23
Simatic S7 modules for COMPAX with profibus DP
24
Variable Data type Meaning
Address area
Call-up example
PASS- Data type: BOOL Temporarily cancel password
WORD Address areas: protection
Constants
Data module area
Marker area
I/O area
Call-up example:
M 150.2
E70.2
[Link] 10.2
Response Data type: ANY Indicates the area (DB or M) in
Address areas: which the response from
Data module area COMPAX can be found. The
Marker area response from COMPAX is
Call-up example: read via the profibus with the
P#M 100.0 BYTE 10 help of a system module
P#[Link] 0.0 BYTE 10 (SYSTEM_READ4).
Request Data type: ANY Indicates the area (DB or M) in
Address areas: which the request to COMPAX
Data module area can be found. The request to
Marker area COMPAX is written via the
Call-up example: profibus with the help of a
P#M 110.0 BYTE 10 system module
P#[Link] 0.0 BYTE 10 (SYSTEM_WRITE5).
7.1.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set,
e.g.
• if the input and output variables does not have the format expected,
• if start has been deactivated before the end of the transfer,
• if password-protected parameters have been transferred without the
password also having been transferred,
• if VC has been selected and the axis is in motion.
26
7.1.4 Structure of the data area for ParameterWrite
The data area, in which all parameter numbers and values are stored, is n*8
bytes large, whereby n is the number of parameters to be transferred. The
order in which the parameters are to be transferred is irrelevant to the
transfer. The 8 bytes (one slot) for each parameter are made up as follows.
The slots (for several parameters) must be evenly connected.
Parameter Address Data type Meaning
Parameter 0.0 BYTE (UINT) Parameter number (1..250)
Value 1 2.0 BYTE (UINT) Digit after the decimal point 3
(LSB) NK3
Value 2 3.0 BYTE (UINT) Digit after the decimal point 2
NK2
Value 3 4.0 BYTE (UINT) Digit after the decimal point 1
(MSB) NK1
Value 4 5.0 BYTE (UINT) Digit before the decimal point 1
(LSB) VK1
Value 5 6.0 BYTE (UINT) Digit before the decimal point 2
VK2
Value 6 7.0 BYTE (UINT) Digit before the decimal point 3
(MSB) VK3
27
Simatic S7 modules for COMPAX with profibus DP
In this example, the parameters P11=100 and P40=-10.5 are to be set. P40 is
transferred immediately without the password protection having been
deactivated, P11 requests the password protection to be canceled and a
subsequent VP.
CALL FB 10 , DB10
ParameterWrite :=P#[Link] 0.0 BYTE 16
Response :=P#[Link] 0.0 BYTE 10
Start :=P#M 2.0 BOOL 1
Number :=B#16#2
Password :=TRUE
VP :=TRUE
VC :=FALSE
Status :=M2.1
Request :=P#[Link] 0.0 BYTE 10
28
Parameter Address Date Meaning
Parameter 8.0 B#16#28 Transfer parameter 40
9.0 B#16#00 Not used
NK3 10.0 B#16#00 Digit after the decimal point
NK2 11.0 B#16#00 Digit after the decimal point
NK1 12.0 B#16#80 Digit after the decimal point
VK1 13.0 B#16#F5 Digit before the decimal point
VK2 14.0 B#16#FF Digit before the decimal point
VK3 15.0 B#16#FF Digit before the decimal point
29
Simatic S7 modules for COMPAX with profibus DP
30
Variable Data type Meaning
Address area
Call-up example
Parameter Data type: BYTE COMPAX parameter to be
-To Address areas: transferred last
Constants
Data module area
Marker area
I/O area
Call-up example: B#16#12
Response Data type: ANY Indicates the area (DB or M) in
Address areas: which the response from COMPAX
Data module area can be found. The response from
Marker area COMPAX is read via the profibus
Call-up example: with the help of a system module
P#M 100.0 BYTE 10 (SYSTEM_READ6).
P#[Link] 0.0 BYTE 10
Request Data type: ANY Indicates the area (DB or M) in
Address areas: which the request to COMPAX can
Data module area be found. The request to COMPAX
Marker area is written via the profibus with the
Call-up example: help of a system module
P#M 110.0 BYTE 10 (SYSTEM_WRITE7).
P#[Link] 0.0 BYTE 10
7.2.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set,
e.g.
• if the input and output variables do not have the format expected.
The data area in which all parameter numbers and values are saved is n*8
bytes in size, whereby n is the number of read parameters. The slots (for
several parameters) are evenly connected.
32
Parameter Address Data type Meaning
Parameter 0.0 BYTE (UINT) Parameter number (1..250)
Value 1 2.0 BYTE (UINT) Digit after the decimal point 3
(LSB) NK3
Value 2 3.0 BYTE (UINT) Digit after the decimal point 2
NK2
Value 3 4.0 BYTE (UINT) Digit after the decimal point 1
(MSB) NK1
Value 4 5.0 BYTE (UINT) Digit before the decimal point 1
(LSB) VK1
Value 5 6.0 BYTE (UINT) Digit before the decimal point 2
VK2
Value 6 7.0 BYTE (UINT) Digit before the decimal point 3
(MSB) VK3
• The parameter values are saved in 6 byte DSP format regardless of the
internal back-up in COMPAX. FC11 can be used to change from DSP into
floating comma format and FC10 can be used in the opposite direction.
• The conversion of numerical formats is described in the COMPAX Product
Manual.
• FB11 interacts closely with FB10 ("ParaDn") because the
ParameterRead/ParameterWrite data areas used are compatible with one
another.
In the simplest scenario, the parameter record is created using
ServoManager and then downloaded once into the programmable
controller using FB11 (ParameterRead. If COMPAX has to be changed,
then FB10 can directly download the parameter record (from
ParameterWrite) into COMPAX.
In the example, all 250 COMPAX parameters are to be stored in one 2000
byte (250 x 8 byte) DB. In the example, P1=100 and P250=1.
33
Simatic S7 modules for COMPAX with profibus DP
CALL FB 11 , DB11
Response :=P#[Link] 0.0 BYTE 10
Start :=P#[Link] 13.7 BOOL 1
ParameterFrom :=B#16#1
ParameterTo :=B#16#FA
Status :=M11.0
Request :=P#[Link] 0.0 BYTE 10
ParameterRead :=P#[Link] 0.0 BYTE 2000
34
7.3 FB12: Programmer module "LinesDn"
7.3.1 Description of function
This FB is used to transfer a program block (group of program lines) from the
programmable controller to COMPAX. During this transfer, all program lines
are read directly by the FB from a memory area in the programmable
controller and written into the record memory of the COMPAX.
7.3.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set,
e.g.
• if the input and output variables do not have the format expected.
The special identifications for record memory commands form part of the
profibus documentation (1). As a rule, two or three blocks are transferred per
record line, each using 10 bytes. The FB decides from record line to record
line whether two or three blocks of 10 bytes should be transferred to
COMPAX. The line number is encoded in COMPAX within the 10 bytes.
In the example, 100 COMPAX program lines are to be written from one 3000
byte (100 x 3 x 10 bytes) DB in to the COMPAX.
CALL FB 12 , DB12
ProgLines:=P#[Link] 0.0 BYTE 3000
Response :=P#[Link] 0.0 BYTE 10
Start :=P#M 1.3 BOOL 1
Number :=B#16#64
Status :=M2.3
Request :=P#[Link] 0.0 BYTE 10
37
Simatic S7 modules for COMPAX with profibus DP
38
Variable Data type Meaning
Address area
Call-up example
Response Data type: ANY Indicates the area (DB or M) in
Address areas: which the response from
Data module area COMPAX can be found. The
Marker area response from COMPAX is read
Call-up example: via the profibus with the help of a
P#M 100.0 BYTE 10 system module
P#[Link] 0.0 BYTE 10 (SYSTEM_READ10).
Request Data type: ANY Indicates the area (DB or M) in
Address areas: which the request to COMPAX
Data module area can be found. The request to
Marker area COMPAX is written via the
Call-up example: profibus with the help of a system
P#M 110.0 BYTE 10 module (SYSTEM_WRITE11).
P#[Link] 0.0 BYTE 10
START Data type: ANY Indicates a bit (DB, M, E) which
Address areas: starts the transfer of program
Data module area lines.
Marker area
E area
Call-up example:
P#M 150.4 BOOL 1
P#E 70.4 BOOL 1
P#[Link] 10.4 BOOL 1
7.4.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set, e.g.
• if the input and output variables do not have the format expected.
The special identifications for record memory commands form part of the
profibus documentation (1). As a rule, two or three blocks are transferred per
record line, each using 10 bytes. The FB decides from record line to record
line whether two or three blocks of 10 bytes are to be written into the memory
area (D, M). If e.g. 10 data records are to be safely transferred, the memory
area to be reserved should be at least 300 bytes.
40
7.4.6 Call-up example
In the example, 100 COMPAX program lines are to be saved in a 3000 byte
(100 x 3 x 10 bytes) DB.
CALL FB 13 , DB13
Response :=P#[Link] 0.0 BYTE 10
Start :=P#M 1.2 BOOL 1
LineFrom :=B#16#1
LineTo :=B#16#64
Status :=M2.2
Request :=P#[Link] 0.0 BYTE 10
ProgramLines :=P#[Link] 0.0 BYTE 3000
41
Simatic S7 modules for COMPAX with profibus DP
42
Variable Data type Meaning
Address area
Call-up example
Response Data type: ANY Indicates the area (DB or M) in
Address areas: which the response from
Data module area COMPAX can be found. The
Marker area response from COMPAX is read
Call-up example: via the profibus with the help of a
P#M 100.0 BYTE 10 system module
P#[Link] 0.0 BYTE 10 (SYSTEM_READ12).
Request Data type: ANY Indicates the area (DB or M) in
Address areas: which the request to COMPAX
Data module area can be found. The request to
Marker area COMPAX is written via the
Call-up example: profibus with the help of a system
P#M 110.0 BYTE 10 module (SYSTEM_WRITE13).
P#[Link] 0.0 BYTE 10
START Data type: ANY Indicates a bit (DB, M, E) which
Address areas: starts the curve transfer.
Data module area
Marker area
E area
Call-up example:
P#M 150.4 BOOL 1
P#E 70.4 BOOL 1
P#[Link] 10.4 BOOL 1
7.5.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set,
e.g.
• if the input and output variables do not have the format expected.
44
7.5.5 Supplementary comments
• FB14 interacts closely with FB15 ("CurveUp") because the FixPoints data
areas used are compatible with one another.
In the simplest scenario, curves are created using ServoManager and then
downloaded one after another into the programmable controller (exclusive
FixPoints memory areas are required for each curve) using the FB15. If
COMPAX has to be changed, the FB14 can then individually download
each curve (from the different FixPoints memory areas) into the COMPAX.
You do not need to know the exact position of the support points in
FixPoints, but if required, please refer to the curve disc operating
instructions (3).
• The curve memory may contain several curves. Following a download with
the CAM editor of the ServoManager, the curves can be found one after
another in the COMPAX memory, whereby the start and end point of the
memory area of a curve depend on the curve number and the number of
support points. It is inevitable that memory area overlaps occur when
curves are indiviudually downloaded in the curve memory from several
COMPAX projects (ServoManager) and an upload is then processed via
FB15. A subsequent download of curves then certainly results in
uncontrolled COMPAX behavior.
• The number of support points required to calculate the minimum size of the
FixPoints curve memory can be taken from the CAM editor of the
ServoManager.
• Explicit parameters do not need to be set for the curve number because
they are already contained in FixPoints.
• VF applies to all the curves downloaded to COMPAX using FB14. If more
curves are to be downloaded, VF TRUE must only subsequently be set for
the last curve to be downloaded.
The minimum size of the FixPoints memory area required is calculated from:
45
Simatic S7 modules for COMPAX with profibus DP
CALL FB 14 , DB14
FixPoints :=P#[Link] 0.0 BYTE 192
Response :=P#[Link] 0.0 BYTE 10
Start :=P#M 1.6 BOOL 1
VF :=TRUE
Status :=M2.6
Request :=P#[Link] 0.0 BYTE 10
46
7.6 FB15: Curve model "CurveUp"
7.6.1 Description of function
47
Simatic S7 modules for COMPAX with profibus DP
7.6.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set,
e.g.
• if the input and output variables do not have the format expected,
• the curve is not available in the COMPAX. In this instance, the
CurveNotPresent bit is also set.
When uploading a curve from the COMPAX, sufficient memory space should
be provided for FixPoints. The minimum amount of memory should be
prepared in accordance with the following guideline:
• 3 bytes curve number in COMPAX,
• 3 bytes for the present curve number,
49
Simatic S7 modules for COMPAX with profibus DP
• FB15 interacts closely with FB14 ("CurveDn") because the FixPoints data
areas used are compatible with one another.
In the simplest scenario, curves are created using ServoManager and then
downloaded into the programmable controller (exclusive FixPoints memory
areas are required for each curve) using the FB15. If COMPAX has to be
changed, the FB14 can then individually download each curve (from the
different FixPoints memory area) directly into COMPAX. You do not need
to know the exact position of FixPoints support points but if requried,
please refer to the curve disc operating instructions (3).
• The curve memory may contain several curves. Following a download with
the CAM editor of the ServoManager, the curves can be found one after
another in the COMPAX memory, whereby the start and end point of the
memory area of a curve depend on the curve number and the number of
support points. It is inevitable that memory area overlaps occur when
curves are indiviudually downloaded in the curve memory from several
COMPAX projects (ServoManager) and an upload is then processed via
FB15.
• The number of support points required to calculate the minimum size of the
FixPoints curve memory can be taken from the CAM editor of the
ServoManager.
• Curve number 0 is not permitted.
The minimum size of the FixPoints memory area required is calculated from:
50
3 bytes curve number in COMPAX
+ 3 bytes present curve number
+ 60 bytes curve head
+ 201 x 6 bytes support points
≡=============
1272 bytes memory space required for FixPoints
CALL FB 15 , DB15
Response :=P#[Link] 0.0 BYTE 10
Start :=P#M 1.4 BOOL 1
CurveNumber :=MB5
Status :=M2.4
CurveNotPresent :=M3.4
Request :=P#[Link] 0.0 BYTE 10
FixPoints :=P#[Link] 0.0 BYTE 1272
51
Simatic S7 modules for COMPAX with profibus DP
52
Variable Data type Meaning
Address area
Call-up example
Response Data type: ANY Indicates the area (DB or M) in
Address areas: which the response from COMPAX
Data module area can be found. The response from
Marker area COMPAX is read via the profibus
Call-up example: with the help of a system module
P#M 100.0 BYTE 10 (SYSTEM_READ16).
P#[Link] 0.0 BYTE 10
Request Data type: ANY Indicates the area (DB or M) in
Address areas: which the request to COMPAX can
Data module area be found. The request to COMPAX
Marker area is written via the profibus with the
Call-up example: help of a system module
P#M 110.0 BYTE 10 (SYSTEM_WRITE17).
P#[Link] 0.0 BYTE 10
START Data type: ANY Indicates a bit (DB, M, E) which
Address areas: starts the travel parameter transfer.
Data module area When start is set, all prepared
Marker area commands, such as speeds, ramp
E area times, switching steps etc. are
Call-up example: transferred to COMPAX.
P#M 150.0 BOOL 1
P#E 70.0 BOOL 1
P#[Link] 10.0 BOOL 1
7.7.3 Status
The status indicates that all transfers have been successfully completed. We
would recommend that the status bit is monitored. The status bit is not set,
• if the input and output variables do not have the format expected,
• if StartPos has not yet been activated,
• if start was deactivated before the transfer was complete,
• if the numerical range for the floating point numeral of between -8 388 608
and +8 388 607 has been exceeded (the maximum numbers for COMPAX
may only fall in the range +/- 4 000 000),
• if the acceleration profile is also transferred without the password being
transferred at least once.
54
7.7.4 Structure of the data area for PosPara
The data module, in which all values are saved for the positioning and/or
switching / speed steps, is 152 bytes in size. If no shift points are transferred,
the module size falls to 24 bytes. By encoding a control word, you can select
which values should be transmitted to COMPAX and which should not.
Parameter Address Data type Meaning
CONTROL 0.0 WORD CONTROL sets the software switch
(low) (BINARY) for a selective transfer of travel
parameters:
55
Simatic S7 modules for COMPAX with profibus DP
OUTPUT Output
value value: Integer for output value for shift point
Shift point n BYTE n
(UINT) 30 hex = reset output
31 hex = set output
56
7.7.5 Supplementary comments
• FB is not designed for speed control mode (P93=4), speed steps cannot be
specified without positioning. Positioning processes require normal mode
(P93=1), continuous mode (P93=2) or reset mode (P93=3).
• Positioning can also be undertaken using mark references. The mark
reference is not then activated by FB, but must be explicitly approved via
the COMPAX parameter P35 and the input E14.
• Reference journeys cannot be triggered via the module.
• Absolute travel commands may only be used in normal and reset mode.
• The postion reached message must be queried using the STATUS WORD,
the FB only "initiates" the axis movement.
• The axis movement can be stopped via the CONTROL WORD using stop
or break.
• If switching steps are used, all values must be entered, therefore e.g. the
ACCEL value must not be missing for any speed stage.
• If not all shift points are required, you may shorten the positioner DB by the
corresponding slots.
• If password protection has been canceled by CONTROL, it is not reset by
the FB.
• If the transfer of travel parameters is interrupted (e.g. START activated too
early), any cams of the travel profile already set will remain set. One of the
following actions must be undertaken to deactivate the cams transferred by
this point:
- approach machine-zero,
- or approach real zero,
- or teach-in real zero using P211=1 or 3,
- or teach-in data record using P211=2 or 3,
- or undertake POSR0.
CALL FB 16, DB 16
PosPara :=P#[Link] 0.0 BYTE 152
Response :=P#[Link] 0.0 BYTE 10
Start :=P#[Link] 13.7 BOOL 1
StartPos :=P#[Link] 13.6 BOOL 1
Status :=[Link] 4.4
Request :=P#[Link] 0.0 BYTE 10
57
Simatic S7 modules for COMPAX with profibus DP
58
Parameter Address Date Meaning
SPEED 8.0 1.000000e+002 Start speed floating point value
100.0 %
ACCEL+ 12.0 1.000000e+003 Floating point value for
acceleration ramp 1000 ms
ACCEL- 16.0 5.000000e+002 Floating point value for
deceleration ramp 500 ms
POSITION 20.0 1.000000e+003 Floating point value for distance
1000.0 [P90]
TYPE 24.0 2#0 0 = speed step
Shift point 1
POSR 28.0 5.000000e+002 Following 500 [P90], measured
Shift point 1 from starting point, accelerate or
brake to new speed
SPEED 32.0 5.000000e+001 New speed 50 %
Shift point 1
ACCEL 36.0 5.000000e+002 Used, pre-defined deceleration
Shift point 1 ramp of 500 ms
TYPE 40.0 2#1 1 = set / reset output
Shift point 2
POSR 44.0 2.000000e+002 Following 200 [P90], measured
Shift point 2 from starting point, set / reset
output
OUTPUTNO. 48.0 b#16#09 Set / reset output 9
Shift point 2
OUTPUT value 52.0 b#16#31 Set output
Shift point 2
TYPE 56.0 2#1 1 = set / reset output
Shift point 3
POSR 60.0 9.000000e+002 Following 900 [P90], measured
Shift point 3 from starting point, set / reset
output
OUTPUTNO. 64.0 b#16#0A Set / reset output 10
Shift point 3
OUTPUT value 68.0 b#16#30 Reset output
Shift point 3
59
Simatic S7 modules for COMPAX with profibus DP
60
Variable Data type Meaning
Address area
Call-up example
Status Data type: BOOL Bit (DB, M, A) announces that the
Address areas: number has been converted.
Data module area Remains TRUE as soon as the
Marker area first conversion has been
I/O area successfully carried out.
Call-up example:
M 150.2
70.2A
[Link] 10.2
7.8.3 Status
The status indicates that the first conversion following the start has been
successfully carried out. If start remains active and if only the call-up
argument FloatNumber is changed, the status is not changed during status, if
the conversion is successful.
The floating point numeral should be saved as an IEEE 32 bit floating point
numeral and consists of the prefix (1 bit), exponent (8 bits) and mantissa (23
bits). The maximum/minimum floating point numeral to be converted is +/- 8
388 607.0. The result, the Motorola 48 bit DSP number, is saved in the
memory in the following form, the digit before the decimal point is saved in
complementary format and when numbers are negative, these are filled
accordingly with 1 bits.
61
Simatic S7 modules for COMPAX with profibus DP
• The FC10 works totally locally and produces the results in one cycle.
• The FC10 is only designed to create numerical values, these are e.g.
arguments for the SPEED, ACCEL, POSR or POSA COMPAX commands.
Values for parameters with a numerical character (e.g. feed constants,
parameters P40 to P49) and values for variables (V00 to V39) can be
created. Exercise caution with values for binary parameters (e.g. P93),
which must not have a digit after the decimal point.
• The maximum/minimum value, the variables and some parameters (3 and
6 byte parameters) that COMPAX can accept are +/-8 388 607.0. The
floating point argument must never be greater than this. You should note
that certain COMPAX parameters and commands have additional limit
values (accel +/- 65 000, maximum travel range +/- 4 000 000.0). The
parameter limit values should be taken from the COMPAX Product Manual.
Rounding errors occur.
• Attention! Once the start is deactivated, one DSP value 0.0 is written to the
6 byte DSP number.
62
7.8.6 Call-up example
In the example, the floating point numeral –125 9876 is to be converted into a
DSP number.
CALL FC 10
FoatNumber :=P#M 10.0 BYTE 4
Start :=P#M 1.0 BOOL 1
Status :=M2.0
DSPNumber :=P#M 20.0 BYTE 6
63
Simatic S7 modules for COMPAX with profibus DP
This FC is used to convert a Motorola 48 bit DSP number into an IEEE 32 bit
floating point numeral. Die Conversion is finitely precise but with larger
figures, substantial rounding errors can occur. The FC works locally on the
programmable controller, bus communication is not required.
64
Variable Data type Meaning
Address area
Call-up example
Status Data type: BOOL Bit (DB, M, A) announces that the
Address areas: number has been converted.
Data module area Remains TRUE as soon as the
Marker area first conversion has been
I/O area successfully carried out.
Call-up example:
M 150.2
70.2A
[Link] 10.2
7.9.3 Status
The status indicates that the first conversion following the start has been
successfully carried out. If start remains active and if only the DSPNumber
call-up argument is changed, the status is not changed during status, if the
conversion is successful.
The floating point numeral is saved as an IEEE 32 bit floating point numeral
and consists of prefix (1 bit), exponent (8 bits) and mantissa (23 bits). The
maximum/minimum DSP number to be converted is +/- 8 388 607.0. The
argument, the Motorola 48 bit DSP number, must be saved in the memory in
the following form, the digit before the decimal point should be saved in
complementary format and when numbers are negative, these are filled
accordingly with 1 bits.
65
Simatic S7 modules for COMPAX with profibus DP
• The FC11 works totally locally and produces the result in one cycle.
• The maximum/minimum value, the variables and some parameters (3 and
6 byte parameters) which COMPAX may accept is +/-8 388 607.0. The
floating point numeral cannot be greater following successful conversion.
Rounding errors occur!
• Attention! Once start is deactivated, one floating point value 0.0 is written
to the 4 byte floating point numeral.
66
8. Troubleshooting
8.1 Hardware and address errors
An unobtainable COMPAX can be detected via the ONLINE hardware
configuration of the Step7 package. Possible causes for this error may be as
follows:
Description of error Cause of error Error rectification
Activation not Cabling error Check cable assignment
possible
Line B on X5/6 pin 2
line A on X5/6 pin 7 incoming,
line B on X7 pin 2
line A on X7 pin 7 outgoing,
standard Siemens connectors (line
B pin 3, line A pin 8) cannot be
used, see operating instructions for
profibus option [1]
Activation not Cabling error Check output resistances
possible
If COMPAX is the last unit on the
bus line, a BUS3/01 output
resistance package must be
installed, standard Siemens
connectors with engagable output
resistances cannot be used, see
operating instructions for profibus
option [1]
Activation not Address error, Check address setting
possible parameter error
Compare C01 or P194 setting for
the station address with S7
configuration, the station address is
only transferred by COMPAX
following logic voltage off/on
67
Simatic S7 modules for COMPAX with profibus DP
68
Description of error Cause of error Error rectification
FB does not complete Reading and Check system module call-up
transfer writing modules
Call up these modules at least
(SYSTEM_WRITE
during module processing. We
and/or
would recommend that the
SYSTEM_READ)
modules are called up in cycles
not called up
during the complete
correctly
programmable controller program
processing, if run-time problems
will not be caused by such action.
FB does not complete Incorrect Check user date
transfer USER_DATA
Step string in the FB, cause e.g.
password not provided when
setting parameters
FB does not complete Several START Check FB's call-up
transfer inputs active on
Only activate one FB via START
FB's, which
per COMPAX
address a
COMPAX
Function not carried START input not Check START input setting
out activated or
Activate START input and leave
deactivated too
activated until STATUS
soon
announces that the transfer was
successful. A falling flank on the
START input describes the BKD
outgoing box (writing) once) with
a zero telegram
Programmable Incorrect Check module length
controller program programming
Check that DB modules are
interrupt
present and are of the minimum
size, generally check values
69
Simatic S7 modules for COMPAX with profibus DP
9. Bibliography
(1) Operating instructions. Option: profibus (F3)
(2) COMPAX Product Manual. Compact servo-control
(3) Operating instructions for electronical curve control
70