Can Software - TMP
Can Software - TMP
PROFIBUS-DP / CAN-Gateway
Software Manual
to Product: C.2905.02
The information in this document has been carefully checked and is believed to be entirely reliable. esd
makes no warranty of any kind with regard to the material in this document, and assumes no
responsibility for any errors that may appear in this document. esd reserves the right to make changes
without notice to this, or any of its products, to improve reliability, performance or design.
esd assumes no responsibility for the use of any circuitry other than circuitry which is part of a product
of esd gmbh.
esd does not convey to the purchaser of the product described herein any license under the patent rights
of esd gmbh nor the rights of others.
USA / Canada:
esd electronics Inc.
525 Bernardston Road
Suite 1
Greenfield, MA 01301
USA
Phone: +1-800-732-8006
Fax: +1-800-732-8093
E-mail: [email protected]
Internet: www.esd-electronics.us
The changes in the user’s manual listed below affect changes in the firmware as well as changes in the
description of the facts only.
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Introduction into Functionality of the Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Configuration via PROFIBUS-DP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 More addressable Identifiers via Page Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4. GSD File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6. Page Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.1 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.2 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
1. Overview
1.1 About this Manual
This manual describes the local firmware of the CAN-DP module. The local firmware controls the data
exchange between PROFIBUS-DP (abbreviated to PROFIBUS below) and CAN.
Layer 2 Implementation
The manual describes the Layer 2 implementation and the implemented CANopen functions.
Page Mode
Furthermore, the manual describes the Page Mode which was developed to allow more than 48 CAN
identifiers to be controlled by one gateway. For a general understanding fundamental functions of the
Page Mode will be described first, followed by descriptions of the function blocks (FBs) and data
blocks (DBs), which are used to realize the Page Mode.
Note: Page Mode can only be used, if the Siemens SIMATIC Manager for S7 is used as
configuration-tool!
Profibus CAN
Slave
Direction Byte-no. Identifier
Address
0 Tx-Id_a
1 Tx-Id_a
2 Tx-Id_a
3 Tx-Id_a
4 Tx-Id_a
output
5 Tx-Id_a
n Tx-Id_k
xyz n+1 Tx-Id_k
(coding
Profibus switch)
CAN
0 Rx-Id_b
1 Rx-Id_b
2 Rx-Id_b
3 Rx-Id_b
input
m Rx-Id_l
m+1 Rx-Id_l
The address range which can be set is hexadecimal 03h to 7Ch or decimal 3 to 124. If an address is set
which is smaller than 3 (decimal) or smaller than 03h, address 3 is valid. If an address is set which is
larger than 7Ch or larger than 124 (decimal), address 124 is valid.
The upper coding switch ( HIGH) is used to set the MSBs, while the LSBs are set by means of the lower
coding switch (LOW).
The PROFIBUS-slave address can only be set via coding switches. It cannot be programmed by means
of a class 2 master via the command ‘Set_Slave_Address’.
One to eight bytes (16 bytes when using the communication window, see page 36) each are assigned
to a Tx-or Rx-identifier. The same identifier cannot be used as Tx-and Rx-identifier.
Optionally the bytes, assigned to a Tx-Identifier, can be transmitted cyclically.
2.4 Diagnosis
The status of the LED displays and the DP-slave diagnosis can be used for diagnosis. The module
supports five module-specific diagnostic bytes. The diagnosis will be described in more detail on
page 13.
Because of the additional protocol expenditure the handling of the Page Mode is slightly more
complicated than the standard operation of the gateway. The data exchange between PROFIBUS and
CAN requires two cycles instead of one PLC cycle.
3.2 Implementation
3.2.1 Strategy
1 Install and wire the CAN-DP module (power supply, CAN bus, see hardware manual).
2 Set the PROFIBUS address of the module by means of the coding switch.
Connect the PROFIBUS connector to the PROFIBUS interface of the CAN-DP
3
module.
4 Configure the settings of the CAN-DP module in the PLC via the SIMATIC manager
Switch on the power supply for the CAN-DP.
Note: Take into account that in particular the CAN bit rate and the module ID (CANopen) must
be set via the PROFIBUS.
3.2.2 Start-Up
After switching on the power supply, the CAN-DP module starts automatically. It does not have its own
mains switch.
During start-up LEDs “P” (PROFIBUS LED) and “D” (data exchange LED) flash. The PROFIBUS
address set via the coding switches is read in.
The module receives projection data from the DP master and evaluates the specifications in them. If the
projection complies with the structure, the CAN-DP module starts the data transfer.
If the module is configured, the data transfer starts automatically after start-up: If the PLC master
changes transmission data of an identifier, the data is transmitted from the CAN-DP module to the CAN
bus. When the CAN-DP module receives data, it provides these to the PLC master.
The configuration is described in chapter 5 ‘Configuration via the SIMATIC-Manager’ from page 23.
Fig. 3.3.1:
Position of the LEDs
The assignment of these diagnostic bytes has been predefined in norm DIN EN 19425, part 3. Below,
the status messages will be described in consideration of the CAN-DP module.
Station status 1 contains error messages of the DP slave. If a bit is ‘0’, no error applies. A bit set to ‘1’
signalizes an error.
Station status 2 contains status messages to the DP slave. If a bit is ‘1’, the according message is active.
A bit set to ‘0’ signalizes an inactive message.
The PROFIBUS address of the master which was the last to set the DP slave and has got reading and
writing access to the DP slave is stored in this byte.
The manufacturer identification has been coded into two bytes. For the CAN-DP module the
designation 04A4h is returned.
The CAN-DP module supports diagnostic bytes 6 to 10 for module-specific diagnosis messages.
Diagnostic
Meaning
bytes
0...5 defined in the PROFIBUS specification (see previous chapter)
length specification for module-specific diagnosis information
6
(here always 5)
header byte: bits 0...5 contain the block length including header
7
(here always 4)
- DP service (SAP) which led to error (bByte 8 = 3Dh, 3Eh),
or
- bus state, if the flag CAN-Diagnosis = “yes” in parameterization:
values of byte 8:
8
00h OK
40h WARN
80h ERROR_PASSIVE
C0h BUS_OFF
depending on status of byte 8:
byte 8 = 3Dh setting (SAP61) faulty, byte 9 contains the number of the faulty
setting byte
byte 8 = 3Eh configuration (SAP62) faulty, byte 9 contains the number of the
faulty PROFIBUS module (= address of the simulated PLC
module)
9
byte 8 = 00h, 40h, 80h or C0h (bus state)
byte 9 contains the IRQ_LOST_Counter of the built-in CAN
driver of the CAN-DP
The IRQ_LOST_Counter counts the lost messages of the CAN
controller.
This counter is set by an error output of the CAN controller. It
shows the number of lost CAN frames (receive or transmit
messages).
Diagnostic
Meaning
bytes
depending on status of byte 8:
byte 8 = 3Dh setting (SAP61) faulty, byte 10 shows the correct values
4. GSD File
Below, the GSD file (Device Master Data) of the CAN-DP module has been printed. The specification
printed here are for orientation. Decisive is the data contained in the GSD file CDPS04A4.GSD,
included in the product package.
;======================================================================================================
; (c) esd electronic system design GmbH Hannover
;
; PROFIBUS-DP Geraetestammdatei
; Version: 1.20
;
; Autor: Olaf Kruse
; Erstellungsdatum: V1.0 30.04.1999 ok
; Aenderungen: V1.01 03.08.1999 ok baudrate 6 MBaud, MaxTsdr-times
; V1.02 11.08.1999 ok baudrate 12 Mbaud, Min_Slave_Intervall,
; Max_Module, Max_Input_Len, Max_Output_Len, Max_Data_len
; V1.03 30.09.1999 ok Min_Slave_Intervall = 20 (2msec)
; V1.04 02.11.1999 ok MaxTsdr_45.45 = 60, MaxTsdr_1.5M = 150
; V1.05 20.12.1999 ok user-parameter-data:
; byte 13 = wakeup-time ( 0: off; 0xff: not relevant )
; byte 14,15 = sync-time ( 0: off; 0xffff: not relevant )
; V1.06 10.04.2000 uh menu structure for parameter
; V1.07 26.02.2001 uh Min_Slave_Intervall back to 4 msec
; V1.10 22.10.2003 uh Changed for new CAN-DP
; V1.20 02.03.2009 uh Diagnosis and Data counter added
;======================================================================================================
; Art des Parameters
; (M) Mandatory (zwingend notwendig)
; (O) Optional (zusätzlich möglich)
; (D) Optional mit Default=0 falls nicht vorhanden
; (G) mindestens einer aus der Gruppe passend zur entsprechenden Baudrate
#PROFIBUS_DP
;--- Kapitel 2.3.2 Allgemeine DP-Schluesselwoerter ---
GSD_Revision =1 ; (M ab GSD_Revision 1) (Unsigned8)
Vendor_Name = "esd" ; (M) Herstellername (Visible-String 32)
Model_Name = "CAN-DP" ; (M) Herstellerbezeichnung des DP-Geraetes (Visible-String 32)
Revision = "V1.0" ; (M) Ausgabestand des DP-Geraetes (Visible-String 32)
Revision_Number =1 ; (M ab GSD_Revision 1) (Unsigned8 (1 bis 63)) (1234)
Ident_Number = 1188 ; (M) Gerätetyp des DP-Gerätes (Unsigned16)
Protocol_Ident =0 ; (M) Protokollkennung des DP-Geraetes 0: Profibus-DP (Unsigned8)
Station_Type =0 ; (M) DP-Geraetetyp 0: DP-Slave (Unsigned8)
FMS_supp =0 ; (D) kein FMS/DP-Mischgeraet (Boolean)
Hardware_Release = "V1.0" ; (M) Hardware Ausgabestand des DP-Geraetes (Visible-String 32)
Software_Release = "V1.20" ; (M) Software Ausgabestand des DP-Geraetes (Visible-String 32)
9.6_supp =1 ; (G) 9,6 kBaud wird unterstuetzt
19.2_supp =1 ; (G) 19,2 kBaud wird unterstuetzt
;31.25_supp =1 ; fuer Gateway CAN-CBM-DP nicht moeglich (1234)
45.45_supp =1 ; (G ab GSD_Revision 2) 45,45 kBaud wird unterstuetzt
93.75_supp =1 ; (G) 93,75 kBaud wird unterstuetzt
187.5_supp =1 ; (G) 187,5 kBaud wird unterstuetzt
500_supp =1 ; (G) 500 kBaud wird unterstuetzt
1.5M_supp =1 ; (G) 1,5 MBaud wird unterstuetzt
3M_supp =1 ; (G ab GSD_Revision 1) 3 MBaud wird unterstuetzt
6M_supp =1 ; (G ab GSD_Revision 1) 6 MBaud wird unterstuetzt
12M_supp =1 ; (G ab GSD_Revision 1) 12 MBaud wird unterstuetzt
MaxTsdr_9.6 = 60 ; (G)
MaxTsdr_19.2 = 60 ; (G)
;MaxTsdr_31.25 = 15 ; fuer Gateway CAN-CBM-DP nicht moeglich (1234)
MaxTsdr_45.45 = 60 ; (G ab GSD_Revision 2)
MaxTsdr_93.75 = 60 ; (G)
MaxTsdr_187.5 = 60 ; (G)
MaxTsdr_500 = 100 ; (G)
MaxTsdr_1.5M = 150 ; (G)
MaxTsdr_3M = 250 ; (G ab GSD_Revision 1)
MaxTsdr_6M = 450 ; (G ab GSD_Revision 1)
MaxTsdr_12M = 800 ; (G ab GSD_Revision 1)
Redundancy =0 ; (D) keine redundante Uebertragungstechnik
Repeater_Ctrl_Sig =0 ; (D) RTS-Signalpegel (CNTR-P) Pin 4 des 9pol. SUB-D
; 0: nicht vorhanden 1: RS 485 2: TTL
24V_Pins =0 ; (D) Bedeutung der 24V Pins des 9pol. SUB-D (Pin 7 24V; Pin 2 GND)
; 0: nicht angeschlossen 1: Input 2: Output
; Implementation_Type = "Visible-String" ; (1234)
Bitmap_Device = "CDPS00_N" ; (O ab GSD_Revision 1)
Bitmap_Diag = "CDPS00_D" ; (O ab GSD_Revision 1)
Bitmap_SF = "CDPS00_S" ; (O ab GSD_Revision 1)
Note: Without correct configuration via the SIMATIC manager the CAN-DP module and the
CAN participants connected do not operate together and operation of the CAN
participants connected can be disturbed.
In particular the CAN-Bitrate configured in the CAN-DP-module and the module-ID (at
CANopen) must match the settings of the CAN participants connected!
If problems should occur, further information can be obtained with the diagnosis as
described in the chapters “4.3 Diagnosis via LED Display” and “4.4 Slave Diagnosis”.
1. Select CAN-DP
Select menu Hardware Catalogue and there Additional Field Devices and Other. There select GSD
CAN-DP.
3. Parameter Telegram (set CAN bit rate, general configuration and CANopen module ID)
Configure the configuration settings by means of the parameter telegram as described in chapter
5.1.2 on page 25.
A window opens in which you have to specify the PROFIBUS station address.
Attention!: The hexadecimal address set at the coding switches has to be converted into a
decimal value and entered here!
In the configuration window the module ‘DP slave’ is now automatically added. If you desire another
CAN bit rate than the standard setting of 125 Kbit/s, you can change it by means of the parameter
telegram.
The module-specific bytes of the parameter telegram can be changed in the Properties window which
opens, if the header of the DP-slave window is double clicked (here line ‘(23) DP-Slave’).
Note: By means of selection point Hex-Parameter the parameters can be specified by means
of entering hexadecimal values, as in older software versions. More comfortable,
however, is of course the specification in the format shown above. Here, the parameters
can be configured ‘directly’. Therefore, in the following descriptions the configuration
by means of hexadecimal values will not be considered.
CAN-Bit rate: For the bit rate the following selections can be made:
Start-Frame: After wake-up time has expired, a start frame is transmitted, if the
(AS) gateway is a master (autostart).
CW NR CS CM AS PM Meaning
- after wake-up time the module automatically transmits 128 dec
+ Module-No. and is in ‘Pre-Operational’ status
x no yes no x no - after a start frame has been received: put out TxId, transmit
RTR-frames on RxId
- after wake-up time start frame, put out TxId, transmit RTR-
x no no yes yes no frames on RxId
x yes no yes yes no - after wake-up time start frame, put out TxId
CAN-Diagnosis: If this flag is set to "yes", in case of an error on the CAN bus diagnosis messages
are sent (see page. 18).
RX-Counter=yes: In the last byte of the input module an 8-bit counter is counted up for each
received CAN message on this identifier. In addition the length for each
configured CAN message must be increased by one.
If for example a message with 8-byte data length shall be received, in the input
window Properties DP- Slave the entry must be length = 9.
Hereby the receipt of each message, even if the data did not change, can be
monitored.
Tx-Counter=yes: In the last byte of the output module a byte is reserved, in which e.g. a counter
can be counted up. With each change of this byte the CAN message is sent, even
if the data were not changed. Also here the length of the CAN message
configured must be increased by one.
If for example a message with 8-byte data length shall be sent, in the input
window Properties DP- Slave the entry must be length = 9.
The counter byte will not be sent.
The WakeUp Time specified here, overwrites the value of WakeUp Time stored
previously in the CAN-DP gateway, if another value than ‘255’ was specified.
If ‘255’ is specified, the value stored in the gateway will be used.
If parameter WakeUp Time is set to ‘0’, the module does not wait, but start the
transmission of data as soon as they are available.
Value range
Parameter Explanations
[dec] in [s]
SYNC Time: The CAN-DP module can cyclically transmit the command SYNC for simple
CANopen applications.
Value range
Parameter Explanations
[dec] in [ms]
Attention:
SYNC Time can be set in two different ways:
1. As described above.
2. Via bytes 4 and 5 of the Communication Window (refer to page 42).
Both specifications are equal. That means that the last specification is
valid!
In order to configure the slots the slot entry has to be double clicked. A properties window opens in
which the simulated PLC slots are configured. Below, two examples with 11-bit identifiers are shown:
Fig. 5.1.4: Example: Configuration of input Fig. 5.1.5: Example: Configuration of output
data data
Attention:
In order to guarantee that the module works perfectly, at least one output (any unit) has to be
configured always. The PROFIBUS controller SPC3 does not trigger an interrupt, if no output is
defined! If no CAN is to be assigned when an output is defined, it is permissible to specify the value
07F8h as an identifier, here.
The individual parameters of the properties window will be explained in detail in the following chapter.
Now you have to save the settings via menu points Station/Save to hard disc. Afterwards the settings
are transmitted to the PLC by means of menu points Target System/Load in Unit.
Length, Unit By means of these fields the number of data bytes is specified.
Attention!:
If RX-Counter=yes, the configured length for each received
CAN message must be increased by one .
(If for example a message with 8-byte data length shall be
received, in the input window Properties DP- Slave the entry
must be length = 9.)
Consistent over The entry in this field shows whether the data is to be transmitted as individual
unit (bytes, words, etc.) or as complete packet (1-8 bytes or 16 bytes in
Communication Window) during a PLC cycle. This function is only to be set to
‘whole length’ if required, because the transmission as ‘unit’ is faster.
Note: If the data is to be transmitted consistently over the entire length, you
have to specify this here and you have to use SFC14 and SFC15 (refer
to Step7-PLC Manual).
Comment In the first two (four) bytes of this field the CAN identifier and then the control
byte form, each divided by commas, are transmitted.
For outputs the format byte can be optionally followed by 2 bytes cycle for the
cyclic transmission of the CAN telegram defined in this slot. The two cycle bytes
give the cycle time in milliseconds.
The data format for all properties is hexadecimal (!).
The entries of the Comment field are described in detail in the following chapters.
The CAN identifier is transferred in the first two (four) bytes of the Comment field.
The bytes have to be entered separated by commas.
Example: The 11-bit identifier 0309h shall be entered in the comment field.
The two bytes of the 11-bit identifier have to be entered into the comment field
as: 03,09,
(format byte: -
(CAN identifier: 0309h) no cyclic transmission
B8h)
Note: A 29-bit identifier requires four bytes and bit 29 must be set to ‘1’ (counted 0...31 bits),
in order to enable the module to distinguish between 11-bit and 29-bit identifiers.
The value range for the entry of the four bytes of a 29-bit identifier lies between 20,00,00,00 and
3F,FF,FF,FF.
Example: The 29-bit identifier 123456h shall be entered in the comment field.
Please note that bit 29 has to be set to ‘1’ for 29-bit identifiers!
The four bytes of the 29-bit identifier have to be entered into the comment field as:
20,12,34,56
(format byte: -
(CAN identifier: 123456h) no cyclic transmission
B8h)
If ‘input’ has been selected in the I/O-Type field, the CAN identifier entered there is regarded as an Rx-
identifier by the PLC. If ‘output’ has been selected in the I/O-Type, the CAN identifier entered here is
a Tx-identifier.
If the same Rx-identifier has for example inadmissibly been selected on PLC-
address 50 and address 51, no new Rx-data would be received on address 50 after
the Rx-identifier has been assigned. The data received last remained unchanged.
This Rx-identifier rule is also valid for the Rx-identifier activated via the Communication Window.
The control byte form is transferred in the Comment field behind the first two (four, for 29-bit
identifier) bytes for the CAN identifier.
form is used to convert the user data from Motorola format (high byte first) into Intel format (low byte
first).
Background: Messages which are longer than 1 byte are normally transmitted on a CANopen network
in Intel notation, while the Siemens PLC operates in Motorola format.
Starting with bit 7 of the format byte you can decide whether the following byte is to be converted as
well, i.e. swapped, or not. If a ‘1’ is specified for a byte, the following bytes are converted until the next
‘0’ transmitted. The functionality can be explained best by means of an example.
Example: A CAN telegram has got a date in Intel format in the first byte, followed by 2 bytes which
are not to be swapped and a long word in the last 4 bytes which is in Intel format again.
Binary the following representation results for the format byte:
Bit No. 7 6 5 4 3 2 1 0
Bit of
1 0 0 0 1 1 1 0
form
hexa-
8 E
decimal
begin end un- un- begin end
action swap swap changed changed swap
swap swap
swap
Data
1 2 3 4 5 6 7 8
bytes
2 bytes 4 bytes
CAN-frame byte 3 byte 4
Intel format Intel format
2 bytes 4 bytes
PLC data byte 3 byte 4
Motorola format Motorola format
From this the format byte results in 8Eh. If all eight bytes are to be swapped, for instance,
value FEh is specified for the format byte.
The lowest bit is generally without significance, because the telegram and therefore the
formatting have been completed. The bit should always be set to 0.
Note: The parameter ‘form’ must always be set, even if no byte swapping is
necessary. In this case the parameter has to be set to ‘00’.
For outputs the format byte in the Comment field can be optionally followed by 2 bytes, which trigger
the CAN-DP to cyclically transmit the CAN telegram defined in this slot every cycle milliseconds. The
cyclic transmission is then carried out independent of changes in the telegram.
The entry of the two bytes cycle for the cycle time must be placed in the Comment field behind the two
(four, for 29-bit identifiers) bytes of the CAN identifier and the following command byte form
If the cyclic transmission shall not be used, the two cycle bytes can be left out.
The first of the two bytes for cyclical transmission is the higher order byte.
The data format in the Comment field is hexadecimal (!).
For the cycle time cycle the values 03h and E8h have to be entered in the Comment field as
byte 4 and 5 (or byte 6 and 7 for 29-bit identifier respectively).
(format byte: -
(CAN identifier: 0309h) (cycle time: 03E8h)
B8h)
(format byte: -
(CAN identifier: 123456h) (cycle time: 03E8h)
B8h)
5.3.1 Introduction
If the connected CANopen modules are addressed as described in chapter ‘5.1 Course of
Configuration’, each CAN identifier needs its own PLC address. The Communication Window has the
advantage that individual PLC addresses for different Tx-identifiers and different Rx-identifiers can be
used. This is possible, because the identifiers of the CANopen modules are transmitted as parameters
together with the data at each access.
The disadvantage of the Communication Window is the lower data flow, though. Therefore it is
recommendable to use the Communication Window for non-time-critical accesses such as writing the
SDOs after starting up the device.
The Communication Window is configured via PROFIBUS. An entry for each the transmission and
reception of data via the Communication Window is required. More than these two properties are
not accepted by the firmware.
The following two pictures show the required properties. Apart from the PLC address and the
specifications for the SYNC Time in the comment bytes 4 and 5, all parameters have been
specified. Even the identifier cannot be selected freely! Consistently the whole length has always to be
specified! A shared PLC address or different PLC addresses are permissible for input and output
direction.
Fig. 5.3.1: Configuring the input path of the Fig. 5.3.2: Configuring the output path of the
Communication Window Communication Window
The 16 bytes of the Communication Window are assigned differently, according to data direction.
Bytes of
Communication Contents
Window
0 high byte of CAN identifier (identifier bits [15] 10...8)
1 low byte of CAN identifier (identifier bits 7...0)
with 11-bit CAN identifier byte 2 and 3 always ‘0’
2 with 29-bit CAN identifier byte 2: identifier bits 28...24
3 byte 3: identifier bits 23...16
4 data byte 0
5 data byte 1
6 data byte 2
7 data byte 3
8 data byte 4
9 data byte 5
10 data byte 6
11 data byte 7
12 data length for transmission jobs (Tx)
PLC loop counter (has to be incremented in pulse with OB1 in order to tell
13
the gateway the OB1 cycle)
14 sub command (always set to ‘0’)
15 command (description refer page 40)
Bytes of the
Communication Contents
Window
as long as no receive data are available ‘EEEE’h, otherwise
0 high byte of CAN identifier (identifier bits [15] 10...8)
1 low byte of CAN identifier (identifier bits 7...0)
with 11-bit CAN identifier byte 2 and 3 always ‘0’
2 with 29-bit CAN identifier byte 2: identifier bits 28...24
3 byte 3: identifier bits 23...16
4 data byte 0
5 data byte 1
6 data byte 2
7 data byte 3
8 data byte 4
9 data byte 5
10 data byte 6
11 data byte 7
12 number of received data bytes
return of the PLC loop counter which has been transmitted to the gateway
13
via the last PROFIBUS telegram
14 return of the sub command
15 error code of the read function (not supported at the moment)
Command Function
1 transmit data
3 receive data at enabled Rx-identifiers
4 enable Rx-identifier for data reception
5 deactivate reception (command 4)
6 transmits an RTR frame
7 executes command 4 and command 6
(11) (reserved)
If the gateway is configured as CANopen master:
20 Cyclical transmission of the CANopen SYNC command
(ID 80h, len = 0)
Attention:
A command is only completely processed, if, when reading the Communication Window, byte 13
of the CAN-DP-module provides the value of the PLC-loop counter which was specified during
the command call.
Before the following command is called, it is therefore advisable to check byte 13 first!
The module has got a FIFO-memory for 255 CAN-frames to buffer the received Rx-data.
If several Rx-frames are to be received on one Rx-identifier, or if frames of various Rx-
identifiers enabled for reception are received, the data is not lost, as long as the PLC reads
out the FIFO memory quicker than it is being filled.
The CAN-DP module can cyclically transmit the command SYNC for simple CANopen
applications.
The command is transmitted as shown in the table above. The cycle is specified e.g in the
properties window in bytes 4 and 5 when the Communication Window is configured (refer
to page 37).
Attention:
In order to guarantee that all CANopen users have received their new data when they
receive the SYNC command, the cyclical transmission command of the SYNC command
cannot interrupt transmission of a DP-telegram on the CAN. That means that the SYNC
command is delayed until the DP-telegram has been transmitted, if its transmission and
the transmission of a SYNC command coincide.
This can result in slight changes of time in the cyclical transmission of the SYNC
command.
Attention:
SYNC Time can be set in two different ways:
1. In the parameter telegram in the DP-properties window (refer to page 25)
2. Via byte 4 and 5 of the Communication window (refer to page 37)
These specifications are equal. That means that the last specification is valid!
1.1 Activating the Communication Window during the configuration of the CAN-DP-gateway (see
page 26)
Communication Window: yes
1.2 Definition of the 16 input and output bytes of the Communication Window (see page 37) e.g.
Data direction: input Data direction: output
PLC-address: e.g. here: 30 PLC-address: e.g. here: 30
Length: 16 (always) Length: 16 (always)
Unit: byte Unit: byte
Consistent over: entire length! Consistent over: entire length!
Identifier: FFEF hexadecimal (always) Identifier: FFEF hexadecimal (always)
Form byte: 00 hexadecimal Form byte: 00 hexadecimal
Byte of
Example here
Communication Contents
[hex]
Window
high byte of CAN-identifier (identifier bit [15] 10...8) 00
1
low byte of CAN-identifier (identifier bit 7...0) 12
2 00
bytes 2 and 3 always ‘0’ for 11-bit identifier
3 00
4 data byte 0 00
5 data byte 1 01
6 data byte 2 02
7 data byte 3 03
8 data byte 4 04
9 data byte 5 05
10 data byte 6 06
11 data byte 7 07
12 data length for transmission commands 08
13 PLC-loop counter 8-bit counter
14 sub-command (always set to ‘0’) 00
15 command ‘transmit data’ 01
The data bytes 00, 01, 02, 03, 04, 05, 07 are transmitted on Tx-identifier 0012h.
In order to acknowledge the execution of the command a read access to byte 13 of the
Communication Window should follow. It has to have the same value of the PLC-loop counter as
when the command was called.
2. Receiving Data
Byte of
Example here
Communication Contents
[hex]
Window
high byte of CAN-identifier (identifier bit [15] 10...8) 01
1
low byte of CAN-identifier (identifier bit 7...0) 23
2 00
bytes 2 and 3 always ‘0’ for 11-bit identifier
3 00
4 data byte 0 00
5 data byte 1 00
6 data byte 2 00
7 data byte 3 00
8 data byte 4 00
9 data byte 5 00
10 data byte 6 00
11 data byte 7 00
12 data length for transmission command (Tx) 00
13 PLC-loop counter 8-bit counter
14 sub-command (always set to ‘0’) 00
15 command ‘Enable Rx-Identifier’ 04
In order to acknowledge the execution of the command a read access of byte 13 of the
Communication Window should be made with every command call. It has to have the same value
of the PLC-loop counter as it had when the command was called.
Byte of
Example here
Communication Contents
[hex]
Window
high byte of CAN-identifier (identifier bit [15] 10...8) 01
1
low byte of CAN-identifier (identifier bit 7...0) 23
2 00
bytes 2 and 3 always ‘0’ for 11-bit identifier
3 00
4 data byte 0 00
5 data byte 1 00
6 data byte 2 00
7 data byte 3 00
8 data byte 4 00
9 data byte 5 00
10 data byte 6 00
11 data byte 7 00
12 data length for transmission commands (Tx) 00
13 PLC-loop counter 8-bit counter + n
14 sub-command (always set to ‘0’) 00
15 command ‘Read Rx-Identifier’ 03
After an undetermined time the Rx-data is received and can be accessed by reading the
Communication Window. Since the data is received asynchronously to the PLC-cycles the
Communication Window has to be read again and again until the data was received (polling). By
comparing the values of the PLC-loop counter you can determine, whether the data received is the
correct data from the read command.
Byte of
Example here
Communication Contents
[hex]
Window
high byte of CAN-identifier (identifier bit [15] 10...8) 01
1
low byte of CAN-identifier (identifier bit 7...0) 23
2 bytes 2 and 3 always ‘0’ for 11-bit identifier 00
3 00
4 received data byte 0 AA
5 received data byte 1 BB
6 received data byte 2 CC
7 received data byte 3 DD
8 received data byte 4 EE
9 received data byte 5 FF
10 received data byte 6 00
11 received data byte 7 11
12 data length 08
13 PLC-loop counter 8-bit counter + n
14 returned sub-command (without significance) 00
15 error code of the read function (without significance) 00
Byte of
Example here
Communication Contents
[hex]
Window
high byte of CAN-identifier (identifier bit [15] 10...8) 01
1
low byte of CAN-identifier (identifier bit 7...0) 23
2 00
bytes 2 and 3 always ‘0’ for 11-bit identifiers
3 00
4 data byte 0 00
5 data byte 1 00
6 data byte 2 00
7 data byte 3 00
8 data byte 4 00
9 data byte 5 00
10 data byte 6 00
11 data byte 7 00
12 data length for transmission commands (Tx) 00
13 PLC-loop counter 8-bit counter + m
14 sub-command (always set to ‘0’) 00
15 command ‘Disable Rx-Identifier’ 05
6. Page Mode
Note: Page Mode can only be used, if the configuration tool Siemens SIMATIC Manager for S7
is used!
6.1 Properties
The Page Mode offers the chance to address more CAN identifiers than can be stored in a PROFIBUS
telegram (that means more than 48). The number of possible identifiers is only limited by the free
memory available on the PLC and the CAN gateway.
By means of the Communication Window, too, more than 48 identifiers can be transmitted. You can
only transmit one CAN frame each per PLC cycle, however, via the Communication Window, therefore
it is generally more suitable for infrequent accesses, such as one-time configurations.
Because of the additional protocol expenditure the handling of the Page Mode is slightly more
complicated than the standard operation of the gateway. The data exchange between PROFIBUS and
CAN requires two cycles instead of one PLC cycle, because of the required handshake.
In order to simplify the handling of the Page Mode, function blocks and data blocks which control the
Page Mode are contained in the package.
6.2 Activation
Before you activate the Page Mode you have to integrate the according functional and data blocks into
your PLC program. Please read the following chapters carefully to get an insight into the mode of
operation and be able to use the contained functional and data blocks according to your demands.
The Page Mode is activated via the SIMATIC manager (SIEMENS PLC, S7).
The Communication Window is set up and handled like in normal operation (see page 36). The
Communication Window must be defined in the last segment, however.
Note: Using the Communication Windows (CW) is only useful to configure the connected
CAN-devices. If the connected CAN-devices have been configured, the normal page
mode (PM) is to be preferred.
6.4.1 Overview
In order to provide more CAN identifiers than can be stored in a PROFIBUS telegram, a protocol-
controlled data exchange between PLC and gateway is necessary.
For the communication so-called pages are defined in which the parameters and data are exchanged.
On PLC side an input and an output area are reserved for the transmission of the pages.
After the system has been started a page with setup data is exchanged between PLC and gateway. In the
following pages the PLC transmits the configuration of the Tx- and Rx-identifiers. These pages contain
the identifier numbers used for the CAN, the number of bytes and information about the data format.
PROFIBUS-DP
Page 0: Setup
CAN
PLC
From Page 151: RxId-Configuration
Gateway
Program Loop
If the setup has been completed, data can be exchanged. With each PLC cycle an input and an output
page is transmitted. If more identifiers have to be provided than can be stored in a page, the following
identifiers will be handled in the following PLC cycles. With rising number of identifiers and depending
on the length of data to be transmitted per identifier, more PLC cycles are required, therefore, to
transmit all data. In order to keep the number of PLC cycles low, input and output page should be
selected as large as possible.
The product package contains function blocks (FB) and data blocks (DB) with which the
transmission of the pages can be controlled. Users do not have to program the control of the
pages themselves, therefore !
The Page Mode needs input and output addresses. The number of addresses used is limited to the top
only by the PLC. The inputs need at least a page size of 32 bytes so that the setup can be made via page
0 and page 1.
In example 1 a data length of 32 bytes for each segment and the consistency for the entire 32 bytes have
been set. The data length has not been chosen larger, because the S7-300 cannot transmit more than 32
bytes consistently. This, however, is absolutely necessary for the Page Mode.
Generally a segment is to be specified with 32 bytes. Given that at least 32 bytes have already been
specified for the input data, it is also permissible to use any length between 0 and 32 bytes for the last
segment. The length of the input data might differ from the length of the output date. It is absolutely
necessary, however, that the input addresses of successive slots are sequentially, and that the output
addresses of successive slots are sequentially.
Example 2:
For the output page 32 bytes have been specified at slot 0 from address 128. Slot 1 has also 32 bytes
and therefore covers addresses 160...191. Slot 2 has only 18 bytes and covers addresses 192...209. A
maximum size of 82 bytes results for the output page.
The following figure shoes the page in the address range of the PLC. For the application example the
assignment with the Tx-configuration page (page 51) has been specified. With a size of 82 bytes 11 Tx-
identifiers could be configured on one page. In the last four bytes the end identifier is specified. If more
Tx-identifiers are required, Tx-pages 52, 53, etc. are transmitted afterwards.
Byte: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Slot 0
Example: Page 51 Page no. Protocol Data Parameter of Tx-Id 1 Parameter of Tx-Id 2 Parameter of Tx-Id 3 Parameter of Tx-Id 4
(Tx-Configuration)
Byte: 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
Slot 1
Example: Page 51 Page no. Parameter of Tx-Id 5 Parameter of Tx-Id 6 Parameter of Tx-Id 7 Parameter of Tx-Id 8 Parameter of Tx-Id 9
(Tx-Configuration)
Byte: 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
Slot 2
Example: Page 51 Page no. Parameter of Tx-Id 10 Parameter of Tx-Id 11 endconfig
(Tx-Configuration)
The following table summarizes the rules for the assignment of addresses in PLC Page Mode:
The maximum length of the page depends on the configuration of addresses, made by the user (see page
50).
On all pages the first eight bytes contain information which is required for the protocol-controlled
exchange of pages between PLC and gateway. They are followed by the ‘user data’ of the page. During
configuration this data contains, e.g., the definition of identifiers, during operation the data of the
identifiers.
Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...
Length
2 6 depending on page no. ...
[bytes]
user data
Content page no. protocol data ...
The first two bytes of each segment of a page specify the page number. The page number marks the
page to be transmitted and the type of page. The following table shows the page numbers, page types
and the functional and data blocks which are available.
The contents of bytes 3 to 7, the ‘protocol data’ will not be referred to. Please use the function block
(FB2) contained in the product package to control the transmission of pages. It contains the commands
required for the protocol control.
After the system has been started, the gateway has to transmit the length of the previously configured
page to the PLC. This is made by means of the so-called page 1.
For this the PLC has to transmit page 0 to the gateway first. The gateway then returns the setup data in
page 1.
The product package contains a function block which is responsible for the transmission and reception
of pages 0 and 1 (FB2). We recommend that you use this function block. If you use function block FB2,
you do not have to configure further parameters.
The setup requires some time. Therefore it is recommendable to delay the transmission of the next page
for about 5 sec. It is, for example, possible to program a PLC timer which considers the delay.
The Tx-identifiers are configured via pages 51 to 150 (decimal). The page structure is as follows:
Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
Length
2 6 4 1 1 4 1 1 ...
[bytes]
Bytes 0 to 7 contain the protocol information already mentioned above (refer also to page 53).
From byte 8 in the first segment (byte 2 in the following segments) the definition of the desired Tx-
identifiers is transmitted to the CAN gateway. For each Tx-identifier 6 bytes are required:
TxId_value These four bytes specify the numeric value of the Tx-identifier.
form Via this byte you can choose whether the output data is to be converted from Motorola
data format of the PLC into Intel data format of the CAN network or not. Byte form has
already been described in detail on page 31.
length Here the number of data bytes of the Tx-identifier is specified. Entries between 1 and
8 are permissible.
The Rx-identifiers are configured via pages 151 to 250 (decimal). The page structure is as follows:
Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
Length
2 6 4 1 1 4 1 1 ...
[bytes]
Bytes 0 to 7 contain the protocol information already mentioned above (refer also to page 53).
From byte 8 in the first segment (byte 2 in the following segments) the definition of the desired Rx-
identifiers is transmitted to the CAN gateway. For each Rx-identifier 6 bytes are required:
RxId_value These four bytes specify the numeric value of the Rx-identifier.
form Via this byte you can choose whether the output data is to be converted from Motorola
data format of the PLC into Intel data format of the CAN network or not. Byte form has
already been described in detail on page 31.
length Here the number of data bytes of the Rx-identifier is specified. Entries between 1 and
8 are permissible.
The user data is read and written via page 251 (decimal) and following. The maximum number of data
pages is 65285.
The structure of the page for output data can differ from the page structure for input data, because the
number of Rx-data can differ from the number of Tx-data.
Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
Length
2 6 1 1...8 (here: 4) 1 1...8 (here: 6) ...
[bytes]
Bytes 0 to 7 contain the protocol information already mentioned above (refer also to page 53).
Starting with byte 8 in the first segment, the data of the first identifier are transmitted to the gateway.
The data of the next identifier follow directly, that means that only as many data bytes are transmitted
each per identifier as have been defined in length!
In the second segment the transmission of data already starts with byte 2, because bytes 2 to 7 do not
contain protocol information.
force In this byte you can specify the time when the Tx-data is to be transmitted:
force Transmission
0 data is not put out as CAN frame
1 data is always (following each PROFIBUS telegram) put out as CAN frame
2 data is only put out as CAN frame, if data was changed
3 data is put out as CAN frame once *)
4 data is put out as CAN frame once *)
*) Change between 3 and 4 causes a direct output of data
Tx_user_data Here the user data of this Tx-identifier to be transmitted are specified.
Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
Length
2 6 1 1...8 (here: 6) 1 1...8 (here: 4) ...
[bytes]
count_in x In this byte the gateway specifies an input counter. The input counter is incremented
with each Rx-frame received. It can be used by the user, for example, to program a
guarding protocol.
Rx_user_data Here the received user data of this Rx-identifier are entered.
By means of function block FB2 all configurations and data transfers of the Page Mode can be
executed. The types of data blocks which are used by FB2 will be shown in the following example call.
CALL FB 2 , DB102
FREIGABE :=#BIT1
WRITE_ADDRESS :=#WRITE_ADDRESS
WRITE_CONFIG_DB:=#WRITE_CONFIG_DB
WRITE_DB :=#WRITE_DB
READ_ADDRESS :=#READ_ADDRESS
READ_CONFIG_DB :=#READ_CONFIG_DB
READ_DB :=#READ_DB
RET_VALUE :=#t016
: : : : :
length x This byte specifies the number of data bytes which are to
be transmitted on the Tx-identifier which is defined here.
The length of the data blocks differs. The required length can be
determined from the number of required Tx-identifiers plus the four bytes
for the end flag.
Example:
You have to define 16 Tx-identifiers via DB11.
DB11 defines Tx-Ids 1 ... 10,
therefore requires a length of (10 A 6 + 4) = 64 bytes
End flag = DDDDDDDDh
DB12 defines Tx-Ids 11 ... 16,
therefore requires a length of (6 A 6 + 4) = 40 bytes
End flag = EEEEEEEEh
Note:
In FB2 the bit FREIGABE has to be set = 1!
: : : : :
length x This byte specifies the number of data bytes which are to
be received by this Rx-identifier.
The length of the data blocks differs. The required length can be
determined from the number of Rx-identifiers required plus the four bytes
for the end flag.
Note:
In FB2 the bit FREIGABE has to be set = 1!
n+2+
length 3 force 3 user data 3 user data of Tx-Id 3
m+2
length x This byte specifies the number of data bytes which are to
be transmitted on the Tx-identifier defined here (+1 for the
force-byte):
force Function
In order to transmit the CAN frame with the user data once,
parameter force has to be set to value ‘3’. If the parameter
is set to ‘3’ again in the following cycle, the frame will not
be transmitted. In order to transmit more than once force
has to be set to the value ‘4’ in the following cycle. Each
further switch between the values triggers a transmission
of frames.
enddata This parameter tells the PLC whether another data block
with user data will follow, or whether this was the last user
data to be transmitted.
- If another data block is required, the hexadecimal value
‘DD’ has to be specified for length following the
definition of the last user data. FB2 will then continue to
handle the following DB.
- If the last user data of this application has been specified,
FB2 will be told by entering the hexadecimal value ‘EE’
in cell length. FB2 will then continue to transmit the user
data of the first WRITE_DB.
Note:
Bit FREIGABE has to be set = 1 in FB2, if the output data is to be written!
n+2+
length 3 count_in 3 userdata 3 user data of Rx-Id 3
m+2
Note:
Bit FREIGABE has to be set = 1 in FB2, if the input data is to be read!
RET_VALUE
Page type currently being transmitted
(at FREIGABE = 1)
0 no page transmission
1 reserved
2 Tx-configuration via pages 51...150
3 Rx-configuration via pages 151...250
4 data pages 251...n
1. Hardware Configuration
2. PLC-Program
The configuration of a module is made by means of a configuration frame, whose content is entered in
the GSD-file.
The frame of the configuration is sub-devided in three octets (see also PROFIBUS-Specification,
Normative Part 8, page 738, Fig. 16):
Octet 1: Number_of_manufacturer-specific_data
Because the CAN-DP always uses a specific ID-format to represent a connected CAN-module, the
identifier-byte has the following structure (see also PROFIBUS-Specification- Normative-Part-8, page
737):
MSB LSB
Bit-No.: 7 6 5 4 3 2 1 0
Length of the manufactuerer-specific data:
00: free place
always always
Content: 01: Input 0011 11-bit identifier
0 0
10: Output 0101 29-bit identifier
0101 Communication window
Bit-No.: 7 6 5 4 3 2 1 0
Content: 1 0 0 0 0 0 1 1
Octet 2: Number_of_output_or_input_bytes
Octet 2 gives the consistency, the structure (byte/word) and the number of the in/output bytes.
Length bytes of the output as seen from the PROFIBUS master (see also PROFIBUS-Specification-
Normative-Part-8, page 738)
MSB LSB
Bit-No.: 7 6 5 4 3 2 1 0
Number of inputs/outputs
Bit
Consistency over Length-format Meaning
5 4 3 2 1 0
0: byte or word 0: byte-structure
Content: 0 0 0 0 0 0 1 byte, resp. 1 word
1: complete 1: word-
: :
length structure 1 1 1 1 1 1 63 bytes, resp. 63 words
Example Module 1:
Bit-No.: 7 6 5 4 3 2 1 0
Content: 0 0 0 0 0 1 0 1
Octet 3, 4, 5: Manufacturer-specific_configuration_byte
The configuration-frame for module 1 has the following structure and has to be inserted into the GSD-
file.
...
...
Attention!: Please note, that the GSD-file has to be renamed. The file name may be maximum
8 characters long. Some configuration-software for the PROFIBUS Master does not
operate with longer file names.
**************************************************************************
**************************************************************************
Network 5:
-----------
U M 95.0
SPB M401
L 0 // CAN-ID = 0
T MW 0
T MW 4
T MB 12
T MB 14 // subcommand
T MB 15 // command = 0:
SPA M499
M401: U M 95.1 // start-frame ready ?
SPB M402
L 0 // CAN-ID = 0 (for start-frame)
T MW 0
L W#16#100 // CAN-data = 0x01,0x00 (start-frame)
T MW 4
L 2
T MB 12
L 0
T MB 14 // subcommand
L 1
T MB 15 // command = 1: send frame
SPA M499
Network 6:
-----------
CALL FB 4 , DB104
FREIGABE :=M99.6
WRITE_ENABLE :=M99.7
READ_ENABLE :=M99.7
WRITE_CAN_ID :=MW0
WRITE_DATA0 :=MB4
WRITE_DATA1 :=MB5
WRITE_DATA2 :=MB6
WRITE_DATA3 :=MB7
WRITE_DATA4 :=MB8
WRITE_DATA5 :=MB9
WRITE_DATA6 :=MB10
WRITE_DATA7 :=MB11
WRITE_LEN :=MB12
WRITE_SUBCOMMAND:=MB14
WRITE_COMMAND :=MB15
WRITE_ADDRESS :=W#16#F0
READ_ADDRESS :=W#16#F0
TRANSFER_READY :=M99.5
READ_CAN_ID :=MW0
READ_DATA0 :=MB4
READ_DATA1 :=MB5
READ_DATA2 :=MB6
READ_DATA3 :=MB7
READ_DATA4 :=MB8
READ_DATA5 :=MB9
READ_DATA6 :=MB10
READ_DATA7 :=MB11
READ_LEN :=MB12
READ_FIFO_COUNT :=MB14
READ_COMMAND :=MB15
READ_RET_VAL :=MW14
WRITE_RET_VAL :=MW16
L W#16#181
L MW 0
>I
SPB M601
L W#16#1FF
L MW 0
<I
SPB M601
L W#16#181
-I
SLD 4
SLD 3
T MD 14
AUF DB 92
L MW 0 // CAN-ID
T DBW [MD 14]
L MD 14
+ L#16
T MD 14
L 0 // reserve byte 2 + 3
T DBW [MD 14]
L MD 14
+ L#16
T MD 14
L MD 4 // data-byte 0 - 3
T DBD [MD 14]
U M 99.5
U M 95.7
S M 96.0
U M 99.5
U M 95.6
S M 95.7
U M 99.5
U M 95.5
S M 95.6
U M 99.5
U M 95.4
S M 95.5
U M 99.5
U M 95.3
S M 95.4
U M 99.5
U M 95.2
S M 95.3
U M 99.5
U M 95.1
S M 95.2
U M 99.5
U M 95.0
S M 95.1
U M 99.5
S M 95.0
*****************************************************************************
Calling FB3
=======================
( in FB 3 FB 1 (motor set-up) and FB 2 (data exchange) are called )
CALL FB 3 , DB103
FREIGABE :=E125.7
KONFIG_DB:=W#16#5D // DB93: initialize motors 1,3,4,7,8 ; 1,4,8
DATEN_DB :=W#16#64
RET_VALUE:=MW16
L MW 16
L 2
>=I
= M 99.7
// motors initiliazed => Communication Window can be used
DB98: INIT_LIST_DB = Data block with list of motors which are available / are being initialized
====================================================================================================
Address Name Type Initial val. Actual val. Comment
------- ---- --- ----------- ---------- ---------
0.0 init_db1 WORD W#16#63 W#16#63 Motor 1 available and initialize
2.0 init_offset1 WORD W#16#0 W#16#0 --> list from DB 99 data word 0
4.0 init_status1 WORD W#16#0 W#16#0
6.0 reserve1 WORD W#16#0 W#16#0
8.0 init_db2 WORD W#16#0 W#16#0 Motor 2 not available
10.0 init_offset2 WORD W#16#0 W#16#0
12.0 init_status2 WORD W#16#0 W#16#0
14.0 reserve2 WORD W#16#0 W#16#0
16.0 init_db3 WORD W#16#FFFF W#16#FFFF Motor 3 available
18.0 init_offset3 WORD W#16#0 W#16#0
20.0 init_status3 WORD W#16#0 W#16#0
22.0 reserve3 WORD W#16#0 W#16#0
24.0 init_db4 WORD W#16#63 W#16#63 Motor 4 available and initialize
26.0 init_offset4 WORD W#16#82 W#16#82 --> list from DB 99 data word 130
28.0 init_status4 WORD W#16#0 W#16#0
30.0 reserve4 WORD W#16#0 W#16#0
32.0 init_db5 WORD W#16#0 W#16#0 Motor 5 not available
34.0 init_offset5 WORD W#16#0 W#16#0
36.0 init_status5 WORD W#16#0 W#16#0
38.0 reserve5 WORD W#16#0 W#16#0
40.0 init_db6 WORD W#16#0 W#16#0 Motor 6 not available
42.0 init_offset6 WORD W#16#0 W#16#0
44.0 init_status6 WORD W#16#0 W#16#0
46.0 reserve6 WORD W#16#0 W#16#0
48.0 init_db7 WORD W#16#FFFF W#16#FFFF Motor 7 available
50.0 init_offset7 WORD W#16#0 W#16#0
52.0 init_status7 WORD W#16#0 W#16#0
54.0 reserve7 WORD W#16#0 W#16#0
56.0 init_db8 WORD W#16#63 W#16#63 Motor 8 available and initialize
58.0 init_offset8 WORD W#16#0 W#16#0 --> list from DB 99 data word 0
60.0 init_status8 WORD W#16#0 W#16#0
62.0 reserve8 WORD W#16#0 W#16#0
64.0 init_db9 WORD W#16#0 W#16#0 Motor 9 not available
66.0 init_offset9 WORD W#16#0 W#16#0
68.0 init_status9 WORD W#16#0 W#16#0
70.0 reserve9 WORD W#16#0 W#16#0
. . . . .
. . . . .
. . . . .
(always 0 => motor xxx not available)
DB100: DATA_DB = Data block with input and output data of the maximum 127 motors
======================================================================================
Address Name Type Initial val. Actual val. Comment
------- ---- --- ----------- ---------- ---------
0.0 force1 BYTE B#16#0 B#16#0 Motor 1
1.0 res1 BYTE B#16#0 B#16#0
2.0 steuerwort1 WORD W#16#0 W#16#0
4.0 sollposition1 DWORD DW#16#0 DW#16#0
8.0 empfangszaehler1 BYTE B#16#0 B#16#0
9.0 reserve1 BYTE B#16#0 B#16#0
10.0 statuswort1 WORD W#16#0 W#16#0
12.0 istposition1 DWORD DW#16#0 DW#16#0
16.0 force2 BYTE B#16#0 B#16#0 Motor 2
res2 BYTE B#16#0 B#16#0
steuerwort2 WORD W#16#0 W#16#0
sollposition2 DWORD DW#16#0 DW#16#0
empfangszaehler2 BYTE B#16#0 B#16#0
reserve2 BYTE B#16#0 B#16#0
statuswort2 WORD W#16#0 W#16#0
istposition2 DWORD DW#16#0 DW#16#0
force3 BYTE B#16#0 B#16#0 Motor 3
res3 BYTE B#16#0 B#16#0
steuerwort3 WORD W#16#0 W#16#0
sollposition3 DWORD DW#16#0 DW#16#0
empfangszaehler3 BYTE B#16#0 B#16#0
reserve3 BYTE B#16#0 B#16#0
statuswort3 WORD W#16#0 W#16#0
istposition3 DWORD DW#16#0 DW#16#0
force4 BYTE B#16#0 B#16#0 Motor 4
res4 BYTE B#16#0 B#16#0
steuerwort4 WORD W#16#0 W#16#0
sollposition4 DWORD DW#16#0 DW#16#0
empfangszaehler4 BYTE B#16#0 B#16#0
reserve4 BYTE B#16#0 B#16#0
statuswort4 WORD W#16#0 W#16#0
istposition4 DWORD DW#16#0 DW#16#0
force5 BYTE B#16#0 B#16#0 Motor 5
res5 BYTE B#16#0 B#16#0
steuerwort5 WORD W#16#0 W#16#0
CAN-identifier Data
Designation Length Explanations
[HEX] [HEX]
Starting all
0 NMT 2 01 xx
(preoperational -> operational)
0 NMT 2 80 xx Operational -> preoperational
0 NMT 2 81 xx Reset (e.g. CAN-I/O-module)
0 NMT 2 82 xx Reset communication
80h NMT 0 - Sync all
Emergency message (e.g. by
80h + Node-ID SDO 0...8 bytes error code
CANopen-I/O-module)