Sercos- Data Types

Summary

And datas in a slave that can be accessed by the host is represented by a data block. Data blocks are assigned identification numbers (IDNs or "ID numbers"). The data block consists of information about the data; for example, IDNumber, name, attributes, units, min and max values, and the operation data itself.

 

Data Block Structure

The SERCOS protocol is designed to handle many different types of data, characterized by two fundamental types: fixed length data and variable length data.

Fixed length data is either 2 bytes or 4 bytes wide and can be used to represent signed or unsigned integers, hexadecimal values, binary codes, IDNumbers (identification numbers) of other Data Blocks, and procedure commands.

The length of variable length data depends on what type of data is present, and is defined by the first two words (32 bits), which specify the actual and maximum length of the data. Variable length data can be used to represent character strings, lists of IDNumbers of Data Blocks, lists of signed or unsigned integers (both 2 or 4 bytes wide), lists of hexadecimal values, etc.

All data (fixed and variable length) can be sent or received via the Service Channel. However, only fixed length data is allowed to be configured into a communication telegram (MDT, AT). When a communication telegram is configured to send or receive fixed length data, it is only Element 7 data that will be either sent or received.

 

Data Block Structure of IDNs

Data is accessed through data blocks referred to as IDNs. An IDN consists of seven elements:
Element 1 IDNumber
Element 2 Name
Element 3 Attribute
Element 4 Unit
Element 5 Minimum Input
Element 6 Maximum Input
Element 7 Operation Date
All data exchanged between Master and Slaves has an IDNumber (IDN number) assigned to it. Every IDN has an associated data block which consists of seven elements. The Master can only write Element 7 data; the Master cannot write Elements 1 - 6. Elements 1 - 6 are defined by the drive itself.
Element Description Data Type
1
IDNumber (Identification number) binary
Expressed as either S-X-XXXX or P-X-XXXX. S denotes IDNs that are defined by the SERCOS Specification. P denotes IDNs that are defined by the manufacturer of the device.
2
Name variable length string
Contains the name of the IDN.
3
Attribute 32 bit binary
Contains information about conversion factors and data representation (signed or unsigned integer, fixed or variable length data, etc.)
4
Unit variable length string
Contains a representation of the units for the data.
5
Minimum input value 1 or 2 words
6
Maximum input value 1 or 2 words
7
Operation Data 1 or 2 words, or string
 

Element 1: IDNumbers

Each Data Block has a number assigned to it for identification purposes, called the IDNumber. The IDNumber is represented as either S-X-XXXX or P-X-XXXX. S denotes a Data Block that is defined by the SERCOS Specification. P denotes a Data Block that is defined by the manufacturer. The first 'X' identifies the "data set" that the Data Block belongs to. According to the SERCOS Specification, it is possible to switch between data sets.

Bits Name Values
15
Type of IDN 0 S - Standard data
1 P - Product-specific data as the "S" or "P" part of the IDN notation S-y-zzzz or P-y-zzzz.
14-12
Parameter Set 0 - 7, as the "y" part of the IDN notation S-y-zzzz or P-y-zzzz.
11-0
Data Block Number 0 - 4095, as the "zzzz" part of the IDN notation S-y-zzzz or P-y-zzzz.
 

Element 2: Name of Operation Data

The name of operation data is 64 bytes maximum, with 2 length specifications of 2 bytes each, and a character string of 60 characters maximum. Bytes 1 and 2 contain the number of characters in the text. Bytes 3 and 4 contain the maximum number of characters in the text. Since this element is READ-Only, bytes 3 and 4 will contain the same values as bytes 1 and 2.

Element 3: Attributes of Operation Data

Every data block has an attribute (4 bytes) which contains all of the information required to display operation data, using universal routines. If data needs to be scaled (to be displayed), then specific scaling parameters are supplied in the attribute.

Bits Name Values
31
Reserved  
30
Phase 4 write-protection bit. 1 = write-protected
29
Phase 3 write-protection bit. 1 = write-protected
28
Phase 2 write-protection bit. 1 = write-protected
27-24
Number of places after the decimal point Indicates the position of the decimal point in the data to be displayed. Basically, it's the exponent "x" in 10-x. 000 No places after decimal point
001 1 place after decimal point
010 2 places after decimal point *
111 15 places after decimal point
23
Reserved  
22-20
Data Type & Display Format Used to convert the operation data, and min/max input values to the correct display format. Data Type
000 binary number
001 unsigned integer
010 integer
011 unsigned integer
100 extended char set
101 unsigned integer
010 Reserved
111 Reserved
Display Format
binary
unsigned decimal
signed decimal hexadecimal
text
IDN number

19

Function of Operation Data


Indicates whether this data calls a procedure in a drive



0 Operation data or parameter 1 Procedure command

18-16

Data Length

The data length is required so that the Master is able to complete Service Channel data transfers correctly.

000 Reserved
001 Operation data is 2 bytes long
010 Operation data is 4 bytes long
011 Reserved
100 Variable length with 1-byte data strings
101 Variable length with 2-byte data strings
110 Variable length with 4-byte data strings
111 Reserved
15-0
Conversion Factor An unsigned integer used to convert numeric data to display format. Is set to 1 when it is not needed for data display (e.g., binary display or a character string).

Element 4: Operation Data Unit

The operation data unit is 16 bytes maximum, with 2 length specifications of 2 bytes each, and a character string of 12 characters maximum. Bytes 1 and 2 contain the number of characters in the text. Bytes 3 and 4 contain the maximum number of characters in the text. Since this element is READ-Only, bytes 3 and 4 will contain the same values as bytes 1 and 2.

 

Element 5: Minimum Input Value of Operation Data

The minimum input value is the smallest numerical value for operation data that the drive can process. When the Master writes a value to the drive that is less than the minimum value, the drive ignores it and continues to use the previous operation data.

When the operation data is of variable length or a binary number is used, there is no minimum input value of operation data.

 

Element 6: Maximum Input Value of Operation Data

The maximum input value is the largest numerical value for operation data that the drive can process. When the Master writes a value to the drive that is more than the maximum value, the drive ignores it and continues to use the previous operation data.

When the operation data is of variable length or a binary number is used, there is no maximum input value of operation data.

 

Element 7: Operation Data

In terms of length, there are 3 types of operation data:

    • fixed length with 2 bytes
    • fixed length with 4 bytes
    • variable length up to 65,532 bytes in 1 byte (char), 2 byte, or 4 byte values

Bytes 1 and 2 contain the number of bytes in the text. Bytes 3 and 4 contain the max number of bytes available in the text. Data in the text may be 1 byte, 2 bytes, or 4 bytes wide.