Kunbus KUNBUS-COM, EtherCat User Manual

User Manual
KUNBUS-COM EtherCat
PR100033 • 16/09/2015
Table of Contents KUNBUS GmbH
ii KUNBUS-COM EtherCAT
Table of Contents
1.1 Disclaimer..................................................................................................................................4
1.2 Notes regarding this user manual..............................................................................................4
1.3 Validity.......................................................................................................................................5
1.4 Limitation of Liability ..................................................................................................................5
1.5 Customer Service......................................................................................................................5
2.1 User...........................................................................................................................................6
2.2 Symbols.....................................................................................................................................6
2.3 General Safety Guidelines.........................................................................................................7
2.4 Environmental Conditions..........................................................................................................7
3.1 Introduction................................................................................................................................8
3.2 Spacer bolt ................................................................................................................................9
3.3 Application Interface................................................................................................................11
3.4 Fieldbus Connection Socket....................................................................................................15
3.5 Status LEDs.............................................................................................................................16
4 Components ..................................................................................................................................18
4.1 Module Components ...............................................................................................................18
4.2 Storage Unit.............................................................................................................................19
4.3 Data Broker .............................................................................................................................20
4.4 Fieldbus Interface....................................................................................................................28
4.5 CDI - Configuration and Debug Interface................................................................................28
4.6 DPR - Dual Port RAM..............................................................................................................29
4.7 SDI - Serial Data Interface.......................................................................................................31
4.8 Synchronous serial interface ...................................................................................................32
4.9 Scripter ....................................................................................................................................44
5 Commissioning .............................................................................................................................45
5.1 Installation ...............................................................................................................................45
5.2 Configuration ...........................................................................................................................46
5.3 Firmware Update.....................................................................................................................46
6 Memory Register ...........................................................................................................................47
6.1 Overview of the Memory Register ...........................................................................................47
6.2 General Device Parameters ....................................................................................................50
6.3 Register for the Mapping .........................................................................................................75
6.4 Memory of the Communication Channels ...............................................................................78
6.5 Fieldbus specific Registers......................................................................................................81
6.6 Reserve Register.....................................................................................................................89
KUNBUS GmbH Table of Contents
KUNBUS-COM EtherCAT iii
7 Communication model .................................................................................................................90
7.1 EtherCAT Object Directory......................................................................................................90
8 CDI .................................................................................................................................................93
8.1 Setting up a Serial Connection................................................................................................93
8.2 CDI Menus...............................................................................................................................96
9 Disposal .......................................................................................................................................132
9.1 Dismantling and Disposal......................................................................................................132
10 Technical data .............................................................................................................................133
10.1Technical data .......................................................................................................................133
11 Appendix ......................................................................................................................................134
11.1Configuration via Modpoll ......................................................................................................134
KUNBUS-COM EtherCAT
4 / 135
1 General information
1.1 Disclaimer
© 2015 KUNBUS GmbH, Denkendorf (Deutschland)
The contents of this user manual have been prepared by the KUNBUS GmbH with the utmost care. Due to the technical development, the KUNBUS GmbH reserves the right to change or replace the contents of this user manual without prior notice. You can always obtain the latest version of the user manual at our homepage: www.kunbus.de
The KUNBUS GmbH shall be liable exclusively to the extent specified in General Terms and Conditions (www.kunbus.de/ agb.html).
The contents published in this user manual are protected by copyright. Any reproduction or use for the in-house requirements of the user is permitted. Reproduction or use for other purposes are not permitted without the express, written consent of the KUNBUS GmbH. Contraventions shall result in compensation for damages.
Trademark protection
– KUNBUS is a registered trademark of the KUNBUS GmbH
– Windows® and Microsoft® are registered trademarks of the Microsoft,
Corp.
– Modbus is a registered trademark of the Modbus-IDA Organization.
KUNBUS GmbH Heerweg 15 c 73770 Denkendorf Deutschland
www.kunbus.de
1.2 Notes regarding this user manual
This user manual provides important technical information that can enable you, as a user, to efficient, safe and convenient integration of the COMS-Module into your applications and systems. It is intended for trained, qualified personnel, whose sound knowledge in the field of electronic circuits and expertise of EtherCATTM is assumed.
As an integral part of the module, the information provided here should be kept and made available to the user.
General information
KUNBUS-COM EtherCAT 5 / 135
1.3 Validity
This document describes the application of the KUNBUS COMS­Moduls with the product number:
– PR100033, Release 02
1.4 Limitation of Liability
Warranty and liability claims will lapse if:
– the product has been used incorrectly,
– damage is due to non-observance of the operating manual,
– damage is caused by inadequately qualified personnel,
– damage is caused by technical modification to the product (e.g.
soldering).
1.5 Customer Service
If you have any questions or suggestions concerning this product, please do not hesitate to contact us:
KUNBUS GmbH Heerweg 15 C
+49 (0)711 3409 7077
support@kunbus.de www.kunbus.de
General information
KUNBUS-COM EtherCAT
6 / 135
2 Safety Guidelines
2.1 User
The Modul may only be assembled, installed and put into operation by trained, qualified personnel. Before assembly, it is absolutely essential that this documentation has been read carefully and understood. Expertise in the following fields is assumed:
– Electronic circuits,
– Basic knowledge of EtherCAT,
– work in electrostatic protected areas,
– Locally applicable rules and regulations for occupational safety.
2.2 Symbols
The symbols used have the following meaning:
DANGER
Hazard
Observe this information without fail!
There is a safety hazard that can lead to serious injuries and death.
CAUTION
Caution
There is a safety hazard that can result in minor injuries and material damage.
NOTICE
Note
Here you will find important information without a safety hazard.
Safety Guidelines
KUNBUS-COM EtherCAT 7 / 135
2.3 General Safety Guidelines
DANGER
Danger of electric shock
If unsuitable power supply is used, this can cause an electric shock.
Ø This can cause death, serious injuries and material damage to your
systems and modules.
èOnly use a power supply that complies with the regulations for safety
extra-low voltage (SELV) or protective extra-low voltage (PELV).
CAUTION
Fault due to mechanical load
A continuous mechanical load of over 5G or shock loads of over 15G can cause faults on your modules.
èComply with these load limits and avoid any unnecessary loads.
CAUTION
Fault due to missing or unsuitable spacer bolt
Incorrect or missing spacer bolts can result in high mechanical loads on your module and control board. This can cause faults.
èAlways use spacer bolts suitable for the connector height of the circuit
board so that the module does not lie on the circuit board. You can find detailed information in section "Spacer bolt [}9]"
CAUTION
Damage due to subsequent processing
Avoid subsequent processing of theCOMS-Modul.
Ø Soldering can cause components to become detached and thus
damage or destroy the module.
Ø Please note that the warranty shall become invalid if the products are
changed technically.
èSpeak to your contact person at the KUNBUS GmbH about customised
solutions.
2.4 Environmental Conditions
Operate the COMS-Modul only in an environment that complies with the operating conditions in order to prevent any damage.
Suitable Environmental Conditions:
Operating temperature 0 to +60°C Humidity 0% not 95%, non-condensing
Safety Guidelines
KUNBUS-COM EtherCAT
8 / 135
3 Overview
3.1 Introduction
With the KUNBUS COMS-Modul you can make a sensor or actuator fieldbus-capable. To do this, simply insert the module into your application and connect it to the fieldbus.
The COMS-Modul thereby saves you time-consuming in-house developments.
Illustration1: Overall view
Overview
KUNBUS-COM EtherCAT 9 / 135
3.2 Spacer bolt
There are three holes on the module for spacer bolts. These spacer bolts have 2 tasks:
– they stabilise the COMS module with a direct connection to the main
board
– they are part of the earthing concept.
Illustration2: Holes for spacer bolts
Suitable spacer bolts
Suitable spacer bolts have the following properties:
– Conductive material
– Holes for M3 screws
– Diameter: maximum 8mm
Connections
These spacer bolts are an important part of the earthing concept of the COMS-Modul.
– Connect hole 1 to protective earth on the fieldbus side
– Hole 2 is not electrically connected.
– Connect the spacer bolts of hole 3 to GND (earth power supply)
Overview
KUNBUS-COM EtherCAT
10 / 135
Height of spacer bolts
The height of the spacer bolts depends on the height of the plug connector used on the application side.
We recommend using the ERNI 254589 plug connector. The spacer height for this plug connection is 10.75 to 12.3 mm above the circuit board.
WARNING
Fault due to missing or unsuitable spacer bolt
Incorrect or missing spacer bolts can result in high mechanical loads on your module and control board. This can cause faults.
èAlways use spacer bolts suitable for the connector height of the circuit
board so that the module does not lie on the circuit board.
Overview
KUNBUS-COM EtherCAT 11 / 135
3.3 Application Interface
The main board is connected to the device controller via a 32-pin connector strip. You have the option to plug the module in directly.
CAUTION
Mechanical loads can lead to faults on the module
èUse suitable spacer bolts to prevent mechanical loads. (e.g.
Ord.No.9774110360 from Würth Elektronik).
Illustration3: Application Interface
Pin assignment on the application interface
The module can be operated in serial or parallel mode. In serial mode you can choose whether you want to use the module as master or slave.
You can activate the modes via logical levels:
Mode Switchover level
Serial slave mode "a14": +3.3V, "a6" +3.3V Serial master mode "a14": +3.3V, "a6": 0V Parallel mode "a"14" GND
You can change over the operating mode via pin a14.
Overview
KUNBUS-COM EtherCAT
12 / 135
Slave Mode ("a14": +3.3V, "a6" +3.3V)
Pin Designation Direction Comment
a1 CDI.TX [OUT] Send CDI a2 receive CDI.RX [IN] CDI a3 GND Supply a4 SPI.SCK [IN] SPI Clock a5 SPI.MOSI [IN] SPI Data In a6 SPI.MODE.DIR [IN] SPI Mode
1 = Slave a7 SPI.MID [IN] SPI Middle a8 UART.TX [OUT] Send SDI a9 UART.TE [OUT] SDI 1 = transmitter activ-
ated
for RS485 operation
a10-a13 Reserved Do not connect!
a14 MODE [IN] Mode-Select
1 = Serial Mode
a15 RESET [IN] Module-Reset ( low-active ) a16 GND Supply
b1-b2 Reserved Do not connect!
b3 GND Supply b4 SPI.MISO [OUT] SPI Data Out b5 SPI.CS [IN] SPI Chip-Select b6 SPI.READY [OUT] SPI Ready b7 SPI.RESET [OUT] Reset signal for the SSC b8 UART.RX [IN] Receive SDI
b9-b15 Reserved Do not connect!
b16 +3V3 Supply
Overview
KUNBUS-COM EtherCAT 13 / 135
SSC Master ("a14": +3.3V "a6": 0V)
Pin Designation Direction Comment
a1 CDI.TX [OUT] Send CDI a2 receive CDI.RX [IN] CDI a3 GND Supply ­a4 SPI.SCK [OUT] SPI Clock a5 SPI.MOSI [OUT] SPI Data Out a6 SPI.MODE.DIR [IN] SPI Mode
0 = Master
a7 SPI.MID [IN] SPI Middle a8 UART.TX [OUT] Send SDI a9 UART.TE [OUT] SDI 1 = transmitter activ-
ated
for RS485 operation
a10-a13 Reserved Do not connect!
a14 MODE [IN] Mode-Select
1 = Serial Mode
a15 RESET [IN] Module-Reset ( low-active ) a16 GND Supply
b1-b2 Reserved Do not connect!
b3 GND Supply ­b4 SPI.MISO [IN] SPI Data In b5 Reserved Do not connect! b6 SPI.LOAD [OUT] Load signal for the SSC b7 SPI.RESET [OUT] Reset signal for the SSC b8 UART.RX [IN] Receive SDI
b9-b15 Reserved Do not connect!
b16 +3V3 Supply
Overview
KUNBUS-COM EtherCAT
14 / 135
Parallel Operating Mode ("a"14" GND)
Pin Designation Direction Comment
a1 CDI.TX [OUT] Send CDI a2 receive CDI.RX [IN] CDI a3 GND Supply a4 ADDR0 [IN] Address-Bit 0 a5 ADDR1 [IN] Address-Bit 1 a6 ADDR2 [IN] Address-Bit 2 a7 ADDR3 [IN] Address-Bit 3 a8 ADDR4 [IN] Address-Bit 4 a9 ADDR5 [IN] Address-Bit 5
a10 ADDR6 [IN] Address-Bit 6 a11 ADDR7 [IN] Address-Bit 7 a12 ADDR8 [IN] Address-Bit 8 a13 ADDR9 [IN] Address-Bit 9 a14 MODE [IN] Mode-Select
0 = Parallel Mode
a15 RESET [IN] Module-Reset ( low-active ) a16 GND Supply
b1-b2 Reserved Do not connect!
b3 GND Supply b4 DATA0 [IN/OUT] Databus-Bit 0 b5 DATA1 [IN/OUT] Databus-Bit 1 b6 DATA2 [IN/OUT] Databus-Bit 2 b7 DATA3 [IN/OUT] Databus-Bit 3 b8 DATA4 [IN/OUT] Databus-Bit 4 b9 DATA5 [IN/OUT] Databus-Bit 5
b10 DATA6 [IN/OUT] Databus-Bit 6 b11 DATA7 [IN/OUT] Databus-Bit 7 b12 CS_B [IN] Chip-Select
(low-active)
b13 WR_B [IN] Write-Enable
(low-active)
b14 RD_B [IN] Read-Enable
(low-active)
b15 Reserved Do not connect! b16 +3.3V Supply
Overview
KUNBUS-COM EtherCAT 15 / 135
3.4 Fieldbus Connection Socket
The module has a two Ethernet sockets for connecting to the fieldbus.
Illustration4: Fieldbus Connection Socket
Pin assignment forEtherCAT
Pin Assignment
1 TX+ 2 TX­3 RX+ 4 Not assigned.
Pin 4 and 5 are interconnected and laid via a filter on PE for better EMC response.
5
6 RX­7 Not assigned.
Pin 4 and 5 are interconnected and laid via a filter on PE for better EMC response.
8
Overview
KUNBUS-COM EtherCAT
16 / 135
3.5 Status LEDs
The COMS-Module are fitted with LEDs for status indication. Lightpipes guide the LED signals to the side.
Illustration5: Status LEDs
No. LED Status Meaning Note 1 Module Error
(red)
Off No error has
occurred
Flash­ing
Configuration error
At least one system component does not function due to a con­figuration error.
On Internal system
error
A fatal, internal error has oc­curred.
Flash­ing
Start-up phase At least one system component
has not yet finished the start-up phase.
On A serious error
has occurred
A fatal error has occurred.
Overview
KUNBUS-COM EtherCAT 17 / 135
2 Operating
Mode (green)
Off Module not
running
Flash­ing
Start-up phase At least one system component
has not yet finished the start-up phase.
On Normal opera-
tion
All system components function faultlessly.
3 Link Activity
OUT
off No connection flashesConnection
and data traffic
on Connection
4 Link Activity IN off No connection
flashesConnection
and data traffic
on Connection
Overview
KUNBUS-COM EtherCAT
18 / 135
4 Components
4.1 Module Components
The module is divided into independent components to ensure a high level of flexibility in the application.
The following pages describe the individual components:
Illustration6: Components
Components
KUNBUS-COM EtherCAT 19 / 135
4.2 Storage Unit
The storage unit is the central component for all functions of the COMS-Module. It is subdivided into individual Memory Register with a width of 16 bits each. In these Memory registers the following information is stored:
– Input and output data
– Configuration settings
– Module Status
– Error states
The functionality of the addressing was incorporated from Modbus. The register assignment depends on the application and is not specified by the Modbus specification. A Memory Register according to this specification has a register number between 1 (0x0001) and a maximum of 65536 (0x10000), of which the module only uses a small part, however.
With 8-bit values, 1 byte remains unused. 32-bit values are stored in 2 registers.
The 16-bit values are stored internally in the memory in Little Endian order. This must be taken into account when you access data via the fieldbus interface, SDI or SSC.
NOTICE!In the description of the individual memory registers
and CDI, the memory registers are also referred to as Modbus
registers.
In section Overview of the Memory Register [}47] we have compiled a detailed overview of registers for you.
Components
KUNBUS-COM EtherCAT
20 / 135
4.3 Data Broker
The Data Broker decouples individual components from each other and distributes the data streams between the interfaces. The targeted forwarding of the data ensures a high level of functionality between the data sources and data sinks of the module.
Illustration7: Internal mapping by the Data Broker
Mapping
You have the option to define the allocation (mapping) yourself. This allows you to define which input register the Data Broker should accept data from and which output register it should transfer data to.
You can define up to 8 register areas with freely definable lengths in the respective output register area for each of the interfaces. Any register area of the same length is assigned to the output register areas from one of the input register areas of all interfaces. Here, the 8 target areas are always on consecutive output register positions, starting with the lowest register address for the respective interface.
Components
KUNBUS-COM EtherCAT 21 / 135
Illustration8: Mapping
NOTICE
Viewpoint
Please note that the description of the input and output values is written from the perspective of the module and not from the perspective of the overall system or controller.
èOutput: Values that the module sends to the fieldbus or application.
èInput: Values that the module receives from the fieldbus or application.
You can configure standard values that the Data Broker writes in the relevant output register instead of an input register in the event of a failure of a data provider. That has the advantage that the data processing cannot abort uncontrollably.
The module uses the Little Endian byte order for the internal processing. You can also configure the Data Broker so that it exchanges the high and low byte when copying if necessary. To do this, add the value 0x8000 or 32768 for the required mapping area (see details below).
Extended Mapping
Some applications work with data that is viewed bit by bit. To make the mapping for such applications even more flexible, an "Extended Mapping" is provided. This mapping basically works in the same way as the mapping described above:
Components
KUNBUS-COM EtherCAT
22 / 135
Individual areas of the output Memory Register are assigned from areas of the input Memory registers. In Extended Mapping you define such assignments for up to 16 areas. When doing so, enter a number of consecutive bits for each of these areas.
The limit of a register must not be exceeded: The area may be up to 1024 bits long. Unlike the simple mapping described above, however, the 16 target areas do not necessarily have to be at consecutive addresses. You are totally free to define the position of the first bit of the target area by entering an output register address and the corresponding bit position (0 to 15). The source area is also defined by entering the input register and a start bit position.
Illustration9: Extended Mapping
All mapping areas are processed sequentially. The Data Broker first copies all simple mapping areas cyclically. After that, it executes the Extended Mapping. In the course of this, it is quite possible to intentionally overwrite a target area by several sources of data.
NOTICE
It is possible that bits are overwritten unintentionally by various input sources.
Make sure that the target areas do not overlap unintentionally.
Components
KUNBUS-COM EtherCAT 23 / 135
Validity period of the process data
Data sources that write data to the input area of the central memory are called producers because they produce process data. The Data Broker collects this data and copies it into the output area of the central memory. From there, the data is sent to its target, the so­called consumer, via the corresponding interfaces.
Illustration10: Distribution to producers/consumers
Process data is normally exchanged cyclically between producers and consumers. If a producer fails (e.g. a connector is removed or a cable is broken), the consumer must be able to deal with this situation appropriately. For this reason, you can define in advance which values the producer will receive in exchange for the failed process data.
Components
KUNBUS-COM EtherCAT
24 / 135
The COMS-Module allow a separate validity period to be defined for each producer (SDI, SSC, EtherCAT , DPR ). When a producer supplies new process data, a stopwatch is started. If the producer does not supply any new process data before the predefined validity period expires, then the old data is invalid after this time.
Each consumer predefines which data he is to receive from the Data Broker in such a case:
– All bytes at 0
– All bytes at 1
– retain the last valid data
The set validity periods from COMS-Modul are saved permanently in the Memory registers. They are also available after a restart. Likewise, the rule defined for a consumer, as to how to proceed if the validity period is exceeded. The respective time values of the validity period must be adapted, of course, to the cycle time of the interface concerned.
– For EtherCAT this cycle time is determined by parameters of the
master.
– For SSC interface the time is determined from the shift register chain
length, the cycle frequency, and for short or fast register chains, it is determined by the cycle time of the COMS module.
– During SPI slave mode and SDI transfer, the master determines the
cycle time of the respective interface, as well the base board when using the DPR.
Example of a Mapping
The following example explains, step-by-step, how to map the first three SDI input registers and the first five SSC input registers to the field output register.
If you would like to participate in this example, you will need a functional CDI connection. Section "Setting up a Serial Connection [}93]" explains how this works.
Input options in the CDI menu:
You can enter hexadecimal (with prefixed 0x) or decimal numbers in the CDI menu.
[Esc] Go back one level [Enter] Confirm input/selection [b] Value is displayed in binary code [h] Value is displayed in hexadecimal
code
[d] Value is displayed in decimal
code
Components
KUNBUS-COM EtherCAT 25 / 135
◦ Open the main menu of the CDI as described in the Appendix "Setting
up a serial connection using PuTTY".
Main Menu
The main menu is your access point for operating the module using the CDI. After a reset, the module transmits this main menu to the terminal.
-------------------------------------------------­KUNBUS-COM – Main Menu
-------------------------------------------------­1 – Module Information 2 – Interface Configuration 3 - Monitor Communication 4 – Module Status
-------------------------------------------------­>
Configuration menu
◦ In the main menu enter [2]+[Return].
ð You will be taken to the configuration menu "2-Interface Configuration"
In this menu you have the option to set the mapping for the data broker and the operational parameters for the different interfaces.
– Select "Fieldbus Output Mapping" to define the data source for the
fieldbus output register.
-------------------------------------------------­KUNBUS-COM – Interface Configuration
-------------------------------------------------­Operating Mode: Config
1 - SDI Communication 2 - CDI Communication 3 - SSC Communication 4 - DPR Configuration 6 - SDI Output mapping 7 - SSC Output mapping 8 - Fieldbus Output mapping 9 - DPR Output mapping 11 - Fieldbus Specific 12 - Set Arbitrary Register 13 - Script Interpreter 14 - Reset Module 15 - Reset to Factory Settings 16 - Extended Mapping
-------------------------------------------------­>
Components
KUNBUS-COM EtherCAT
26 / 135
– With the selection 1-8 are 8 positions available to create a mapping.
-------------------------------------------------­KUNBUS-COM - Fieldbus Outputmapping
-------------------------------------------------­Src Register Number 1 - 1 (0x0001) | 0 2 - 1 (0x0001) | 0 3 - 1 (0x0001) | 0 4 - 1 (0x0001) | 0 5 - 1 (0x0001) | 0 6 - 1 (0x0001) | 0 7 - 1 (0x0001) | 0 8 - 1 (0x0001) | 0
9 - Default Data: all zero 10 - Valid Time: disabled
-------------------------------------------------­>
◦ Enter [1] + [Return].
◦ Specify the first 3 registers of the SDI input register as data source
(start address 0x1401).
◦ Confirm your entry with [Return]
ð After confirming, you will return automatically to the "Fieldbus Output
Mapping" menu
You can find an overview of the start addresses in the section "Overview of the Memory Register [}47]".
-------------------------------------------------­KUNBUS-COM – Edit one map entry
-------------------------------------------------­Source Register: 0x1401 Number of Registers: 3
◦ Create another mapping at the next free position
◦ Select the first 5 registers of the SSC input register as data source (start
address 0x1001)
-------------------------------------------------­KUNBUS-COM – Edit one map entry
-------------------------------------------------­Source Register: 0x1001 Number of Registers: 5
Components
KUNBUS-COM EtherCAT 27 / 135
In the menu for fieldbus outputmapping, you can see the finished mapping.
-------------------------------------------------­KUNBUS-COM - Fieldbus Outputmapping
-------------------------------------------------­Src Register Number 1 - 1521 (0x1401) | 3 2 - 4097 (0x1001) | 5 3 - 1 (0x0001) | 0 4 - 1 (0x0001) | 0 5 - 1 (0x0001) | 0 6 - 1 (0x0001) | 0 7 - 1 (0x0001) | 0 8 - 1 (0x0001) | 0
9 - Default Data: all zero 10 - Valid Time: disabled
-------------------------------------------------­>
The new mapping becomes active after a restart of the module. To perform a restart, you have the following options:
1. Switch the module off and on again.
2. [Esc] takes you to the CDI menu [2] "Interface Configuration". Here, enter [14] + [Return].
In CDI menu [2] "Interface Configuration" under menu item "Set Arbitrary Register" you now have the option to write the values in the SDI-In data area. The registers 0x1401 - 0x1500 are available to you for this purpose.
In menu [3] "Monitor Communication", under menu item " Arbitrary Register" you can view the fieldbus output register from address 0x2801.
NOTICE
Fault due to fine settings
Some settings lead to malfunctioning of the module.
If you already want to test some settings now, read section CDI Menus [}96]CDI Menus.
Also see about this
2 [}75]
2 Register for the Mapping [}75]
2 Setting up a Serial Connection [}93]
Components
KUNBUS-COM EtherCAT
28 / 135
4.4 Fieldbus Interface
The fieldbus interface connects the Modul to EtherCAT.
It also enables access to the fieldbus specific Memory Register.
You can find the overview of the available Modbus registers in the section "Overview of the Memory Register".
Also see about this
2 Overview of the Memory Register [}47]
2 Overview of the Memory Register [}47]
4.5 CDI - Configuration and Debug Interface
At the application interface, serial cables are available (RS232 interface with 3.3 V logic levels). You can connect these cables to a terminal or PC with terminal simulation (e.g. PuTTY) using an interface IC on the main board (see the application sample circuit diagram, Appendix 2). You can read and change parameters using structured menus. The CDI is also used for downloading scripts and firmware updates.
The CDI is suitable for configuration during the development and for diagnostic purposes. To configure several modules automatically, we recommend performing the settings with "Modpoll". "Modpoll" is freely-available software. You can find an introduction and example of this in the Appendix Configuration via Modpoll [}134].
The serial interface is located at the application interface. The respective cables are provided there with 3.3V logic levels. To connect these cables, you have the following options:
– Connect the cables directly with the UART inputs of the microprocessor
on the main board
– Convert the cables to standardised levels using level converters or
interface ICs. Afterwards, place the converted levels onto connectors for connecting a PC or terminal.
We deliver the Modul to you with the following default settings to enable access via the CDI :
• 115200 bit/s
• 8 data bits
• 1 stop bit
• Even parity (Even)
In section CDI Menus [}96], we have compiled a detailed description of the menus for you.
Components
KUNBUS-COM EtherCAT 29 / 135
4.6 DPR - Dual Port RAM
-The COMS-Modul contains a special memory module (RAM with 1
Kbyte length), whose memory addresses the processor of the module can also access, like an external processor, which is connected to the module via the DPR interface.
If the application where the COMS-Modul is used should exchange extensive data quickly, then this type of communication between the base board and COMS-Modul is ideal. This absolutely requires the use of a microprocessor on the base board, however, which operates the DPR interface.
Many pins of the application interface are required for this parallel access to the DPR. This results in a different PIN assignment in the DPR mode of the module (this is switched on and off via the logic level on PIN a14). In parallel access mode, no SSC or SDI interfaces are available.
The data exchange between application circuitry and the COMS­Modul via DPR can take place in two different ways:
– Process data is read in and read out cyclically from the Data Broker via
two fixed address ranges for input and output data. In this case, the DPR reacts like another communication interface, as a producer and consumer. The data is distributed according to the specifications set in the Data Broker.
– Messages are exchanged via two address ranges for an input and
output "mailbox" by means of defined handshaking. The messages include:
– Commands for writing and reading the memory registers
– Addresses of the memory registers
– Data lengths
– Register contents to be written or read
This communication via mailboxes replaces the Modbus communication via SDI in parallel access mode (which is not available in this mode). All parameters in parallel access mode can only be read or written via CDI interface or DPR mailboxes.
To enable these two types of communication, the 1Kbyte memory of the DualPortRAM interface is subdivided into five areas:
Dual Port RAM
Configuration Incoming
mailbox
Outgoing
mailbox
Process data
input
Process data
output
Components
KUNBUS-COM EtherCAT
30 / 135
The size of the individual areas can be adapted to the respective application and is saved non-volatile in parameter registers. The configuration area has a fixed length and provides the necessary address offsets as well as handshaking data for external access to the remaining areas.
We recommend using our Evaluation Board and the C source files provided with this as a template for developing the application side of a DPR interface. Upon request, we can also provide you with the documents and source codes of the Evaluation Board separately. Therefore, in this section we will only describe the basic procedure when using the DPR interface.
Each mailbox controls and coordinates the data transmission individually during communication by means of corresponding control values, length specifications and error codes in the relevant headers of the data packets. The process data of memory areas also coordinates the exchange of data between the base board and COMS module by means of a corresponding data header.
NOTICE
Important instructions on using the DPR
èYou can operate the KUNBUS-COMS module either in DPR mode or in
SPI/SSC mode.
ð You determine the mode by setting the logic level on PIN a14 (+3.3
V = 1 = SPI/SSC mode, GND = 0 = DPR mode). you will find information about the current interface mode in the CDI menu: "4 ­Module Status > 1 - Common Status"
èIf you use the Scripter [}44] in DPR mode, you must bear in mind that
the scripter can only communicate via the CDI.
ð Changes to parameter registers are then still only possible via the
DPR mailboxes.
Components
Loading...
+ 105 hidden pages