Stand: Messverstärker GSV-8 EtherCat Protokoll - PDF

Description
Stand: Messverstärker GSV-8 EtherCat Protokoll Inhaltsverzeichnis General...5 EtherCAT System Architecture...5 EtherCAT Protocol...6 EtherCAT Slave Architecture...6 EEPROM EtherCAT Slave Configuration...7

Please download to get full document.

View again

of 29
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information
Category:

Press Releases

Publish on:

Views: 10 | Pages: 29

Extension: PDF | Download: 0

Share
Transcript
Stand: Messverstärker GSV-8 EtherCat Protokoll Inhaltsverzeichnis General...5 EtherCAT System Architecture...5 EtherCAT Protocol...6 EtherCAT Slave Architecture...6 EEPROM EtherCAT Slave Configuration...7 States of an EtherCAT slave...7 EtherCAT Commands...8 Connection of the EtherCAT Wires...9 Error Messages...9 GSV-8 EtherCat Implementation...10 Object Dictionary...10 Index 1000h: Device Type...11 Index 1001h: Error Register...12 Index 1008h: Device Name...12 Index 1009h: Hardware Version...12 Index 100Ah: Software Version...12 Index 1018h: Identity...12 Sub-Index 1: Vendor ID...13 Sub-Index 2: Product Code...13 Sub-Index 3: Revision...13 Sub-Index 4: Serial Number...13 Index 10F1h: Error Settings (EtherCAT)...13 Sub-Index 1: Local Error Reaction...13 Sub-Index 2: Sync Error Counter Limit...14 Index 1A00h: TxPDO Map Dynamic PDO-Mapping...15 Index 1C00h: Sync Manager Type (EtherCAT)...15 Index 1C12h: RxPDO assign (Sync Manager / EtherCAT)...15 Index 1C13h: TxPDO Assign (Sync Manager / EtherCAT)...16 Index 1C32h: Sync Manager 2: Output Parameter (EtherCAT)...16 Sub-Index 1: Synchronization Type...17 Sub-Index 2: Cycle Time...17 Sub-Index 4: Synchronization Types supported...17 Sub-Index 5: Minimum Cycle Time...17 Sub-Index 6: Calc and Copy Time...17 Sub-Index 8: Get Cycle Time...17 Sub-Index 9: Delay Time...17 Sub-Index 10: Sync0 Cycle Time...17 Sub-Index 11: SyncManager Event missed...17 Sub-Index 12: Cycle Time Too Small...17 Sub-Index 32: Sync Error...18 Index 1C33h: Sync Manager 3: Input Parameter (EtherCAT)...18 Sub-Index 1: Synchronization Type...18 Sub-Index 2: Cycle Time...18 Sub-Index 4: Synchronization Types supported...18 Sub-Index 5: Minimum Cycle Time...18 Sub-Index 6: Calc and Copy Time...19 Tel +49 (0) , Fax +49 (0) , 3 Sub-Index 8: Get Cycle Time...19 Sub-Index 9: Delay Time...19 Sub-Index 10: Sync0 Cycle Time...19 Sub-Index 11: SyncManager Event missed...19 Sub-Index 12: Cycle Time Too Small...19 Sub-Index 32: Sync Error...19 Index 6112h: AI Operating mode...19 Index 6114h: AI ADC Sample Rate...20 Index 6125h: AI Autozero...20 Index 6126h: AI Scaling factor...21 Index 6127h: AI Scaling offset...21 Index 6130h: AI Process Value...22 Index 6148h: AI Span start...23 Index 6149h: AI Span end...23 Index 6150h: AI Status...23 Index 61A0h: AI Filter type...24 Index 61A1h: AI Filter constant...24 Index 9100h: AI Field Value...25 Subject to modifications...26 Trademarks and Patents Tel +49 (0) , Fax +49 (0) , General Besides the default USB interface the GSV-8-EtherCAT offers an additional EtherCAT interface. The application layer is implemented according to the EtherCAT standard. The EtherCAT protocol is defined in IEC The EtherCAT protocol uses standard Ethernet frames with Ether-type 0x88A4. An EtherCAT telegram may consist of several sub telegrams, the so called EtherCAT commands. Most of the device configurations are done via the EtherCAT commands. EtherCAT Overview An EtherCAT network is built of a master and one or more slaves. While the master is usually built of a powerful PC the slaves are optimized for the fast transfer of the process data from and to the several control units. The algorithms to process the data transfer are implemented on the PC. The main features of EtherCAT are: A broad applicability. As EtherCAT master every commercially available computer with a normal Ethernet controller can be used. Compliance to the Ethernet standard. EtherCAT is fully compliant to the Ethernet standard and can coexist with other Ethernet devices on the same bus. Highest efficiency. The Ethernet bandwidth is nearly fully usable. Short cycle times. The EtherCAT cycle times are typically in the range of µs. Variety of bus topologies. EtherCAT supports a huge variety of bus topologies, e. g. line, ring, star, etc., thus supporting redundancy; hot connect of segments and device exchange in an active network. EtherCAT System Architecture On the perspective of the normal Ethernet topology the EtherCAT bus shows up as a single Ethernet participant. Within this participant however there is no Ethernet controller with an application processor but rather several EtherCAT slaves. As shown in Figure the EtherCAT master uses the network configuration which is stored in the EtherCAT Network Information file (ENI). The ENI is created by the EtherCAT Configuration Tool based on the EtherCAT Slave Information (ESI), which is provided for every device by the vendor (for GSV-8: GSV8EtherCat VerNo rev RevNo .xml, available on www-me-systeme.de). The slaves are connected via standard Ethernet cables. The EtherCAT master system just requires a standard Network Interface Controller (NIC, 100 Mbit/s Full duplex) and a real time run-time environment that drives the slaves in the network. Figure : EtherCAT Network Architecture Tel +49 (0) , Fax +49 (0) , 5 The slaves process the data on the fly while receiving them and putting appropriate process data into the stream in the same instance. I. e. the data stream is not copied first than processed and finally an answer is sent back. In fact the whole processing takes place in one step while the stream is running through a slave device, thus the whole frame is delayed by just a few bits. Figure shows this principle. Figure : EtherCAT communication principle Each slave device holds an addressable 64kByte RAM area that can be read or written to or even read and written in the same cycle. There may be multiple EtherCAT commands within one Ethernet frame to address or read/write individual slave devices. EtherCAT Protocol The EtherCat commands were transferred in the datagram area of an Ethernet frame as shown in Figure. Since the EtherType is set to 0x88A4 to identify an EtherCAT frame they will not pass any router. The GSV-8 only supports the Direct Mode Addressing, i.e. the IP address and MAC of an Ethernet frame is ignored. Each EtherCAT datagram consists of the datagram header, the data and the so called working counter (WKC). The working counter is incremented by every device that is addressed by an EtherCAT command. Figure : EtherCAT protocol frame Field Value / Description Length Length of the EtherCAT datagrams (excl. FCS) Res Reserved, 0 Type Protocol Type. Only EtherCAT commands (Type = 0x01) are supported by ESCs Cmd EtherCAT Command Type Idx The index is a numeric identifier used by the master for identification of duplicates / lost datagrams that shall not be changed by the slaves. Table : EtherCAT field descriptions EtherCAT Slave Architecture The main components of the EtherCAT slaves are: 6 Tel +49 (0) , Fax +49 (0) , Physical Layer: Network interface Data Link Layer: EtherCAT Slave Controller (ESC, communication module) and EEPROM Application Layer: Application controller or microcontroller Figure : EtherCAT Slave Architecture The ESC is a hardware module for EtherCAT communication. The ESC handles the EtherCAT protocol in real-time by processing the EtherCAT frames on the fly and providing the interface for data exchange between the EtherCAT master and the slave s local application controller via registers and a DPRAM. The ESC processes EtherCAT frames on the fly and exchanges data with the local controller of the GSV-8, which processes the measuring data. EEPROM EtherCAT Slave Configuration Since the DPRAM in the ESC is a volatile RAM, it also has an EEPROM (NVRAM, also called Slave Information Interface, SII). The EEPROM stores slave identity information and information about the slave's functionality corresponding to the ESI file, see Figure. The content of the EEPROM is configured by the manufacturer with necessary (default) settings. EEPROM information can be derived from the ESI file. Figure : EEPROM Registers States of an EtherCAT slave The slave runs a state machine to indicate which functionalities are actually available. This EtherCAT State Machine (ESM) is shown in Figure. ESM requests are written by the master to the slave s AL Control register in the ESC. If the configuration for the requested state is valid, the slave acknowledges the state by setting the AL Status register. If not, the slave sets the error flag in the AL Status register and writes an error code to the AL Status Code register. Figure : EtherCAT Slave State Machine State INIT PREOP SAFEOP OP Available Functions Init state. No communication on the application layer is available. The master has access only to the DL-information registers. Pre-Operational state. Mailbox communication on the application layer available, but no process data communication available. Safe-Operational state. Mailbox communication on the application layer, process (input) data communication available. In SafeOp only inputs like measuring values are evaluated; outputs are kept in safe state. Operational state. Process data inputs and outputs are valid. Tel +49 (0) , Fax +49 (0) , 7 BOOT Bootstrap state. Optional but recommended if firmware updates necessary No process data communication. Communication only via mailbox on Application Layer available. Special mailbox configuration is possible, e.g. larger mailbox size. (In this state some devices use the FoE protocol for firmware download, but not the GSV-8) Table : EtherCAT slave states The initialization information of every EtherCAT state transition is derived from the ESI by a network configurator and stored in the network information file (ENI). Each slave gets its required initialization commands for each state transition. The EtherCAT master initializes the slave(s) using this ENI, e.g. logical slave I/O mapping is done according to the network topology. EtherCAT Commands All supported EtherCAT Command types are listed in table below. For Read-write operations, the Read operation is performed before the Write operation. CMD Abbr. Name Description 0 NOP No operation Slave ignores command 1 APRD Auto Increment Read Slave increments address. Slave puts read data into the EtherCAT datagram if received address is zero. 2 APWR Auto Increment Write Slave increments address. Slave writes data into memory location if received address is zero. 3 APRW Auto Increment R/W Slave increments address. Slave puts read data into the EtherCAT datagram and writes the data into the same memory location if received address is zero. 4 FPRD Configured Address Read 5 FPWR Configured Address Write 6 FPRW Configured Address R/W Slave puts read data into the EtherCAT datagram if address matches with one of its configured addresses. Slave writes data into memory location if address matches with one of its configured addresses Slave puts read data into the EtherCAT datagram and writes data into the same memory location if address matches with one of its configured addresses. 7 BRD Broadcast Read All slaves put logical OR of data of the memory area and data of the EtherCAT datagram into the EtherCAT datagram. All slaves increment position field. 8 BRW Broadcast Write All slaves write data into memory location. All slaves increment position field. 8 Tel +49 (0) , Fax +49 (0) , CMD Abbr. Name Description 9 BRW Broadcast R/W All slaves put logical OR of data of the memory area and data of the EtherCAT datagram into the EtherCAT datagram, and write data into memory location. BRW is typically not used. All slaves increment position field. 10 LRD Logical Memory Read Slave puts read data into the EtherCAT datagram if received address matches with one of the configured FMMU areas for reading. 11 LWR Logical Memory Write Slaves writes data to into memory location if received address matches with one of the configured FMMU areas for writing. 12 LRW Logical Memory R/W Slave puts read data into the EtherCAT datagram if received address matches with one of the configured FMMU areas for reading. Slaves writes data to into memory location if received address matches with one of the configured FMMU areas for writing. 13 ARMW Auto Increment Read Multiple Write Table : EtherCAT Commands Connection of the EtherCAT Wires Slave increments address. Slave puts read data into the EtherCAT datagram if received address is zero, otherwise slave writes the data into memory location. EtherCAT uses default Ethernet cables and RJ45 connectors. The connection Port0 is used for the connection towards the EtherCAT-Master, Port1 to connect more Slaves. Error Messages These error codes are returned by the Mailbox/SDO when accessing the Object Dictionary. Error Code (hex) Meaning Command Byte invalid or unknown Unsupported access to an object Attempt to read a write only object Attempt to write a read only object Object does not exist in the object dictionary General parameter incompatibility reason Access failed due to an hardware error Tel +49 (0) , Fax +49 (0) , 9 Error Code (hex) Meaning Data type does not match, length of service parameter too high Data type does not match, length of service parameter too low sub-index does not exist Invalid value for parameter (download only) Value of parameter too high (download only) Value of parameter too low (download only) General error Data cannot be transferred or stored to the application Data cannot be transferred or stored to the application in the present device state No data available Table : Mailbox/SDO Error Codes GSV-8 EtherCat Implementation The GSV-8 measuring amplifier has eight analogue inputs, which are digitized with a 24 Bit Sigma-Delta analog-to-digital converter, who converts all channels simultaneously. In conjunction with the buffered-mode Sync-Manager of the EtherCat interface, the data of the eight channels representing the excitation of the plugged sensors belong exactly to the same point of time. The rate, with which the measuring controller updates the values, is configurable from 0.75 to values/second. The GSV-8 implements the CoE CanOpen 404 device profile, which is used for measuring devices. Most configuration parameters can be accessed through objects communicated through the Sync-Manager's mailbox mode. The objects are identified by indices, which in itself are sub-divided into sub-indices. Sub-indices 1 to 8 often refer to the corresponding analogue input channel configuration. Object Dictionary This chapter specifies the objects of the GSV-8-EtherCAT implementation. Index (Hex) Name Type 1000 Device Type Communication 1001 Error Register Communication 1008 Device Name Communication 1009 Hardware Version Communication 100A Software Version Communication 1018 Identity Object Communication 10F1 Error Settings Communication 1A00 Tx PDO 1 Mapping Parameter Communication 10 Tel +49 (0) , Fax +49 (0) , Index (Hex) Name Type 1C00 Sync Manager Type Communication 1C12 RxPDO Assign Communication 1C13 TxPDO Assign Communication 1C32 SyncManager Output Parameter Communication 1C33 SyncManager Input Parameter Communication 6112 AI Operating Mode Application, Analog Input 6114 Al ADC sample rate Application, Analog Input 6125 AI Autozero Application, Analog Input 6126 AI Scaling Factor Application, Analog Input 6127 AI Scaling Offset Application, Analog Input 6130 AI Process Value Float Application, Analog Input 6148 AI Span Start Float Application, Analog Input 6149 AI Span End Float Application, Analog Input 6150 AI Status Application, Analog Input 61A0 AI Filter Type Application, Analog Input 61A1 AI Filter constant Application, Analog Input 9100 AI Field Value Application, Analog Input Table : Object Dictionary Index 1000h: Device Type This object describes the device type and which profile the device is conforming to. Sub-Index Data Type Access Description Default value 0 Unsigned32 ro Device Type/Profile 0x Table : Index 1000h This object is read-only and only implements the sub-index 0. Any other access will result in an error. The value 0x contains the following two fields: Device Profile Number 0194h = 404d Additional Information 0022h = b The device is claiming conformity to the CiA404 Measuring Device Profile and that the following function blocks are present: Bit 16: Digital input (optionally) Bit 17: Analogue input block (always present in standard GSV-8) Bit 18: Digital output (optionally) Bit 21: Alarm block (optionally) Bit 31: Device-specific PDO-Mapping (always set) Tel +49 (0) , Fax +49 (0) , 11 Index 1001h: Error Register This object describes the device Error state. Sub-Index Data Type Access Description Default value 0 Unsigned8 ro Error flags 0x00 Table : Index 1001h This object is read-only and only implements the sub-index 0. Any other access will result in an error. Of these flags the following are implemented: Bit 0: Generic Error. This flag will be 1 on any error and 0 if there is none. Index 1008h: Device Name This object contains the device name. 0 String(5) ro Device Name GSV-8 Table : Index 1008h This object is read-only and only implements the sub-index 0. Any other access will result in an error. Index 1009h: Hardware Version This object contains the hardware version string. 0 String(2) ro Hardware version 01 Table : Index 1009h This object is read-only and only implements the sub-index 0. Any other access will result in an error. Index 100Ah: Software Version This object contains the software version string. 0 String(5) ro Software version 01.02 Table : Index 100Ah This object is read-only and only implements the sub-index 0. Any other access will result in an error. Index 1018h: Identity This object contains the device identity. 12 Tel +49 (0) , Fax +49 (0) , 0 Unsigned8 ro Highest sub-index 0x04 1 Unsigned32 ro Vendor ID 0x Unsigned32 ro Product code 0x Unsigned32 ro Revision 0x Unsigned32 ro Serial number - Table : Index 1018h This object is read-only and only implements the sub-index 0 to 4. Any other access will result in an error. Sub-Index 1: Vendor ID The vendor ID is a unique manufacturer identification number assigned by the EtherCAT association. ME Meßsysteme GmbH has the vendor ID = 0270h Sub-Index 2: Product Code The product code is a unique identification number of the product assigned by the vendor h is the code for GSV-8 Sub-Index 3: Revision The revision is currently the binary equivalent to the software version (100Ah). Sub-Index 4: Serial Number The number in its decimal representation, prepended with zeros if the representation has less than 8 digits, can be found on the device s specification plate. Index 10F1h: Error Settings (EtherCAT) This object contains the EtherCAT error setting. 0 Unsigned8 ro Highest sub-index 0x02 1 Unsigned32 rw Local Error Reaction 0x Unsigned32 rw Sync Error Counter Limit 0x Table : Index 10F1h This object is read-only on sub-index 0 and read/write on sub-index 1 to 8. Any other access will result in an error. Sub-Index 1: Local Error Reaction The Local Error Reaction defines how the slave shall behave if a local error occurs. (1) PDO state (2) Disable SyncManager (3) Device specific state Tel +49 (0) , Fax +49 (0) , 13 The default setting is to report the error via PDO state. Sub-Index 2: Sync Error Counter Limit The Sync Error Counter is incremented with every missing Sync Management Event and decremented if an event is received. If the Sync Error Counter exceeds this limit the system changes into the SAFEOP state with the Synchronization Lost error. The Sync Error Counter is reset when the error was acknowledged. Index 1A00h: TxPDO Map 1 This object contains the transmit PDO mapping; the description which object value has to be transmitted on request from the EtherCAT master. 0 Unsigned8 rw Highest sub-index 0x10 1 Unsigned32 rw Mapping Object 1 0x Unsigned32 rw Mapping Object 2 0x Unsigned32 rw Mapping Object 3 0x Unsigned32 rw Mapping Object 4 0x Unsigned32 rw Mapping Object 5 0x Unsigned32 rw Mapping Object 6 0x Unsigned32 rw Mapping Object 7 0x Unsigned32 rw Mapping Object 8 0x Unsigned32 rw Mapping Object 9 0x Unsigned32 rw Mapping Object 10 0x Unsigned32 rw Mapping Object 11 0x Unsigned32 rw Mapping Object 12 0x Unsigned32 rw Mapping Object 13 0x Unsigned32 rw Mapping Object 14 0x Unsigned32 rw Mapping Object 15 0x Unsigned32 rw Mapping Object 16 0x Table :
Related Search
Similar documents
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks