HNC
HNC
HNC100 RE 30 131-P-03/02.03
Profibus-DP interface:
Connection to Siemens S7 and S5
User Manual
2
© 2003
by Bosch Rexroth AG, Industrial Hydraulics, D-97813 Lohr am Main
All rights reserved. No part of this document may be reproduced or stored, processed, duplicated or circulated using electronic
systems, in any form or by any means, without the prior written authorisation of Bosch Rexroth AG.
In the event of contravention of the above provisions, the contravening party is obliged to pay compensation.
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
1. Introduction ............................................................................................. 4
1.1 General ..................................................................................................... 4
1.2 Profibus-DP address of the HNC 100 ....................................................... 6
6. Function and data blocks (S5-135U- CPU: 928 and 948) ................... 32
6.1 Data block DB 200 .................................................................................. 32
Page 1
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Page 2
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
10. Time........................................................................................................ 72
10.1 Bus cycle time (Profibus-DP) .................................................................. 72
10.2 Processing time of the function blocks.................................................... 73
10.3 Time required for processing the data on the HNC 100.......................... 73
Page 3
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
1. Introduction
1.1 General
Communication via
Profibus-DP
Communication via
function block FB 10
Hydraulic Hydraulic
axis axis
Example In the example shown, the HNC 100 is coupled via the Profibus-DP to
the S5-115U, which is provided with an IM 308-C master assembly. The
IM 308-C and the CPU of the S5 communicate via the peripheral bus,
which electrically interconnects all assemblies that exist on the S5.
Hardware requirements To enable the connection of the HNC 100 to a Profibus-DP system at all,
the HNC 100 must be fitted with a Profibus-DP interface. The HNC 100 is
connected to the Profibus-DP using a screened, twisted two-wire cable.
The Profibus-DP interface of the HNC 100 is made available on connector
X5 ( see the following connector assignment of the HNC 100 ). For further
information on the structure of a Profibus-DP system, please refer to the
master assembly manual and DIN standard 19245 part 3.
Page 4
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Page 5
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Software requirements The relevant software drivers for the Profibus-DP interface are integrated
in the HNC 100 only in software version 4_02m00n00d00x00k00v00 or
higher.
The address of the HNC 100 is set using the address switches ( S1 and
S2 ) and machine datum M410 ( offset HNC address ). The address of
the HNC 100 results from the sum of addresses, which were set using the
address switches, and the value in machine datum M410 ( offset HNC
address ). If, for example, address 10 was set on the address switches
and the machine datum contains the value “2”, the resulting address of the
HNC 100 will be “12”.
S1 S2 Address of
HNC100:
0 0 1
1 0 2
2 0 3
.. .. ..
9 0 10
A 0 11
B 0 12
C 0 13
D 0 14
E 0 15
F 0 16
0 1 17
1 1 18
2 1 19
.. .. ..
9 1 26
A 1 27
B 1 28
C 1 29
D 1 30
E 1 31
F 1 32
The value of machine datum M410 ( offset of HNC address ) is set in the
WIN-PED program, program part “Machine data”. Select menu command
Edit > Change in the machine data program part. Then open the group
“General“. This group includes machine datum M410.
Remark If the address of the HNC 100 is changed via address switches S1 and
S2 or via machine datum M410, the HNC 100 takes the new address over
only after a reset was carried out on the HNC 100.
Page 6
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
2. Transfer protocol
2.1 Communication sequence
General The data connection between the master assembly and the HNC 100 is
established automatically when the operating voltage is switched on. The
master assembly addresses all slaves ( HNC 100 ) connected to the
Profibus-DP system and checks them for readiness for operation
( operating voltage applied ). When the individual DP slaves signal their
readiness for operation, they are parameterized and configured by the DP
master. After this the master assembly starts to exchange user data with
the DP slaves on a cyclical basis.
For the HNC 100 it was specified that always 8 bytes of data are
transferred. These 8 bytes include the coding of the function which is to be
executed by the HNC 100.
The HNC 100 and the DP master exchange data blocks having a length of
8 bytes. With the help of these 8 bytes it can be determined which function
is to be executed by the HNC 100. The table below shows an overview of
the functions which can currently be executed by the HNC 100.
As can be seen from the overview table, the first byte in the data block,
the so-called identification byte, defines, which function is to be executed
by the HNC 100. In the subsequent byte, the complementary identification
byte, 3 bits are of importance: the error indication bit ( f ), the
synchronization bit ( y ) and the complementary identification bit ( z )
Page 7
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
rd th th h th th
Contents of the ID byte CID byte 3 4 5 6 7 8
st nd
data block Direction of data (1 byte) (2 byte) byte byte byte byte byte byte
Read 10000aaa
R-parameter f00000yz Number Value
Write 00000aaa
Read 10001aaa
Machine data f00000yz Number Value
Write 0 0 0 0 1a a a
Read 10010aaa Num-
C-variables f00000yz Value Free
Write 00010aaa ber
Read 10011xxx Num-
B-variables f00000yz Value Free
Write 00011xxx ber
Read 10100xxx Num-
Process data f00000yz Value Free
Write Not permitted ber
Digital Read 10101xkk Inputs ( bit-coded )
f00000yz Free
inputs Write *) 00101skk 8 - 1 16 - 9 24 - 17 32 - 25
Digital Read 10110xkk Outputs ( bit-coded )
f00000yz Free
outputs Write 00110skk 8-1 16 - 9 24 - 17 32 - 25
Read 10111xxx
Flags f00000yz Number Value Free
Write 00111sxx
Read 11011xxw Curve Number of the x- or y-value of the
number
Curve points f00000yz ( 0 - 15) curve point curve point
Write 01011xxw ( 0 - 4095 )
aaa: 001 = Axis 1 kk: 00 = I/O card 1 s: 0 = Delete bit on the HNC xxx: Bits are ignored
010 = Axis 2 01 = I/O card 2 1 = Set bit on the HNC f: Error indication bit
100 = Auxiliary axis 10 = I/O card 3 w: 0 = x-value of a curve point y: Synchronization bit
11 = I/O card 4 1 = y-value of a curve point z: Complementary identification bit
Error indication bit ( f ) The error indication bit is set on the HNC 100 during the evaluation of the
data block, if an error is present on the HNC 100 ( e.g. encoder error or
traversing range limit ). The exact cause of the error can be determined
with the help of the diagnosis data provided. How to request and interpret
these diagnosis data is explained in more detail in the chapter “Diagnosis
data of the HNC 100“.
Complementary identification The complementary identification bit signals the HNC 100 whether the
bit ( z ) user data block contains new data. These have to be changed from 0 to
1 or vice versa, if new user data are to be transferred. If the HNC 100
recognizes that data are new, these will be evaluated accordingly.
Otherwise, the data will not be evaluated by the HNC 100.
The complementary identification bit is only required because the user
data transfer via the Profibus-DP is cyclical.
Synchronization bit ( y ) The "value“ of the complementary identification bit is monitored by the
HNC 100. This means that the synchronization bit is set in the HNC 100, if
the HNC 100 receives new user data via the Profibus-DP, but the
complementary identification bit has a wrong value. In this case, the HNC
100 does not evaluate the data.
Page 8
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Direction of data In the "read" direction of data, values, inputs or outputs are fetched from
the HNC 100. In the "write" direction, values, inputs or outputs are
changed on the HNC 100. Some examples are to illustrate the format of
transferred data.
Example: Read If the value of the R-parameter 200 ( axis 1 ) is to be read, a data block
with the corresponding identification byte ( = 81H ) and the number of the
R-parameter ( = 00C8H ) must be passed on to the DP master. The bytes,
which are used for the value, initially contain the value zero. This user
data block is transferred via the Profibus-DP to the HNC 100. There, the
user data block is evaluated and "filled" with the value of the R-parameter.
The user data block with the R-parameter is resent to the DP master via
the Profibus-DP, where the value of the R-parameter will be available.
Example: Write If the value of R-parameter 200 is to be changed, the DP master must
transfer a data block. In this situation, the bytes contain a number which
relates to the value. The HNC evaluates the data block and transfers the
data block unchanged as an acknowledgement.
Example: Error If the HNC 100 detects an error while evaluating the data block ( e.g.
R-parameter is not defined ), the HNC 100 overwrites the identification
byte with “FF” and assigns a corresponding error number to bytes 3 and 4.
Then, it transfers this modified data block.
Page 9
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
The following error numbers are fed back by the HNC 100 in the case of
an error.
FFAC The curve point could not be sent, because the curve
is being updated (-> nc command: KURVE ...
UPDATE) or new curve points are received over the
serial interface.
FFB1 Sending of a complete curve has not been started
FFB2 x-value for the curve point is not permitted
FFB3 Curve point is not defined
FFCC Process datum is not defined
FFD1 Function is not defined ( transfer protocol )
FFD2 Invalid flag number
FFD3 Writing of a process datum is impossible
FFD4 Writing of digital inputs is impossible
FFD5 Invalid B-variable number
FFD6 Invalid axis number specified
FFD7 Invalid C-variable number
FFD8 Value of the machine datum too small
FFD9 Value of the machine datum too great
FFDA Value of the R-parameter too small
FFDB Value of the R-parameter too great
FFE4 Curve is not defined
FFFC Machine datum not defined
FFFD R-parameter not defined
Remark To facilitate the user's accessing the HNC 100 via the Profibus-DP,
function blocks ( FB 10 and FB 21 ) are available for master assembly
IM 308-C ( S5 assembly ), or ( FC 10 and FC 21 ) for the S7 functions,
which use the described data format.
Page 10
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
3. Master assemblies
3.1 Overview
In addition, in conjunction with the configuration, make sure that the input
and output data for the HNC 100 on the IM 308-C are read or written via
the same addresses. If this requirement is not met, the FB 10 function
block cannot be used.
Page 11
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
In addition, in conjunction with the configuration, make sure that the input
and output data for the HNC 100 on the IM 308-C are read or written via
the same addresses. If this requirement is not met, the FB 10 function
block cannot be used.
In addition, in conjunction with the configuration, make sure that the input
and output data for the HNC 100 on the IM 308-C are read or written via
the same addresses. If this requirement is not met, the function block
FB 10 cannot be used.
Page 12
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Moreover, when configuring the HNC 100, take into account that the input
and output data of the HNC 100 must be completely within the I/O
address area 64 to 127 or in the I/O address area 128 to 191.
Overlapping of these areas within the input and output data of the
HNC 100 must be avoided. If overlapping is required, the FB 10 function
block cannot be used.
With the S5-95U with DP master interface, the component master file
MMRR0476.GSD must be used for the configuration of the HNC 100 ( see
annex - chapter: Software ). This file must be copied into the relevant
subdirectory for component master files of the COM PROFIBUS program.
Only then can the HNC 100 be configured as Profibus-DP slave in the
COM PROFIBUS program. The HNC 100 is listed in the group “NC“.
With the S7-300 and S7-400 with integrated DP master, the component
master file MMRR0476.GSD must be used for the configuration of the
HNC 100 ( see annex - chapter: Software ). This file must be copied into
the relevant subdirectory for component master files of the STEP7
program. Only then can the HNC 100 be configured as Profibus-DP slave
in the STEP7 program. The HNC 100 is listed in the group “NC“.
Page 13
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
3.7 Example of integrating an HNC100 into a Profibus-DP system under the COM
PROFIBUS V3.0 software
In order that the HNC 100 appears in the group “NC”, you must copy the
component master file of the HNC 100 ( mmrr0476.gsd ) into the
subdirectory \GSD of the COM PROFIBUS program. You can read in the
component master file of the HNC 100 and include the HNC 100 as
Profibus-DP slave in the group “NC” by selecting menu item Datei > GSD-
Dateien einlesen. Now you can open a new or existing master system,
into which the HNC 100 can be included as DP slave. For adding the
HNC 100, follow the steps below:
Select the menu item Projektieren > Neuer Slave... . A dialog will appear,
in which you have to enter the Profibus address of the HNC 100. After
having entered the Profibus address, click the OK button. The dialog
Slaveeigenschaften will open.
Page 14
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Click the button Bestellnr in this dialog to open the list with the available
configurations.
Insert the configuration S5 <- HNC: 8-Byte-Standard in the slot 0 and the
configuration S5 -> HNC: 8-Byte-Standard in the slot 1.
After selecting the configurations click the button Schliessen to open the
dialog Konfigurieren again.
Page 15
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
In this dialog, you have to enter the starting address of the address range,
via which data are sent to the HNC 100 and also received from the
HNC 100. Please note that the input and output addresses must be
identical, since this is assumed by the function blocks.
After having entered the addresses, click the OK button. Thus, the
inclusion of an HNC 100 as DP slave in a master system is completed.
Page 16
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Profibus-DP
S5-115U
+ Communication HNC 100
IM 308-C
DB 200 FB 21 initialization
• Coordination of communication • Initialization of DB 200
FB 10 -communication
• R-parameters S5 ↔ HNC
• Machine data S5 ↔ HNC
• C-variables S5 ↔ HNC
• B-variables S5 ↔ HNC
• Process data S5 ← HNC
• Digital input S5 ↔ HNC
• Digital outputs S5 ↔ HNC
• Flags S5 ↔ HNC
The user must save in data block DB 200 the addresses on the IM 308-C,
via which the user data can be transferred to the individual HNC 100s
( determination of the addresses with the help of the COM PROFIBUS
program ). In addition, certain data and states can be saved in DB 200 in
order to coordinate the communication via the Profibus-DP.
The length of data block DB 200 depends on the number of HNCs, which
are connected to the IM 308-C via the Profibus-DP. 8 data words are
required for each HNC 100. The first 6 data words in the DB 200 are
required for saving general data. The first data word is used for saving the
address of the 1st HNC and the total number of HNCs. For an HNC 100
that is coupled to the Profibus-DP, bit L2 must be set additionally equal to
one.
DW 1 Reserved
DW 2 Reserved General
DW 3 Reserved data
DW 4 Reserved
DW 5 Reserved
DW 6 L2 Reserved
DW 7 Reserved Address
DW 8 Reserved
DW 9 Reserved
1st HNC
DW 10 Reserved
DW 11 Reserved
DW 12 Reserved
DW 13 Reserved
DW 14
Further HNCs
DW 15
Page 17
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Example The HNCs with the addresses 11 and 12 are connected to the Profibus-
DP. This results in a length of 22 data words for data block DB200 ( 6 data
words for general data, 16 data words for the two HNCs ). Consequently,
DB200 must include data word DW 0 through data word DW 21. In the
first data byte of the DB 200, 11 must be entered, since the address of the
first HNC is “11”. In the second data byte, 2 must be entered, since two
HNCs are available.
With the COM PROFIBUS software, it was determined that data are
exchanged with the individual HNC 100s via addresses 100 to 107 ( P-
area ) and 200 to 207 ( P-area ). This address range is used for both
transferring data to the HNC 100 and reading data that are received from
the HNC 100. The user must enter the addresses for the individual
HNC 100s that were determined using the COM PROFIBUS software as
illustrated in the example below.
DW 0 11 2
DW 1 ----
DW 2 ---- General
DW 3 ---- data
DW 4 ----
DW 5 ---
DW 6 1 ----
DW 7 --- 100
DW 8 ----
DW 9 ----
HNC 11
DW 10 ----
DW 11 ----
DW 12 ----
DW 13 ----
DW 14 1 ----
DW 15 --- 200
DW 16 ----
DW 17 ----
HNC 12
DW 18 ----
DW 19 ----
DW 20 ----
DW 21 ----
4.2.1 General
The main task of function block FB 21 is to initialize all data words in data
block DB 200, whose values do not need to be entered by the user.
Page 18
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
4.2.2 Parameterization of FB 21
PROD OK
INDP115A
FEHL
FB 21
Transfer parameter of FB 21
PROD (product data management) At present, the transfer parameter PROD is irrelevant. It can have any
value.
OK ( error-free execution ) This bit provides information on whether an error has occurred during the
processing of function block FB 21. If the value of this parameter is 1,
FB 21 was processed without any error. However, if the content of this bit
is zero, an error has occurred during processing of this function block. In
this case, the associated error number is saved in the transfer parameter
"FEHL".
FEHL ( error ) This transfer parameter includes an error number, if the value of the OK
bit is zero. The table below shows an overview of possible errors with the
associated numbers.
Caution: No data word must be used for the transfer parameter FEHL, because
data block DB 200 is called in FB 21.
Block number FB 21
Block name INDP115A
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 - 205
Assigned timers 1) T ( HNC addresses )
Average operating time (S5- CPU 943: 3 ms
115U, length of DB200: 22 CPU 944: 0.5 ms
DWs)
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-115U. Thus, timers T5 and T12 are
assigned.
Page 19
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
0003 :
0004 :L KH 0000 Initialize error flag word
0006 :T MW 12
0007 :
0008 :SPA FB 21 Call FB 21
0009 NAME :INDP115A
000A PROD : MW 10
000B OK : M 110.0
000C FEHL : MW 12
000D :BE
4.3.1 General
4.3.2 Parameterization of FB 10
HNC AUS1
KODP115A
L/S AUS2
FUNK SEND
NR FB 10 ENDE
ACHS OK
EIN1
EIN2
Page 20
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Transfer parameter of FB 10
HNC With the HNC transfer parameter, the user determines, which HNC 100
is to process a parameter. It may have any value between 0 and 126. With
the help of this parameter, data can be loaded, which are saved for each
individual HNC in DB 200 ( e.g.: via which I/O address the HNC 100 can
be addressed ).
L/S The L/S transfer parameter signals whether the value of the relevant
parameter is to be read or written on the HNC. If L/S is equal to zero, a
write access is executed. However, if L/S is not equal to zero, the
corresponding parameter value is read.
L/S Meaning
0 Parameter value is written
not equal to 0 Parameter value is read
FUNK Meaning
RP R-parameter
MD Machine datum
CV C-variable
BV B-variable
PG Process datum
ES Set digital inputs
ER Reset digital inputs
AS Set digital outputs
AR Reset digital outputs
MS Set flags
MR Reset flags
Page 21
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Caution: When changing values of machine data, please note that in the case of
some machine data, the new value is only taken over, if a reset has been
triggered on the HNC 100 ( see manual of the HNC / chapter Machine
data ).
In the case of function PG, the NR parameter must contain the number of
the process datum whose value is to be read. If, for example, the current
value of the actual position value is to be determined, the NR parameter
must contain “3” as a value ( L/S = 1, FUNK = PG ). The assignment of
the individual process data numbers is listed in the following table.
Number of Meaning
the process
datum
3 Actual position value Axis 1
4 Actual position value Axis 2 ( 2-axis version )
5 Actual pressure value Axis 1
6 Actual pressure value Axis 2 ( 2-axis version )
7 Position command value Axis 1
8 Position command value Axis 2 ( 2-axis version )
9 Pressure command value Axis 1
10 Pressure command value Axis 2 ( 2-axis version )
11 Peak value Minus Axis 1
12 Peak value Minus Axis 2 ( 2-axis version )
13 Peak value Plus Axis 1
14 Peak value Plus Axis 2 ( 2-axis version )
15 Actual value Encoder 1
16 Actual value Encoder 2 ( 2-axis version )
17 Actual value Encoder 3 ( 2-axis version )
18 Actual value Encoder 4
19 Actual value Encoder 5
20 Actual value Encoder 6
21 Actual value Encoder 7
22 Actual value Encoder 8
23 Actual value Encoder 9
24 Actual value Encoder 10
25 Actual value Encoder 11
26 Following error Axis 1
27 Following error Axis 2 ( 2-axis version )
28 Synchronization error ( 2-axis version )
29 Target position value Axis 1
30 Target position value Axis 2 ( 2-axis version )
Page 22
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
ACHS The NR transfer parameter is only relevant for the functions RP, MD, CV.
It is used to distinguish, on which axis ( = NC-program ) the relevant
parameter ( R-parameter, machine datum or C-variable ) is to be
processed. If, for example, the value of R-parameter R200, which is used
in the NC-program of axis 1, is to be read, the ACHS parameter must
have the value “1” ( L/S =1, FUNK = RP, NR = 200 ).
ACHS Meaning
1 Axis 1 ( = NC-program 1 )
2 Axis 2 ( = NC-program 2 )
3 Auxiliary axis ( = auxiliary NC-program )
EIN1 and EIN2 The transfer parameters EIN1 and EIN2 are used to transfer the value or
the bit pattern, which the parameter should have on the HNC. Two
transfer parameters are required, as the values of the R-parameters,
machine data, C/B-variables and process data and also the bit pattern of
the digital inputs and outputs each take 4 bytes. These transfer
parameters are only relevant, if L/S is equal to zero ( write access ).
For the functions RP, MD, CV, BV and PG, EIN1 must contain the high-
word of the value, EIN2 the low-word.
Value
Example: Value = 100000 ( decimal ) = 186A0 ( hexadecimal )
EIN1 = 0001H
EIN2 = 86A0H
For the functions ES, ER, AS ad AR, EIN1 must contain the digital inputs
or outputs 1 to 16 of the HNC in a bit-coded form, and EIN2 the digital
inputs or outputs 17 to 32.
Page 23
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
EIN1 = 0240H
EIN2 = 0280H
AUS1 and AUS2 In the case of a read access ( L/S not equal to zero ) the value or the bit
pattern of a parameter is saved in the transfer parameters AUS1 and
AUS2. Should an error occur while FB 10 is being executed, AUS1 will
contain a corresponding error number.
Value
Format of transferred values All the values of parameters, which are to be transmitted, are transferred
in a fixed-point format with three digits after the decimal point. This means
that when reading the value of an R-parameter, which has a value of
125.35 on the HNC, the resulting value for the R-parameter in the transfer
parameters AUS1 and AUS2 is 125350. The actual value of the parameter
can be determined by dividing the value by 1000.
The same is valid for changing the value of a parameter. If, for example,
the value of an R-parameter is to be changed to 180, the value which
must be saved for the R-parameter in EIN1 and EIN2 is 180000 ( = 180 x
1000 ).
Page 24
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
SEND The SEND output bit signals that FB 10 transferred a user data block
to the HNC 100 and that the associated reply is awaited.
SEND Meaning
0 Reply received
1 Reply awaited
ENDE The ENDE output bit signals whether a data exchange with the HNC 100
has been completed. This means that a user data block was sent, the
associated reply received and data included in AUS1 and AUS2 ( L/S not
equal to zero ).
ENDE Meaning
0 Data exchange is going on
1 Data exchange completed
Error Meaning
number
F000 Specified HNC is invalid
F001 HNC does not respond (timeout elapsed)
F002 Error on HNC ( e.g. encoder error )
F003 Invalid axis number specified
F004 Invalid I/O card specified
F005 Invalid function specified
F006 HNC not coupled to Profibus ( L2 = 0 )
F007 Invalid C-variable number
F008 Invalid B-variable number or process datum number specified
F009 Incorrect area specified in DB200 ( P- or Q-area )
FFCC Process datum is not defined
FFB1 Function is not defined ( transfer protocol )
FFD2 Invalid flag number
FFD3 Writing of process datum is impossible
FFD4 Writing of digital inputs is impossible
FFD5 Invalid B-variable number
FFD6 Invalid axis number specified
FFD7 Invalid C-variable number
FFD8 Value of the machine datum too small
FFD9 Value of the machine datum too great
FFDA Value of the R-parameter too small
FFDB Value of the R-parameter too great
FFFC Machine datum not defined
FFFD R-parameter not defined
Page 25
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Caution: No data word must be used for the transfer parameters AUS1 and
AUS2, because data block DB 200 is called in FB 10.
Summary The following table shows the possible combinations of the individual
transfer parameters in a summarized form. The parameters marked with
an “X” in this table are relevant for the execution of the individual functions
( FUNK ).
Block number FB 10
Block name KODP115A
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 -253
Assigned timers 1) T ( HNC addresses )
Average operating time ( S5- CPU 943: 3.3 ms
115U ) CPU 944: 0.2 ms
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-115U. Thus, timers T5 and T12 are
assigned.
The value of the R-parameter is included in flag words MW20 and MW22,
when FB 10 has been completed without error ( ENDE = 1, OK = 1 ). The
related S5-program is shown in the following.
Page 26
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
001A :
001B :U E 0.0 Flag M60.1 is set, when a
001C :UN M 60.0 rising edge is detected on input
001D :UN A 4.0 E0.0 and the FB 10 does
001E :S M 60.1 not send (SEND = 0)
001F :
0020 :U E 0.0 Save status of input E0.0 in
0021 :S M 60.0 flag M60.0
0022 :UN E 0.0
0023 :R M 60.0
0024 :
0025 :A DB 10
0026 :L KF +11 Load HNC address
0028 :T DL 0
0029 :
002A :L KH 0001 Load (read) direction of data
002C :T DR 0
002D :
002E :L KC RP Load function (R-parameter)
0030 :T DW 1
0031 :
0032 :L KF +201 Load number of the R-parameter
0034 :T DW 2
0035 :
0036 :L KH 0001 Load number of the axis
0038 :T DL 3
0039 :
003A :L KH 0000 Initialize transfer parameters EIN1
003C :T DW 4 and EIN2 with zero
003D :T DW 5
003E :
003F :U M 60.1
0040 :SPB FB 10
0041 NAME :KODP115A
0042 HNC : DL 0
0043 L/S : DR 0
0044 FUNK : DW 1
0045 NR : DW 2
0046 ACHS : DL 3
0047 EIN1 : DW 4
0048 EIN2 : DW 5
0049 AUS1 : MW 20
004A AUS2 : MW 22
004B SEND : A 4.0
004C ENDE : A 4.1
004D OK : A 4.2
004E :
Further examples
Page 27
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Profibus-DP
S5-115U
+ Communication HNC 100
IM 308-C
DB 200 FB 21 - initialization
• Coordination of communication • Initialization of DB 200
FB 10 - communication
• R-parameter S5 ↔ HNC
• Machine data S5 ↔ HNC
• C-variables S5 ↔ HNC
• B-variables S5 ↔ HNC
• Process data S5 ← HNC
• Digital inputs S5 ↔ HNC
• Digital outputs S5 ↔ HNC
• Flags S5 ↔ HNC
The user must save in data block DB 200 in defined data words the
addresses on the IM 308-C, via which the user data can be transferred to
the individual HNC 100s ( determination of the addresses with the help of
the COM PROFIBUS program ). In addition, you must save in DB 200, via
which memory area ( P- or Q-area ) the data are to be transferred. For the
P-area, ‘P’ ( = 50 hex ) is to be saved at the relevant place in DB 200, and
for the Q-area ‘Q’ ( = 51 hex ). In addition, certain data and states can be
saved in DB 200 in order to coordinate the communication via the
Profibus-DP.
The length of data block DB 200 depends on the number of HNCs, which
are connected to the IM 308-C via the Profibus-DP. 8 data words are
required for each HNC 100. The first 6 data words in the DB 200 are
required for saving general data. The first data word is used for saving the
address of the 1st HNC and the total number of HNCs. For an HNC 100
that is coupled to the Profibus-DP, bit L2 must be set additionally equal to
one.
Page 28
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
st
DW 0 Address of 1 HNC Number of HNCs
DW 1 Reserved
DW 2 Reserved General
DW 3 Reserved data
DW 4 Reserved
DW 5 Reserved
DW 6 L2 Reserved
DW 7 Area Address
DW 8 Reserved
DW 9 Reserved
1st HNC
DW 10 Reserved
DW 11 Reserved
DW 12 Reserved
DW 13 Reserved
DW 14
Further HNCs
DW 15
Example The HNCs with address 11 and address 12 are connected to the Profi-
bus-DP. This results in a length of 22 data words for data block DB 200 ( 6
data words for general data, 16 data words for the two HNCs ).
Consequently, DB200 must include data word DW 0 through data word
DW 21. In the first data byte of the DB 200, 11 must be entered, since the
address of the first HNC is “11”. In the second data byte, 2 must be
entered, since two HNCs are available. The L2-bit is to be set for each
HNC.
With the COM PROFIBUS software, it was determined that data are
exchanged with the individual HNC 100s via addresses 100 to 107 ( P-
area ) and 200 to 207 ( Q-area ). This address range is used for both
transferring data to the HNC 100 and reading data that are received from
the HNC 100. The user must enter the addresses, which were determined
for the individual HNC 100s using the COM PROFIBUS software, as
illustrated in the example below .
Page 29
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
DW 0 11 2
DW 1 ----
DW 2 ---- General
DW 3 ---- data
DW 4 ----
DW 5 ---
DW 6 1 ----
DW 7 ‘P’ 100
DW 8 ----
DW 9 ----
HNC 11
DW 10 ----
DW 11 ----
DW 12 ----
DW 13 ----
DW 14 1 ----
DW 15 ‘Q’ 200
DW 16 ----
DW 17 ----
HNC 12
DW 18 ----
DW 19 ----
DW 20 ----
DW 21 ----
5.2.1 General
Block number FB 21
Block name INDP945
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 - 205
Assigned timers 1) T ( HNC addresses )
Average operating time (S5-115U, CPU 945: 30 µs
length of DB 200: 22 DWs)
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-115U. Thus, timers T5 and T12 are
assigned.
Page 30
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
5.3.1 General
Block number FB 10
Block name KODP945
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 -253
Assigned timers 1) T ( HNC addresses )
Average operating time CPU 945: 40 µs
( S5-115U )
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-115U. Thus, timers T5 and T12 are
assigned.
Page 31
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Profibus-DP
S5-135U
+ Communication HNC 100
IM 308-C
DB 200 FB 21 - initialization
• Coordiniation of communication • Initialization of DB 200
FB 10 - communication
• R-parameters S5 ↔ HNC
• Machine data S5 ↔ HNC
• C-variables S5 ↔ HNC
• B-variables S5 ↔ HNC
• Process data S5 ← HNC
• Digital inputs S5 ↔ HNC
• Digital outputs S5 ↔ HNC
• Flags S5 ↔ HNC
The user must save in data block DB 200 in defined data words the
addresses on the IM 308-C, via which the user data can be transferred to
the individual HNC 100s ( determination of the addresses with the help of
the COM PROFIBUS program ). In addition, you must save in DB 200, via
which memory area ( P- or Q-area ) the data are to be transferred. For the
P-area, ‘P’ ( = 50 hex ) is to be saved at the relevant place in DB 200, and
for the Q-area ‘Q’ ( = 51 hex ). In addition, certain data and states can be
saved in DB 200 in order to coordinate the communication via the
Profibus-DP.
The length of data block DB 200 depends on the number of HNCs, which
are connected to the IM 308-C via the Profibus-DP. 8 data words are
required for each HNC 100. The first 6 data words in the DB 200 are
required for saving general data. The first data word is used for saving the
address of the 1st HNC and the total number of HNCs. For an HNC 100
that is coupled to the Profibus-DP, bit L2 must be set additionally equal to
one.
Page 32
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
st
DW 0 Address of 1 HNC Number of HNCs
DW 1 Reserved
DW 2 Reserved General
DW 3 Reserved data
DW 4 Reserved
DW 5 Reserved
DW 6 L2 Reserved
DW 7 Area Address
DW 8 Reserved
DW 9 Reserved
1st HNC
DW 10 Reserved
DW 11 Reserved
DW 12 Reserved
DW 13 Reserved
DW 14
Further HNCs
DW 15
Example The HNCs with address 11 and address 12 are connected to the Profi-
bus-DP. This results in a length of 22 data words for data block DB 200 ( 6
data words for general data, 16 data words for the two HNCs ).
Consequently, DB 200 must include data word DW 0 through data word
DW 21. In the first data byte of the DB 200, 11 must be entered, since the
address of the first HNC is “11”. In the second data byte, 2 must be
entered, since two HNCs are available. The L2-bit is to be set for each
HNC.
With the COM PROFIBUS software, it was determined that data are
exchanged with the individual HNC 100s via addresses 100 to 107 ( P-
area ) and 200 to 207 ( Q-area ). This address range is used for both
transferring data to the HNC 100 and reading data that are received from
the HNC 100. The user must enter the addresses, which were determined
for the individual HNC 100s using the COM PROFIBUS software, as
illustrated in the example below .
Page 33
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
DW 0 11 2
DW 1 ----
DW 2 ---- General
DW 3 ---- data
DW 4 ----
DW 5 ---
DW 6 1 ----
DW 7 ‘P’ 100
DW 8 ----
DW 9 ----
HNC 11
DW 10 ----
DW 11 ----
DW 12 ----
DW 13 ----
DW 14 1 ----
DW 15 ‘Q’ 200
DW 16 ----
DW 17 ----
HNC 12
DW 18 ----
DW 19 ----
DW 20 ----
DW 21 ----
6.2.1 General
Block number FB 21
Block name INDP135U
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 - 205
Assigned timers 1) T ( HNC addresses )
Average operating time (S5-135U, CPU 928A: 2 ms
length of DB200: 22 DWs)
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-135U. Thus, timers T5 and T12 are
assigned.
Page 34
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
6.3.1 General
Block number FB 10
Block name KODP135U
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 -253
Assigned timers 1) T ( HNC addresses )
Average operating time CPU 928A: 2.3 ms
( S5-135U )
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-135U. Thus, timers T5 and T12 are
assigned.
Page 35
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
DB 200 FB 21 - initialization
•Coordination of communication • Initialization of DB 200
FB 10 - communication
• R-parameters S5 ↔ HNC
• Machine data S5 ↔ HNC
• C-variables S5 ↔ HNC
• B-variables S5 ↔ HNC
• Process data S5 ← HNC
• Digital inputs S5 ↔ HNC
• Digital outputs S5 ↔ HNC
• Flags S5 ↔ HNC
The user must save in data block DB 200 the I/O addresses, via which the
user data can be transferred to the individual HNC 100s ( determination of
the addresses with the help of the COM PROFIBUS program ). In
addition, certain data and states can be saved in DB 200 in order to
coordinate the communication via the Profibus-DP.
The length of data block DB 200 depends on the number of HNCs, which
are connected to the S5-95U via the Profibus-DP. 8 data words are
required for each HNC 100. The first 6 data words in the DB 200 are
required for saving general data. The first data word is used for saving the
address of the 1st HNC and the total number of HNCs. For an HNC 100
that is coupled to the Profibus-DP, bit L2 must be set additionally equal to
one.
st
DW 0 Address of 1 HNC Number of HNCs
DW 1 Reserved
DW 2 Reserved General
DW 3 Reserved data
DW 4 Reserved
DW 5 Reserved
DW 6 L2 Reserved
DW 7 Reserved Address
DW 8 Reserved
DW 9 Reserved
1st HNC
DW 10 Reserved
DW 11 Reserved
DW 12 Reserved
DW 13 Reserved
DW 14
Further HNCs
DW 15
Page 36
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Example The HNCs with address 11 and address 12 are connected to the Profi-
bus-DP. This results in a length of 22 data words for data block DB200 ( 6
data words for general data, 16 data words for the two HNCs ).
Consequently, DB 200 must include data word DW 0 through data word
DW 21. In the first data byte of the DB 200, 11 must be entered, since the
address of the first HNC is “11”. In the second data byte, 2 must be
entered, since two HNCs are available. The L2-bit is to be set for each
HNC.
With the COM PROFIBUS software, it was determined that data are
exchanged with the individual HNC 100s via I/O addresses 64 to 71 and
128 to 135. This address range is used for both transferring data to the
HNC 100 and reading data that are received from the HNC 100. The user
must enter the addresses, which were determined for the individual
HNC 100s using the COM PROFIBUS software, as illustrated in the
example below .
DW 0 11 2
DW 1 ----
DW 2 ---- General
DW 3 ---- data
DW 4 ----
DW 5 ---
DW 6 1 ----
DW 7 --- 64
DW 8 ----
DW 9 ----
HNC 11
DW 10 ----
DW 11 ----
DW 12 ----
DW 13 ----
DW 14 1 ----
DW 15 --- 128
DW 16 ----
DW 17 ----
HNC 12
DW 18 ----
DW 19 ----
DW 20 ----
DW 21 ----
7.2.1 General
Page 37
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Block number FB 21
Block name INDP095U
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 - 205
Assigned timers 1) T ( HNC addresses )
Average operating time (S5- 2 ms
95U, length of DB200: 22 DWs)
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-95U. Thus, timers T5 and T12 are
assigned.
7.3.1 General
Block number FB 10
Block name KODP095U
Nesting depth 1
Assigned data blocks DB 200
Assigned flags MB 200 -253
Assigned timers 1) T ( HNC addresses )
Average operating time (S5-95U) 3.1 ms
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S5-95U. Thus, timers T5 and T12 are
assigned.
Page 38
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
S7-300 Profibus-DP
or
S7-400 Communication HNC 100
with
DP master
DB 10 or DB xy FC 21 or FC 22 ( initialization )
• Coordination of communication • Initialization of DB 10 or DB xy
FC 10 or FC 11 ( ´communication )
• R-parameter S7 ↔ HNC
• Machine data S7 ↔ HNC
• C-cariables S7 ↔ HNC
• B-variables S7 ↔ HNC
• Process data S7 ← HNC
• Digital inputs S7 ↔ HNC
• Digital outputs S7 ↔ HNC
• Flags S7 ↔ HNC
• Curve points S7 ↔ HNC
Page 39
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
S7-400 via the Profibus-DP. 8 data words are required for each HNC 100.
The first 6 data words are required for saving general data. The first data
word is used for saving the address of the 1st HNC and the total number of
HNCs. For an HNC 100 that is coupled to the Profibus-DP, bit L2 must be
set additionally equal to one.
DBW 2 Reserved
DBW 4 Reserved General
DBW 6 Reserved data
DBW 8 Reserved
DBW 10 Reserved
DBW 12 L2 Reserved
DBW 14 I/O address
DBW 16 Reserved
DBW 18 Reserved
1st HNC
DBW 20 Reserved
DBW 22 Reserved
DBW 24 Reserved
DBW 26 Reserved
DBW 28
Further HNCs
DBW 30
Example The HNCs with the addresses 11 and 12 are connected to the Profibus-
DP. This results in a length of 22 data words for data block DB 10 or DB
xy, respectively ( 6 data words for general data, 16 data words for the two
HNCs ). Consequently, DB 10 or DB xy must include data word DBW 0
through data word DBW 42. In the first data byte, 11 must be entered,
since the address of the first HNC is “11”. In the second data byte, 2 must
be entered, since two HNCs are available. The L2-bit is to be set for each
HNC.
With the help of software STEP7 it was determined in the hardware
configuration that data can be exchanged with the HNC 100 via I/O
addresses ( bytes ) 256 to 263 or 264 to 271. This address range is
used for both transferring data to the HNC 100 and reading data that are
received from the HNC 100. The user must enter the I/O addresses, which
were determined for the individual HNC 100s using the STEP7 software,
as illustrated in the example below.
Page 40
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
DBW 0 11 2
DBW 2 ----
DBW 4 ---- General
DBW 6 ---- data
DBW 8 ----
DBW 10 ---
DBW 12 1 ----
DBW 14 256
DBW 16 ----
DBW 18 ----
HNC 11
DBW 20 ----
DBW 22 ----
DBW 24 ----
DBW 26 ----
DBW 28 1 ----
DBW 30 264
DBW 32 ----
DBW 34 ----
HNC 12
DBW 36 ----
DBW 38 ----
DBW 40 ----
DBW 42 ----
8.2.1 General
Page 41
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
8.2.2 Parameterization of FC 21
PROD OK
INDPS7
FEHL
FC 21
Transfer parameters of FC 21
PROD (product data management) At present, the transfer parameter PROD is irrelevant. It can have any
value.
OK ( error-free execution ) This bit provides information on whether an error has occurred during the
processing of function FC 21. If the value of this parameter is 1, FC 21
was processed without any error. However, if the content of this bit is zero,
an error has occurred during processing of this function. In this case, the
associated error number is saved in the transfer parameter "FEHL".
FEHL ( error ) This transfer parameter includes an error number, if the value of the OK
bit is zero. The figure below shows an overview of possible errors with the
associated numbers.
Caution: If a data word is used for transfer parameter FEHL, it must be transferred
with the absolute address of FC 21 ( e.g. DB20.DBW10 ). This is
required, because data block DB 10 is called in FC 21.
Function number FC 21
Function name INDPS7
Nesting depth 1
Assigned data blocks DB 10
Local data 8 bytes
Assigned timers 1) T ( HNC addresses )
Average running time (S7-300, CPU 315-2 DP:
length of DB 10: 22 DBWs) 0.3 ms
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S7-300. Thus, timers T5 and T12 are
assigned.
Page 42
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
8.3.1 General
The main task of FC 22 is to correctly initialize all data words in the data
block, whose number is saved in transfer parameter DBNR. This
transferred data block contains in defined data words the I/O addresses,
via which data are exchanged with the individual HNCs ( cf. chapter 8.1 ).
Remark The task of function FC 21 is the same as that of function FC 22. Func-
tion FC 21 can only initialize data block number 10 ( cf. chapter 8.2 ).
8.3.2 Parameterization of FC 22
DBNR OK
INDPS722
FEHL
FC 22
Transfer parameters of FC 22
DBNR (number of the data block) This transfer parameter contains the number of the data block that is to
be initialized. This data block contains in defined data words the I/O
addresses via which data are exchanged with the individual HNCs ( cf.
chapter 8.1 ).
OK ( error-free execution ) This bit provides information of whether an error has occurred during the
processing of function FC 22. If the value of this parameter is 1, FC 22
was processed without any error. However, if the content of this bit is zero,
an error has occurred during processing of this function. In this case, the
associated error number is saved in the transfer parameter "FEHL".
Page 43
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
FEHL ( error ) This transfer parameter includes an error number, if the value of the OK
bit is zero. The figure below shows an overview of possible errors with the
associated numbers.
Caution: If a data word is used for transfer parameter FEHL, it must be transferred
with the absolute address of FC 22 ( e.g. DB20.DBW10 ). This is
required, because the data block, whose number is included in transfer
parameter DBNR, is opened in FC 22.
Function number FC 22
Function name INDPS722
Nesting depth 1
Assigned data blocks Data block, whose number is
written in transfer parameter DBNR
Local data 8 bytes
1)
Assigned timers T (HNC addresses )
Average running time (S7-300, CPU 315-2 DP:
length of DB 10: 22 DBWs) 0.3 ms
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S7-300. Thus, timers T5 and T12 are
assigned.
// Transfer parameter DBNR of function FC 22 contains the value “10”. This results
// in the fact that data block DB 10 will be initialized.
L W#16#0
T MW 4
CALL FC 22
DBNR:=10
OK :=A0.0
FEHL:=MW4
8.4.1 General
Page 44
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
received. If the reply was not received, the check is repeated in the next
calls until the reply has been received or the timeout counter ( output of an
error message ! ) has elapsed. After that, the entire process can start over
again.
Remark The task of function FC 11 is the same as that of function FC 10. Func-
tion FC 10 assumes that the I/O addresses, via which data are exchanged
with the individual HNCs, are contained in data block DB 10. With function
FC 11, the I/O addresses can be included in any data block. The number
of the data block is signaled to function FC 11 in the transfer parameter
DBNR ( cf. chapter 8.5 ). Reading or changing parameters on the HNC
100 should be carried out using only function FC 10 or only function
FC 11.
8.4.2 Parameterization of FC 10
HNC AUS1
KODPS7
L/S AUS2
FUNK SEND
NR FC 10 ENDE
ACHS OK
EIN1
EIN2
Transfer parameters of FC 10
HNC With the HNC transfer parameter, the user determines, which HNC 100
is to process a parameter. It may have values ranging from 0 to 126. With
the help of this parameter, data can be loaded, which are saved for each
individual HNC in DB 10 ( e.g.: via which I/O address the HNC 100 can
be addressed. ).
L/S The L/S transfer parameter signals whether the value of the relevant
parameter is to be read or written on the HNC. If L/S is equal to zero, a
write access is executed. However, if L/S is not equal to zero, the
corresponding parameter value is read.
L/S Meaning
0 Parameter value is written
Page 45
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
FUNK Meaning
RP R-parameter
MD Machine datum
CV C-variable
BV B-variable
PG Process datum
ES Set digital inputs
ER Reset digital inputs
AS Set digital outputs
AR Reset digital outputs
MS Set flags
MR Reset flags
Caution: When changing values of machine data, please note that in the case of
some machine data, the new value is only taken over, when a reset has
been triggered on the HNC 100.
Page 46
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
In the case of function PG, the NR parameter must contain the number of
the process datum whose value is to be read. If, for example, the current
value of the actual position value is to be determined, the NR parameter
must contain “3” as a value ( L/S = 1, FUNK = PG ). The assignment of
the individual process data numbers is listed in the following table.
Number of Meaning
the process
datum
3 Actual position value Axis 1
4 Actual position value Axis 2 ( 2-axis version )
5 Actual pressure value Axis 1
6 Actual pressure value Axis 2 ( 2-axis version )
7 Position command value Axis 1
8 Position command value Axis 2 ( 2-axis version )
9 Pressure command value Axis 1
10 Pressure command value Axis 2 ( 2-axis version )
11 Peak value Minus Axis 1
12 Peak value Minus Axis 2 ( 2-axis version )
13 Peak value Plus Axis 1
14 Peak value Plus Axis 2 ( 2-axis version )
15 Actual value Encoder 1
16 Actual value Encoder 2 ( 2-axis version )
17 Actual value Encoder 3 ( 2-axis version )
18 Actual value Encoder 4
19 Actual value Encoder 5
20 Actual value Encoder 6
21 Actual value Encoder 7
22 Actual value Encoder 8
23 Actual value Encoder 9
24 Actual value Encoder 10
25 Actual value Encoder 11
26 Following error Axis 1
27 Following error Axis 2 ( 2-axis version )
28 Synchronization error ( 2-axis version )
29 Target position value Axis 1
30 Target position value Axis 2 ( 2-axis version )
31 Actual velocity value Axis 1
32 Actual velocity value Axis 2 ( 2-axis version )
33 DAC 1
34 DAC 2
35 DAC 3
36 DAC 4
37 Actual value Encoder 4 ( Volt )
38 Actual value Encoder 5 ( Volt )
39 Actual value Encoder 6 ( Volt )
40 Actual value Encoder 7 ( Volt )
41 Actual value Encoder 8 ( Volt )
42 Actual value Encoder 9 ( Volt )
43 Actual value Encoder 10 ( Volt )
44 Actual value Encoder 11 ( Volt )
Page 47
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
ACHS The ACHS transfer parameter is only relevant for the functions RP, MD,
CV. It is used to distinguish, on which axis ( = NC-program ) the relevant
parameter ( R-parameter, machine datum or C-variable ) is to be
processed. If, for example, the value of R-parameter R200, which is used
in the NC-program of axis 1, is to be read, the ACHS parameter must
have the value “1” ( L/S =1, FUNK = RP, NR = 200 ).
ACHS Meaning
1 Axis 1 ( = NC-program 1 )
2 Axis 2 ( = NC-program 2 )
3 Auxiliary axis ( = auxiliary NC-program )
EIN1 and EIN2 The transfer parameters EIN1 and EIN2 are used to transfer the value or
the bit pattern, which the parameter should have on the HNC. Two
transfer parameters are required, as the values of the R-parameters,
machine data, C/B-variables and process data and also the bit pattern of
the digital inputs and outputs each take 4 bytes. These transfer
parameters are only relevant, if L/S is equal to zero ( write access ).
For the functions RP, MD, CV, BV and PG, EIN1 must contain the high-
word of the value, EIN2 the low-word.
Value
Example: Value = 100000 ( decimal ) = 186A0 ( hexadecimal )
EIN1 = 0001H
EIN2 = 86A0H
For the functions ES, ER, AS and AR, EIN1 must contain the digital inputs
or outputs 1 to 16 of the HNC in a bit-coded form, and EIN2 the digital
inputs or outputs 17 to 32.
Page 48
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
AUS1 and AUS2 In the case of a read access ( L/S not equal to zero ), the value or the bit
pattern of a parameter is saved in the transfer parameters AUS1 and
AUS2. Should an error occur while FC 10 is being executed, AUS1 will
contain a corresponding error number.
Value
Format of transferred values All the values of parameters, which are to be transmitted, are transferred
in a fixed-point format with three digits after the decimal point. This means
that when reading the value of an R-parameter, which has a value of
125.35 on the HNC, the resulting value for the R-parameter in the transfer
parameters AUS1 and AUS2 is 125350. The actual value of the parameter
can be determined by dividing the value by 1000.
The same is valid for changing the value of a parameter. If, for example,
the value of an R-parameter is to be changed to 180, the value which
must be saved for the R-parameter in EIN1 and EIN2 is 180000 ( = 180 x
1000 ).
SEND The SEND output bit signals that FC 10 transferred a user data block to
the HNC 100 and that the associated reply is awaited.
SEND Meaning
0 Reply received
1 Reply awaited
Page 49
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
ENDE The ENDE output bit signals whether a data exchange with the HNC 100
has been completed. This means that a user data block was sent, the
associated reply received and data included in AUS1 and AUS2 ( L/S not
equal to zero ).
ENDE Meaning
0 Data exchange is going on
1 Data exchange completed
Error Meaning
number
8090 I/O address entered in the DB is incorrect
8093 Data block ( 8 bytes ) for the HNC is not consistent
80A0 Error on the HNC
80B0 HNC cannot be addressed via the Profibus
80B1 I/O address entered in the DB is incorrect
F000 Specified HNC is invalid
F001 HNC does not respond (timeout elapsed)
F002 Error on HNC ( e.g. encoder error )
F003 Invalid axis number specified
F004 Invalid I/O card specified
F005 Invalid function specified
F006 HNC not coupled to Profibus ( L2 = 0 )
F007 Invalid C-variable number
F008 Invalid B-variable number or process datum number specified
FFCC Process datum is not defined
FFD1 Function is not defined ( transfer protocol )
FFD2 Invalid flag number
FFD3 Writing of a process datum is impossible
FFD4 Writing of digital inputs is impossible
FFD5 Invalid B-variable number
FFD6 Invalid axis number specified
FFD7 Invalid C-variable number
FFD8 Value of the machine datum too small
FFD9 Value of the machine datum too great
FFDA Value of the R-parameter too small
FFDB Value of the R-parameter too great
FFFC Machine datum not defined
FFFD R-parameter not defined
Caution: If a data word is used for each of the transfer parameters AUS1 and
AUS2, it must be transferred with the absolute address of FC 10 ( e.g.
DB20.DBW10 ). This is required, because data block DB 10 is called in
FC 10.
Summary The following table shows the possible combinations of the individual
Page 50
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Function number FC 10
Function name KODPS7
Nesting depth 2 ( function SFC 14 and SFC15
are called )
Assigned data blocks DB 10
Local data 26 bytes
Assigned timers 1) T ( HNC addresses )
Average running time (S7-300) CPU 315-2 DP: 0.4 ms
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S7-300. Thus, timers T5 and T12 are
assigned.
The value of the process datum is included in flag words MW21 and
MW23, when FC 10 has been completed without error ( ENDE = 1, OK =
1 ). The related S7-program is shown in the following.
// Flag M0.1 is set when a rising edge has been detected at input E0.7 and
// function FC 10 does not send (SEND = 0).
U E 0.7
UN M 0.0
UN A 0.1
S M 0.1
// The status of input E0.7 is saved in flag M0.1.
U E 0.7
= M 0.0
// When flag M0.1 is set, function FC 10 is called.
Page 51
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
U M 0.1
SPB FC10
BEA
// The address of the HNC is loaded.
FC10: L 11
T MB 10
// The direction of data is loaded (read).
L 1
T MB 11
// The function is loaded (process datum).
L 'PG'
T MW 12
// The number of the process datum is loaded.
L 3
T MW 14
// Function FC 10 is called.
CALL FC 10
HNC :=MB10
L_S :=MB11
FUNK:=MW12
NR :=MW14
ACHS:=MB16
EIN1:=MW17
EIN2:=MW19
AUS1:=MW21
AUS2:=MW23
SEND:=A0.1
ENDE:=A0.2
OK :=A0.3
// When the ENDE-bit of FC 10 is set, flag M0.1 is reset.
U A 0.2
R M 0.1
Further examples
Page 52
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
8.5.1 General
Remark The task of function FC 10 is the same as that of function FC 11. Func-
tion FC 10 assumes that the I/O addresses, via which data are exchanged
with the individual HNCs, are contained in data block DB 10. With function
FC 11, the I/O addresses can be included in any data block. The number
of the data block is signaled to function FC 11 with transfer parameter
DBNR ( cf. chapter 8.4 ). Reading or changing parameters on the HNC
100 should be carried out using only function FC 11 or only function
FC 10.
8.5.2 Parameterization of FC 11
DBNR AUS1
HNC KODPS711 AUS2
L/S FEHL
FUNK ENDE
NR FC 11 OK
ACHS SEND
EIN1
EIN2
Page 53
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Transfer parameters of FC 11
DBNR (number of the data block) This transfer parameter contains the number of the data block, in which
the I/O addresses are saved in defined data words, via which data are
exchanged via the individual HNCs ( cf. chapter 8.1 ).
HNC With the HNC transfer parameter, the user determines, which HNC 100
is to process a parameter. It may have values ranging from 0 to 126. With
the help of this parameter, data can be loaded, which are saved for each
individual HNC in the transferred DB ( see DBNR parameter ) ( e.g.: via
which I/O address the HNC 100 can be addressed. ).
L/S The L/S transfer parameter signals whether the value of the relevant
parameter is to be read or written on the HNC. If L/S is equal to zero, a
write access is executed. However, if L/S is not equal to zero, the
corresponding parameter value is read.
L/S Meaning
0 Parameter value is written
not equal to 0 Parameter value is read
Page 54
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
FUNK Meaning
RP R-parameter
MD Machine datum
CV C-variable
BV B-variable
PG Process datum
ES Set digital inputs
ER Reset digital inputs
AS Set digital outputs
AR Reset digital outputs
MS Set flags
MR Reset flags
KX x-value of a curve point
KY y-value of a curve point
Caution: When changing values of machine data, please note that in the case of
some machine data, the new value is only taken over, when a reset has
been triggered on the HNC 100.
In the case of function PG, the NR parameter must contain the number of
the process datum whose value is to be read. If, for example, the current
value of the actual position value is to be determined, the NR parameter
must contain “3” as a value ( L/S = 1, FUNK = PG ). The assignment of
the individual process data numbers is listed in the following table.
Page 55
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Number of Meaning
the process
datum
3 Actual position value Axis 1
4 Actual position value Axis 2 ( 2-axis version )
5 Actual pressure value Axis 1
6 Actual pressure value Axis 2 ( 2-axis version )
7 Position command value Axis 1
8 Position command value Axis 2 ( 2-axis version )
9 Pressure command value Axis 1
10 Pressure command value Axis 2 ( 2-axis version )
11 Peak value Minus Axis 1
12 Peak value Minus Axis 2 ( 2-axis version )
13 Peak value Plus Axis 1
14 Peak value Plus Axis 2 ( 2-axis version )
15 Actual value Encoder 1
16 Actual value Encoder 2 ( 2-axis version )
17 Actual value Encoder 3 ( 2-axis version )
18 Actual value Encoder 4
19 Actual value Encoder 5
20 Actual value Encoder 6
21 Actual value Encoder 7
22 Actual value Encoder 8
23 Actual value Encoder 9
24 Actual value Encoder 10
25 Actual value Encoder 11
26 Following error Axis 1
27 Following error Axis 2 ( 2-axis version )
28 Synchronization error ( 2-axis version )
29 Target position value Axis 1
30 Target position value Axis 2 ( 2-axis version )
31 Actual velocity value Axis 1
32 Actual velocity value Axis 2 ( 2-axis version )
33 DAC 1
34 DAC 2
35 DAC 3
36 DAC 4
37 Actual value Encoder 4 ( Volt )
38 Actual value Encoder 5 ( Volt )
39 Actual value Encoder 6 ( Volt )
40 Actual value Encoder 7 ( Volt )
41 Actual value Encoder 8 ( Volt )
42 Actual value Encoder 9 ( Volt )
43 Actual value Encoder 10 ( Volt )
44 Actual value Encoder 11 ( Volt )
ACHS The ACHS transfer parameter is only relevant for the functions RP, MD,
CV, KX and KY. In conjunction with functions RP, MD and CV, this
parameter is used to distinguish, on which axis ( = NC-program ) the
relevant parameter ( R-parameter, machine datum or C-variable ) is to be
processed. If, for example, the value of R-parameter R200, which is used
in the NC-program of axis 1, is to be read, the ACHS parameter must
have the value “1” ( L/S =1, FUNK = RP, NR = 200 ).
Page 56
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
EIN1 and EIN2 The transfer parameters EIN1 and EIN2 are used to transfer the value or
the bit pattern, which the parameter should have on the HNC. Two
transfer parameters are required, as the values of the R-parameters,
machine data, C/B-variables, process data and curve points and also the
bit pattern of the digital inputs and outputs each take 4 bytes. These
transfer parameters are only relevant, if L/S is equal to zero ( write
access ).
For the functions RP, MD, CV, BV, PG, KX and KY, “EIN1” must contain
the high-word of the value, EIN2 the low-word.
Value
Example: Value = 100000 ( decimal ) = 186A0 ( hexadecimal )
EIN1 = 0001H
EIN2 = 86A0H
For the functions ES, ER, AS ad AR, “EIN1” must contain the digital inputs
or outputs 1 to 16 of the HNC in a bit-coded form, and EIN2 the digital
inputs or outputs 17 to 32.
Page 57
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
AUS1 and AUS2 In the case of a read access ( L/S not equal to zero ) the value or the bit
pattern of a parameter is saved in the transfer parameters AUS1 and
AUS2.
Value
Format of transferred values All the values of parameters, which are to be transmitted, are transferred
in a fixed-point format with three digits after the decimal point. This means
that when reading the value of an R-parameter, which has a value of
125.35 on the HNC, the resulting value for the R-parameter in the transfer
parameters AUS1 and AUS2 is 125350. The actual value of the parameter
can be determined by dividing the value by 1000.
The same is valid for changing the value of a parameter. If, for example,
the value of an R-parameter is to be changed to 180, the value which
must be saved for the R-parameter in EIN1 and EIN2 is 180000 ( = 180 x
1000 ).
FEHL ( error ) This transfer parameter includes an error number, if an error has
occurred
during the execution of function FC 11. An overview of possible errors is
given in the description of the OK parameter.
ENDE The ENDE output bit signals whether a data exchange with the HNC 100
has been completed. This means that a user data block was sent, the
associated reply received and data included in AUS1 and AUS2 ( L/S not
equal to zero ).
Page 58
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
ENDE Meaning
0 Data exchange is going on
1 Data exchange completed
Error Meaning
number
8090 I/O address entered in the DB is incorrect
8093 Data block ( 8 bytes ) for the HNC is not consistent
80A0 Error on the HNC
80B0 HNC cannot be addressed via the Profibus
80B1 I/O address entered in the DB is incorrect
F000 Specified HNC is invalid
F001 HNC does not respond (timeout elapsed)
F002 Error on HNC ( e.g. encoder error )
F003 Invalid axis number specified
F004 Invalid I/O card specified
F005 Invalid function specified
F006 HNC not coupled to Profibus ( L2 = 0 )
F007 Invalid C-variable number
F008 Invalid B-variable number or process datum number specified
F009 Curve number not permitted
F00A Curve point number not permitted
FFAC The curve point could not be sent, because the curve is being
updated (-> nc command: KURVE ... UPDATE) or new curve
points are received over the serial interface.
FFB1 Sending of a complete curve has not been started
FFB2 x-value for the curve point is not permitted
FFB3 Curve point is not defined
FFCC Process datum is not defined
FFD1 Function is not defined ( transfer protocol )
FFD2 Invalid flag number
FFD3 Writing of a process datum is impossible
FFD4 Writing of digital inputs is impossible
FFD5 Invalid B-variable number
FFD6 Invalid axis number specified
FFD7 Invalid C-variable number
FFD8 Value of the machine datum too small
FFD9 Value of the machine datum too great
FFDA Value of the R-parameter too small
FFDB Value of the R-parameter too great
FFE4 Curve is not defined
FFFC Machine datum not defined
FFFD R-parameter not defined
SEND The SEND output bit signals that FC 11 transferred a user data block to
the HNC 100 and that the associated reply is awaited.
Page 59
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
SEND Meaning
0 Reply received
1 Reply awaited
Caution: If a data word is used for each of the transfer parameters AUS1 and
AUS2, it must be transferred with the absolute address of FC 11 ( e.g.
DB20.DBW10 ). This is required, because the data block, whose number
is included in transfer parameter DBNR, is opened in FC 11.
Summary The following table shows the possible combinations of the individual
transfer parameters in a summarized form. The parameters marked with
an “X” in this table are relevant for the execution of the individual functions
( FUNK ).
Function number FC 11
Function name KODPS711
Nesting depth 2 ( function SFC 14 and SFC15 are
called) )
Assigned data blocks Data block, whose number is written
in transfer parameter DBNR
Local data 26 bytes
Assigned timers 1) T (HNC addresses )
Average running time (S7-300) CPU 315-2 DP: 0.4 ms
1) For each HNC that is connected to the Profibus-DP a timer must be used. The number of
the timer is identical with the address of the HNC. Example: Two HNCs with the addresses 5
and 12 are connected via the Profibus-DP with the S7-300. Thus, timers T5 and T12 are
assigned.
Page 60
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
The value of the process datum is included in flag words MW21 and
MW23, when FC 11 has been completed without error ( ENDE = 1, OK =
1 ). The related S7-program is shown in the following.
// Flag M0.1 is set when a rising edge has been detected at input E0.7 and
// function FC 11 does not send (SEND = 0).
U E 0.7
UN M 0.0
UN A 0.1
S M 0.1
// The status of input E0.7 is saved in flag M0.1.
U E 0.7
M 0.0
// When flag M0.1 is set, function FC 11 is called.
U M 0.1
SPB FC11
BEA
// The address of the HNC is loaded.
FC11: L 11
T MB 10
// The direction of data is loaded (read).
L 1
T MB 11
// The function is loaded (process datum).
L 'PG'
T MW 12
// The number of the process datum is loaded.
L 3
T MW 14
// Function FC 11 is called.
CALL FC 11
DBNR:=10
HNC :=MB10
L_S :=MB11
FUNK:=MW12
NR :=MW14
ACHS:=MB16
EIN1:=MW17
EIN2:=MW19
AUS1:=MW21
AUS2:=MW23
FEHL:=MW25
ENDE:=A0.2
OK :=A0.3
SEND:=A0.1
// When the ENDE-bit of FC 11 is set, flag M0.1 is reset.
U A 0.2
R M 0.1
Page 61
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 1
FUNK = RP
NR = 200
ACHS = 1
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
L/S = 0
FUNK = RP
NR = 400
ACHS = 3
EIN1 = 0001 (decimal: 100400 = hexadecimal: 18830)
EIN2 = 8830
L/S = 1
FUNK = MD
NR = 13
ACHS = 1
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
Page 62
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 1
FUNK = CV
NR = 30
ACHS = 3
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
A new value is to be transferred for C-variable C45 that is used in the NC-
program of axis 1. The value of the C-variable is to be set to 310.5. Since
C-variable values are transferred with three digits after the decimal point,
310500 must be sent. For this, function FC 11 must be called as follows:
L/S = 0
FUNK = CV
NR = 45
ACHS = 1
EIN1 = 0004 (decimal: 310500 = hexadecimal: 4BCE4)
EIN2 = BCE4
L/S = 1
FUNK = BV
NR = 31
ACHS = optional (B-variables are axis-independent)
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
Page 63
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 0
FUNK = CV
NR = 45
ACHS = 1
EIN1 = 0006 (decimal: 450110 = hexadecimal: 6DE3E)
EIN2 = DE3E
L/S = 1
FUNK = ES (oder ER)
NR = 1 (1 = E1.1-E1.32, 2 = E2.1-E2.32)
ACHS = optional (inputs are axis-independent)
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
AUS1 AUS2
E1.8 - E1.1 E1.16 - E1.9 E1.24 - E1.17 E1.32 - E1.25
If, for example, AUS1 includes the value 0300 ( hexadecimal ), the
hardware inputs E1.1 and E1.2 are set on the HNC.
If the status of the virtual inputs is to be fetched, the value “2” must be
transferred with parameter NR when function FC 11 is called. ( The virtual
inputs are queried via E2.1 - E2.32 in the NC-program ).
EIN1 EIN2
E2.8 - E2.1 E2.16 - E2.9 E2.24 - E2.17 E2.32 - E2.25
If, for example, inputs E2.1 and E2.9 and E2.18 are to be set, the value
0101 ( hexadecimal ) = 0000 0001 0000 0001 ( binary ) must be saved in
EIN1, and 0200 ( hexadecimal ) = 0000 0010 0000 0000 ( binary ) in
EIN2. For this, function FC 11 must be called as follows:
Page 64
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 0
FUNK = ES
NR = 2
ACHS = optional (inputs are axis-independent)
EIN1 = 0101
EIN2 = 0200
EIN1 EIN2
E2.8 - E2.1 E2.16 - E2.9 E2.24 - E2.17 E2.32 - E2.25
If, for example, inputs E2.2 and E2.16 and E2.17 are to be reset, the value
0280 ( hexadecimal ) = 0000 0010 1000 0000 ( binary ) must be saved in
EIN1, and 0100 ( hexadecimal ) = 0000 0001 0000 0000 ( binary ) in
EIN2. For this, function FC 11 must be called as follows:
L/S = 0
FUNK = ER
NR = 2
ACHS = optional (inputs are axis-independent)
EIN1 = 0280
EIN2 = 0100
L/S = 1
FUNK = AS (or AR)
NR = 1 (1 = A1.1-A1.32, 2 = A2.1-A2.32)
ACHS = optional (outputs are axis-independent)
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
AUS1 AUS2
A1.8 - A1.1 A1.16 - A1.9 A1.24 - A1.17 A1.32 - A1.25
If, for example, AUS1 includes the value 0300 ( hexadecimal ), the
hardware outputs A1.1 and A1.2 are set on the HNC.
If the status of the virtual outputs is to be fetched, the value “2” must be
transferred with parameter NR when function FC 11 is called. ( The virtual
outputs are queried via A2.1 - A2.32 in the NC-program ).
Page 65
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 1
FUNK = MS (or MR)
NR = 100
ACHS = optional (flags are axis-independent)
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
The status of the flag is received in the parameters AUS1 and AUS2. If
AUS1 and AUS2 contain the value 1, the flag is set; if the value is 0, the
flag is reset.
L/S = 0
FUNK = MS
NR = 200
ACHS = optional (flags are axis-independent)
EIN1 = optional (is ignored)
EIN2 = optional (is ignored)
L/S = 0
FUNK = MR
NR = 300
ACHS = optional (flags are axis-independent)
EIN1 = optional (is ignored)
EIN2 = optional (is ignored)
Page 66
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 1
FUNK = KX (KY for y-value)
NR = 10 (Number of the curve point)
ACHS = 3 (Number of the curve)
EIN1 = optional (is ignored, because L/S = 1)
EIN2 = optional (is ignored, because L/S = 1)
L/S = 0
FUNK = KX (KY for y-value)
NR = 5 (Number of the curve point)
ACHS = 2 (Number of the curve)
EIN1 = 0003 (decimal: 210400 = hexadecimal: 335E0)
EIN2 = 35E0
Page 67
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
L/S = 0
FUNK = KX (or KY)
NR = 0 (0 = Switch off check)
ACHS = 5 (Number of the curve)
EIN1 = optional (is ignored)
EIN2 = optional (is ignored)
After this call, the individual curve points are taken over without verification
of the x-values. The individual x- and y-values of the curve points are now
transferred by several calls of function FC 11.
When the complete curve has been transferred, the received x-values of
the individual curve points must be checked. This process checks for all
curve points, whether an x-value is greater than the x-value of the
preceding curve point and smaller than the x-value of the subsequent
curve point. The x-value check can be switched on by calling function
FC 11 as follows:
L/S = 0
FUNK = KX (or KY)
NR = 4095 (4095 = Switch on check)
ACHS = 5 (Number of the curve)
EIN1 = optional (is ignored)
EIN2 = optional (is ignored)
If an error is detected during the check, error number FFB2 will be written
in parameter FEHL.
Page 68
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
If an error occurs on the HNC 100 (e.g. encoder error or traversing range
limit), the HNC 100 outputs an external diagnosis message via the
Profibus-DP. This external diagnosis message is saved in the DP master
and can be read out there. The external diagnosis message is structured
to DIN 19245, part 3
Byte Meaning
0 Station status 1
1 Station status 2
2 Station status 3
Meaning determined to
3 Master address DIN 19245 part 3
4 Ident. number ( high-byte )
5 Ident. number ( low-byte )
6 External diagnosis
- ( diagnosis with a length of
16 11 bytes from HNC 100 )
Byte 7:
Byte 8:
Page 69
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Byte 10:
Byte 12:
Byte 14:
Byte 16:
When using master assembly IM 308-C, you cannot fetch diagnosis data
directly. To this end, function block FB 192 ( IM308C ) must be used. This
function block is included in Siemens’ software package COM PROFIBUS.
How to parameterize and call FB 192 is explained in detail in the manual
of the IM 308-C master assembly.
Page 70
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
When using the S5-95U with DP master interface, you can request an
overview of diagnosis data via I/O addresses 56 and 57. You can fetch the
complete diagnosis data for a DP slave ( HNC 100 ) using the integrated
function block FB 230. How to parameterize and call FB 230 is explained
in detail in the manual of the S5-95U with DP master interface.
When using the S7-300 or S7-400 with integrated DP master, you can
request the complete diagnosis data for a DP slave ( HNC 100 ) with the
help of standard function SFC 13 “DPNRM_DG“. How to parameterize the
SFC 13 is explained in detail in the system software manual of the S7-
300/400.
Page 71
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
10. Time
The time required for fetching data from the HNC 100 to the S5 or sending
data from the S5 to the HNC 100 is composed of three components:
- Bus cycle time ( Profibus-DP )
- Processing time of the function blocks
- Time required for processing the data on the HNC 100
The time required for transferring user data from the DP master to a DP
slave is determined by the following factors:
- Transfer rate
- Number of DP slaves
- Number of transferred user data bytes ( HNC 100: 8 bytes)
18
16
14
12
10
8
1500 kBit/s
6
4
3000 kBit/s
No. of
1 5 10 20 30 DP slaves
Page 72
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
The average processing times of the function blocks depend on the CPU
( S5 ) used. The times in the following table are given as a guideline.
Remark For the data exchange between the HNC 100 and S5, FB 10 must be
called at least twice. In the first call, a telegram is compiled, which
contains in a coded form, which parameter is to be fetched from the
HNC 100 or changed. This telegram is sent to the HNC 100. In the second
call of FB 10 a check is carried out to verify whether the associated reply
has been received from the HNC 100.
10.3 Time required for processing the data on the HNC 100
The time required by the HNC 100 for processing the data depends on the
scanning time set on the HNC 100.
On the HNC 100 the controller has highest priority. This means that the
processing of data that were sent via the Profibus-DP can be interrupted.
If processing is not interrupted, reading of the actual value can take, for
example, 0.5 ms. In the case of an interruption, the time prolongs
accordingly.
Page 73
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Page 74
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Page 75
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Unit_Diag_Bit(36) = "Reserved"
Unit_Diag_Bit(37) = "Reserved"
Unit_Diag_Bit(38) = "Reserved"
Unit_Diag_Bit(39) = "Reserved"
;
Unit_Diag_Bit(40) = "Following error Axis 2"
Unit_Diag_Bit(41) = "Limit switch Axis 2"
Unit_Diag_Bit(42) = "Traversing range limit + Axis 2"
Unit_Diag_Bit(43) = "Traversing range limit - Axis 2"
Unit_Diag_Bit(44) = "Encoder error Axis 2"
Unit_Diag_Bit(45) = "Synchronization error"
Unit_Diag_Bit(46) = "Reference run error Axis 2"
Unit_Diag_Bit(47) = "Encoder jump Axis 2"
;
Unit_Diag_Bit(48) = "Reserved"
Unit_Diag_Bit(49) = "Reserved"
Unit_Diag_Bit(50) = "Reserved"
Unit_Diag_Bit(51) = "Reserved"
Unit_Diag_Bit(52) = "Reserved"
Unit_Diag_Bit(53) = "Reserved"
Unit_Diag_Bit(54) = "Reserved"
Unit_Diag_Bit(55) = "Reserved"
;
Unit_Diag_Bit(56) = "Encoder connection Encoder 1"
Unit_Diag_Bit(57) = "Encoder connection Encoder 2"
Unit_Diag_Bit(58) = "Reserved"
Unit_Diag_Bit(59) = "Encoder connection Encoder 4"
Unit_Diag_Bit(60) = "Encoder connection Encoder 5"
Unit_Diag_Bit(61) = "Encoder connection Encoder 6"
Unit_Diag_Bit(62) = "Encoder connection Encoder 7"
Unit_Diag_Bit(63) = "Reserved"
;
Unit_Diag_Bit(64) = "Reserved"
Unit_Diag_Bit(65) = "Reserved"
Unit_Diag_Bit(66) = "Reserved"
Unit_Diag_Bit(67) = "Reserved"
Unit_Diag_Bit(68) = "Reserved"
Unit_Diag_Bit(69) = "Reserved"
Unit_Diag_Bit(70) = "Reserved"
Unit_Diag_Bit(71) = "Reserved"
;
Unit_Diag_Bit(72) = "Encoder jump Encoder 1"
Unit_Diag_Bit(73) = "Encoder jump Encoder 2"
Unit_Diag_Bit(74) = "Reserved"
Unit_Diag_Bit(75) = "Reserved"
Unit_Diag_Bit(76) = "Reserved"
Unit_Diag_Bit(77) = "Reserved"
Unit_Diag_Bit(78) = "Reserved"
Unit_Diag_Bit(79) = "Reserved"
;
; S7 <- HNC: 8 byte standard
; S7 -> HNC: 8 byte standard
; In this configuration, the 4 words are consistently transferred
; together. This configuration must be selected when an S7 system is used.
Module = "S7 <- HNC: 8 byte standard" 0xD3
EndModule
Module = "S7 -> HNC: 8 byte standard" 0xE3
EndModule
; S5 <- HNC: 8 byte standard
; S5 -> HNC: 8 byte standard
; In this configuration, the 4 words are transferred consistently individually.
; This configuration must be selected when an S5 system is used.
Module = "S5 <- HNC: 8 byte standard" 0x53
EndModule
Module = "S5 -> HNC: 8 byte standard" 0x63
EndModule
; 2 byte value <- HNC
Page 76
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
Page 77
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
12. Annex
12.1 Software
The drivers ( function blocks ) and files ( GSD file and type files ) that are
required for the HNC 100’s operation with the Profibus-DP interface are
provided on a floppy disk which is included in Bosch Rexroth's scope of
supply.
Page 78
HNC100 ( series 2x ) / Profibus-DP interface ( Siemens )
© 2003
by Bosch Rexroth AG, Industrial Hydraulics, D-97813 Lohr am Main
All rights reserved. No part of this document may be reproduced or stored, processed, duplicated or circulated using electronic
systems, in any form or by any means, without the prior written authorisation of Bosch Rexroth AG. In the event of
contravention of the above provisions, the contravening party is obliged to pay compensation.
This document was prepared with the greatest of care, and all statements have been examined for correctness. This
document is subject to alterations for reason of the continuing further developments of products. No liability can be accepted
for any incorrect or incomplete statements.
Page 79
Bosch Rexroth AG
Industrial Hydraulics
Zum Eisengießer 1
97816 Lohr, Germany
[email protected]
www.boschrexroth.com/hnc100
Printed in Germany
RE 30 131-P-03/02.03