1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Bsi bs en 50325 2 2001

126 1 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Industrial Communications Subsystem Based On ISO 11898 (CAN) For Controller-Device Interfaces — Part 2: Devicenet
Trường học British Standards Institution
Chuyên ngành Industrial Communications
Thể loại British standard
Năm xuất bản 2001
Thành phố Brussels
Định dạng
Số trang 126
Dung lượng 1,35 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Cấu trúc

  • 4.1 General (13)
  • 4.2 DeviceNet communication model (14)
  • 4.3 DeviceNet and CAN (14)
  • 5.1 DeviceNet connections (15)
  • 5.2 DeviceNet messaging protocol (17)
  • 5.3 DeviceNet communication object classes (32)
  • 5.4 Network access state machine (56)
  • 5.5 Predefined master/slave connection set (59)
  • 5.6 Physical layer (68)
  • 6.1 Instructions for installation, operation and maintenance (72)
  • 6.2 Marking (72)
  • 7.1 Normal service conditions (72)
  • 7.2 Conditions during transport and storage (73)
  • 7.3 Mounting (73)
  • 8.1 Indicators and configuration switches (74)
  • 8.2 DeviceNet cable (76)
  • 8.3 Terminating resistors (77)
  • 8.4 Connectors (77)
  • 8.5 Device taps and power taps (78)
  • 8.6 Network powered devices (79)
  • 8.7 Miswiring protection (80)
  • 8.8 Power supplies (80)
  • 8.9 Electromagnetic compatibility (80)
  • 9.1 General (82)
  • 9.2 Electrical and EMC testing (82)
  • 9.3 Logical testing (89)
  • A.1 DeviceNet service codes and names (92)
  • A.2 Common service definitions (92)
  • C.1 General (99)
  • C.2 Segment type format (99)
  • C.3 Segment definition rules (101)
  • D.1 Data type specification (102)
  • D.2 Data type encoding (103)
  • E.1 General (105)
  • E.2 Object Class Codes (105)
  • E.3 Identity object (class code: 01 hex ) (105)
  • E.4 Message router object (class code: 02 hex ) (111)
  • E.5 DeviceNet object (class code: 03 hex ) (114)
  • E.6 DeviceNet connection object (class code: 05 hex ) (114)
  • E.7 Acknowledge handler object (class code: 2B hex ) (114)

Nội dung

5.2 DeviceNet messaging prot ocol Service Specific Data Figure 4 - Explicit message CAN data field use Figure 5 provides the format of the CAN data field associated with explicit message

General

DeviceNet interfaces are designed to control circuit devices and switching elements using two twisted shielded conductor pairs within a single cable One pair facilitates differential communication, while the other supplies power, supporting a maximum current of 8 A at DC 24 V Data transmission occurs at bit rates of 125 kBit/s, 250 kBit/s, or 500 kBit/s, with maximum cable lengths of 500 m, 250 m, and 100 m, respectively The system allows for the transmission of up to 8 bytes of data without fragmentation and can connect a maximum of 64 nodes in a linear network topology DeviceNet supports various data types, including I/O data, diagnostics, messaging, and programming/configuration, with data exchange methods that can be event-driven, cyclic, polled, or multicast.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

Part 2 of EN 50325 outlines a connection-based scheme designed to enhance communication across various applications The DeviceNet connection establishes a communication pathway among multiple endpoints, which are applications that require data sharing Each transmission linked to a specific connection is assigned a unique identification value, known as the Connection ID (CID), upon the establishment of the connection.

Connection objects model the communication characteristics of a particular application-to-application(s) relationship.

DeviceNet utilizes a connection-based scheme that enables the establishment of two primary types of connections The first type is I/O connections, which create dedicated communication paths specifically designed for the transfer of application-specific I/O data between a producing application and one or more consuming applications.

I/O messages are exchanged across I/O connections An I/O message consists of a CID and associated I/O data The connection end-points shall have knowledge of the intended use or meaning of the I/O message.

Part 2 of EN 50325 does not specify a particular application for I/O messaging, which can serve a diverse range of functions The meaning and intended use of all I/O messages must be communicated to the system, either through the specific product type sending the I/O message or via configuration using explicit messaging Explicit messaging connections offer generic, multi-purpose communication pathways between devices, facilitating typical request/response oriented network communications.

Explicit messages are exchanged across explicit messaging connections Explicit messages are used to command the performance of a particular task and to report the results of performing the task.

DeviceNet defines an explicit messaging protocol that states the meaning of the message An explicit message consists of a CID and associated messaging protocol information.

The rules that govern the dynamic establishment of these connections are used as a foundation upon which a predefined set of connections is defined.

DeviceNet communication model

The abstract object-oriented communication model of a DeviceNet node encompasses several key components: the Unconnected Message Manager (UCMM) which processes unconnected explicit messages; the Identity object that identifies the device and provides general information; the Connection class that allocates and manages resources for I/O and explicit messaging connections; the Connection object that oversees communication aspects of specific application-to-application relationships; the DeviceNet object that offers configuration and status for the physical DeviceNet network connection; the Message router that directs explicit request messages to the correct object; and the Application objects that fulfill the product's intended purpose.

DeviceNet and CAN

DeviceNet is based on ISO 11898 and uses the Controller Area Network (CAN) technology.

NOTE See CAN Specification - Version 2.0, Part A : Sept 1991, Robert Bosch GmbH.

The relationships between DeviceNet, CAN and the OSI reference model (ISO/IEC 7498-1) are shown in Figure 2.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

Figure 2 – DeviceNet protocol architecture compared with the OSI reference model

DeviceNet connections

DeviceNet is a connection-based network that facilitates logical paths between various applications Each established connection is assigned a unique Connection ID (CID) for its transmissions In cases of bi-directional exchanges, two distinct CID values are assigned to manage the connections effectively.

DeviceNet uses the CAN identifier field and defines the steps involved in the dynamic establishment of I/O and explicit messaging connections.

5.1.2 DeviceNet’s use of the CA N identifier field

The 11 CAN identifier bits available within DeviceNet are subdivided into four separate message groups: Group 1, Group 2, Group 3, and Group 4.

For connection based messages, the CID is placed within the CAN identifier field Figure 3 also describes the components of a DeviceNet CID.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

1 1 Group 3 Message ID Source MAC ID 600 - 7bf Message Group 3

Figure 3 - DeviceNet’s use of the CAN identifier field

The CAN identifier field on DeviceNet includes several key components: the Message ID, which identifies a message within a specific node's message group and is used alongside the MAC ID to generate a Connection Identifier (CID) upon connection; the Source MAC ID, which is required for Groups 1 and 3; and the MAC ID, which in Message Group 2 can specify either the source or destination within the CAN identifier field.

Both explicit messaging and I/O connections may be established in message Groups 1, 2 and 3.

Group 2 message ID 6 is designated for configuring communications in a master/slave application, while Group 2 message ID 7 is utilized for detecting nodes with identical MAC IDs.

Group 3 message ID values 5, 6, and 7 serve specific purposes: ID 5 is designated for responses related to unconnected explicit messaging requests, ID 6 is utilized for sending unconnected explicit messaging requests, while ID 7 is invalid and should not be used.

Group 4 is reserved for future use.

5.1.3.1 Explicit messaging connec tions and the UCMM

Message Group 3 outlines the identifier codings necessary for unconnected explicit messaging, which facilitates the establishment and management of explicit messaging connections Unconnected request messages are defined by sending a Group 3 message with a message ID set to 6 The only permissible services for unconnected explicit request messages include the open explicit messaging connection request and the close connection request.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

Responses to unconnected explicit requests are transmitted as unconnected response messages.

Unconnected response messages are defined by sending a Group 3 message with a message ID of 5 The valid services that can be sent as unconnected explicit response messages include the open explicit messaging connection response, the close connection response, and the error response.

I/O connections are dynamically established by interfacing with the connection class across a previously established explicit messaging connection A connection instance shall be created and configured at each node.

DeviceNet messaging protocol

This subclause describes the explicit messaging protocol and presents details associated with the dynamic establishment of explicit messaging connections (see Figure 4).

Figure 4 - Explicit message CAN data field use

Figure 5 provides the format of the CAN data field associated with explicit messages:

Figure 5 - Explicit message data field format

The data field of a transmission that contains the complete explicit message includes: ắ a message header; ắ the entire message body.

When an explicit message exceeds eight bytes, it must be transmitted in fragments The connection object facilitates the fragmentation and re-assembly process, with each fragment containing a message header.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI ắ the fragmentation protocol (see 5.2.3.2); ắ a message body fragment.

The message header is located within byte offset zero in the CAN data field of an explicit message and shall be formatted as shown in Figure 6:

Figure 6 - Explicit message header format

Message header contents: ắ Frag (fragment bit): Indicates whether or not this transmission is a piece of a fragmented explicit message.

The fragmented ắ XID (Transaction ID) is used by applications to correlate responses with their corresponding requests, and it is echoed by the server in response messages However, the server module does not use this field for duplicate message detection Additionally, the ắ MAC ID field includes either the source or destination MAC ID.

Upon receiving an explicit message, the MAC ID field in the header is checked If the destination MAC ID matches the CID, the source MAC ID from the other endpoint is included in the header Conversely, if the source MAC ID is in the CID, the receiving module's MAC ID is specified in the header If neither condition is met, the message is discarded.

The message body contains a service field and service specific arguments.

The first argument specified within the message body is the service field, which identifies the particular request or response being delivered Figure 7 illustrates the format of the service field.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

The service field contains crucial information, including the service code, which is defined by the least significant 7 bits of the service field byte and indicates the type of service being transmitted Additionally, the most significant bit, known as R/R, determines whether the message is a request or a response.

DeviceNet defines a set of common services DeviceNet common services are the open set whose parameters and required behaviours are defined in this document (see Annex A).

Information following the service field is specific to the particular type of service being transmitted.

The transmission consists of a fragmented explicit message, which includes a message header, a fragmentation protocol, and a fragment of the message body The fragmentation protocol is essential for breaking down and reassembling explicit messages that exceed 8 bytes in size.

The Unconnected Message Manager (UCMM) enables the dynamic creation of explicit messaging connections This section outlines the specific service arguments related to the open and close connection services offered by the UCMM For test specifications on establishing explicit messaging connections, refer to section 9.3.3.

The UCMM handles two key services for managing explicit messaging connections: the "Open explicit messaging connection" service, identified by the code 4Bhex, is utilized to establish a new connection, while the "Close connection" service, with the code 4Chex, is responsible for deleting a connection object and freeing all related resources.

Unconnected explicit request and response services utilize specific CAN identifier fields for access During the processing of an unconnected explicit request, the UCMM may need to send an error indication back to the requester, which is communicated through an explicit error response message using the unconnected explicit response CAN identifier.

5.2.1.5.2 Open explicit messaging c onnection request

This service establishes a logical connection between two nodes for the transmission of explicit messages, utilizing an unconnected request message (Group 3, Message ID 6).

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

Requested Message Body Format Group Select Source Message Reserved (All Bits = 0)

Figure 8 - Open explicit messaging connection request format

The open explicit messaging connection request includes several key components: the transaction ID and MAC ID, as detailed in section 5.2.1.2, with the destination MAC ID specified in the message header The R/R bit is set to zero, indicating that this is a request message The service code, represented as 4Bhex, identifies the message as part of the open explicit messaging connection service Additionally, the reserved bits must be set to zero by the transmitter Finally, the requested message body format field allows the client to specify the desired format for subsequent explicit messages transmitted over the connection.

The server node handling the open explicit messaging request specifies the message body format for the connection, as detailed in Table 1 Servers must either refuse the request and provide the corresponding format value in the response or accept the request by echoing the same format value in the response.

Table 1 - Message body format values

0 DeviceNet (8/8) Class = 8 bit integer, Instance ID = 8 bit integer 1)

1 DeviceNet (8/16) Class = 8 bit integer, Instance ID = 16 bit integer 2)

2 DeviceNet (16/16) Class = 16 bit integer Instance ID = 16 bit integer 3)

3 DeviceNet (16/8) Class = 16 bit integer Instance ID = 8 bit integer 4)

4 - F hex Reserved NOTE: Messages transmitted across this connection are formatted as described in 5.2.1.6.

1) The class and instance ID fields are specified as 8 bit integers (USINT).

2) The class ID is specified as an 8 bit integer (USINT) and the instance ID is specified as a 16 bit integer (UINT).

3) The class and instance ID fields are specified 16 bit field integers (UINT).

4) The Class ID is specified as a 16 bit integer (UINT) and the instance ID is specified as an 8 bit integer (USINT).

The field specifies the message group for exchanging messages related to this connection, with the corresponding values detailed in Table 2.

The Group 2 identifier enables the specification of either the source or destination MAC ID When establishing explicit messaging connections, the client includes the server's MAC ID in the connection ID for message transmission, while the server uses its own MAC ID in the connection ID for its outgoing messages This necessitates the server to allocate two distinct message IDs from its Group 2 pool.

The client chooses the message group for the transmissions related to the specific messaging connection If the server is unable to fulfill the request, it will reject it and provide an error response The source message ID's usage is contingent upon the value in the group select field.

Table 3 - Source message ID in open explicit messaging connection request

If Group select equals: Then the source message ID:

The message ID, either 0 or 3, is designated by the client from its Group 1 or 3 message ID pool This ID, along with the client's MAC ID, is utilized to create the connection ID required for transmitting messages over the connection.

1 Is ignored/set to the value zero (0) 2)

1) The client places this value within the message ID component of the message Group 1 or 3 Identifier.

DeviceNet communication object classes

DeviceNet communication objects facilitate message exchange, with detailed services, attributes, and behaviors outlined in this section For further information, refer to Annex D for DeviceNet data type specifications and encoding, and Annex E for definitions of auxiliary communication objects.

5.3.2 Connection object class d efinition (Class ID code: 5)

The connection class is responsible for allocating and managing internal resources related to I/O and explicit messaging connections Each specific instance created by this class is known as a connection instance or connection object.

The connection class attribute is defined in Table 8.

1 Optional Get revision UINT Revision of the connection class definition upon which the implementation is based.

The attribute shall be set to 1.

All other attributes are reserved.

The connection class supports the following DeviceNet common services: (as described in Table 9)

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

Optional Create Creates a connection object

Optional Delete Deletes all connection objects and releases all associated resources When the delete service is sent to the connection class, all instances are deleted.

Optional Reset Resets all resettable connection objects The conditions under which a connection is resettable are listed in the state event matrix in Table 20

Optional Find_next_ object_instance

Searches for instance IDs associated with existing connection objects.

Reads a connection class attribute value.

1) Get_attribute_single is required if the connection class attribute is supported.

Table 10 shows the connection instance attributes and their associated data types:

Table 10 - Connection object instance attributes

Attribute name Data type Brief description of attribute

1 Required state USINT State of the object

2 Required instance_type USINT Indicates either I/O or messaging connection

3 Required transportClass_trigger BYTE Defines behaviour of the connection

4 Required produced_connection_id UINT Placed in CAN identifier field when the connection transmits

5 Required consumed_connection_id UINT CAN identifier field value that denotes message to be received

6 Required initial_comm_characteristics BYTE Defines the message group(s) across which productions and consumptions associated with this connection occur

7 Required produced_connection_size UINT Maximum number of bytes transmitted across this connection

8 Required consumed_connection_size UINT Maximum number of bytes received across this connection

9 Required expected_packet_rate UINT Defines timing associated with this connection

12 Required watchdog_timeout_action USINT Defines how to handle inactivity/watchdog time-outs

13 Required produced_connection_path_ length

UINT Number of bytes in the produced_connection_path attribute

14 Required produced_connection_path Array of

USINT Specifies the application object(s) whose data is to be produced by this connection object.

15 Required consumed_connection_path_ length

UINT Number of bytes in the consumed_connection_path attribute

16 Required consumed_connection_path Array of

Specifies the application object(s) that are to receive the data consumed by this connection object

17 Required production_inhibit_time UINT Defines minimum time between new data production

The following list outlines the attributes of the DeviceNet connection object instance, detailing their descriptions Default attribute values will be applied in the absence of any other internal or system-defined rules.

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

1) state: Defines the current state of the connection instance Table 11 defines the possible states and assigns a value used to indicate that state.

Table 11 - Values assigned to the state attribute

0 Non-existent No connection exists.

1 Configuring The connection has been created and is waiting: (a) to be configured and (b) to be instructed to apply the configuration.

The connection instance is waiting for its consumed_connection_id and/or produced_connection_id attribute to be set.1)

3 Established The connection has been configured and the configuration has been applied.

If a connection object encounters an inactivity or watchdog time-out, it will transition to the "Timed Out" state For further details, refer to the watchdog_timeout_action attribute in Table 15 and the inactivity/watchdog timer description in section 5.3.2.5.3.

When applying connection instance attributes, the node may be unable to generate the \$produced\_connection\_id\$ and/or \$consumed\_connection\_id\$ values, as outlined by the \$initial\_comm\_characteristics\$ attribute in Table 15 In such cases, all tasks related to applying the attributes are completed, except for the initialization of these IDs within the connection and the associated link producer/consumer objects, resulting in the connection instance entering a "Waiting for connection ID" state.

If an explicit messaging connection fails before a dynamically created connection instance reaches the established state, all resources linked to that connection instance will be released.

When a transition is made to the established state, all timers associated with the connection object shall be activated (see 5.3.2.5).

2) instance_type: Defines the instance type ( as described in Table 12).

Table 12 - Values assigned to the instance_type attribute

The transportClass_trigger attribute determines the type of connection—whether it is for producing only, consuming only, or both producing and consuming data Additionally, if the endpoint is set to produce data, this attribute specifies the event that initiates the production process The eight bits of this attribute are organized in a specific manner, as illustrated in Figure 22.

Dir Production Transport Trigger Class

1=Change of State 2=Application Object 3-7=Reserved

Transport Class 0=Class 0 1=Reserved 2=Class 2 3=Class 3 4-F hex =Reserved

The produced_connection_id holds the CID linked to transmissions over this connection, if applicable This value must be indicated in the CAN identifier field during transmission (refer to section 5.1.2).

Licensed Copy: :FULLNAME, : DATE, Uncontrolled Copy, (c) BSI

Table 13 - Values defined for the produced_connection_id attribute

0 - 7F0 hex The value to be placed in the CAN identifier field when this connection transmits.

The attribute 7F1h ex - FFFE hex is reserved, while FFFF hex serves as the default value assigned within an I/O connection This attribute will maintain its default value if the connection instance is not producing any data, functioning solely as a consumer.

The consumed_connection_id is a unique identifier (CID) that specifies the messages intended for reception over a particular connection This identifier corresponds to the CAN identifier field value utilized for messages associated with this connection object, as detailed in section 5.1.2 Refer to Table 14 for the defined values.

Table 14 - Values defined for the consumed_connection_id attribute

The value ranging from 0 to 7F0 hex serves as an identifier for messages intended for consumption by this specific connection object instance This identifier must be included in the CAN identifier field of the relevant messages.

The 7F1 hex is designated for specific functions, while FFFE hex is reserved The FFFF hex serves as the default value for this attribute within an I/O connection, which will maintain this value if the connection instance is not actively consuming data, functioning solely as a producer.

6) initial_comm_characteristics: Defines the message group(s) across which this connection produces and consumes This byte is divided into two nibbles (see Figure 23).

Initial Production Characteristics Initial Consumption

Figure 23 - Initial_comm_characteristics attribute format

Table 15 lists the values that are possible within the initial production characteristics nibble (upper nibble) of the initial_comm_characteristics attribute.

Table 15 - Values for the initial production characteristics nibble

1 Produce across message Group 2 (destination)2)

2 Produce across message Group 2 (source)3)

The producing node creates a CID value by combining the lowest available Group 1 Message ID from its pool with its Source MAC ID, which is then stored in the produced_connection_id attribute of the connection object This CID value is also assigned to the consumed_connection_id attribute of the associated consuming connection object(s).

The destination MAC ID is included in the MAC ID component of the Group 2 identifier field The consuming node generates a CID value for transmissions over this connection, which is then stored in the consumed_connection_id attribute of the connection object This value is subsequently read and transferred to the produced_connection_id attribute of the producing connection object.

The source MAC ID must be included in the MAC ID component of the Group 2 identifier The producing node is responsible for generating the CID value, which is then assigned to the produced_connection_id attribute of the connection object The lowest available Group 2 message ID will be utilized to create the produced_connection_id value, which will also be assigned to the consumed_connection_id attribute of the associated consuming connection object(s).

Ngày đăng: 14/04/2023, 08:36

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN