Anybus X-gateway Ethernet to J1939 Gateway User Manual Part No. AB7665 For Firmware Revision 2.07.01 and Later Manual Revision 1.20 Doc: HMSI-168-27 Connecting Devices HALMSTAD • CHICAGO • KARLSRUHE • TOKYO • BEIJING • MILANO • MULHOUSE • COVENTRY • PUNE • COPENHAGEN...
Page 4
Email Client .............. 9-25 Displaying I/O Data on a Web Page......9-26 Status and Diagnostics........... 10-1 Anybus X-gateway LEDs ......... 10-1 J1939 Status Codes ..........10-4 Diagnostic Web Pages ..........10-5 Status Assembly ............10-5 Specifications ............11-1 Environmental Specifications ........11-1 EMC Directive Compliance ........
The illustrations and samples in this guide are intended solely for the purpose of example. HMS Industrial Networks does not assume responsibility or liability for actual use based upon the examples shown in this publication.
The Anybus Ethernet to J1939 X-gateway allows you to monitor and control data on a J1939 heavy duty vehicle network from an Ethernet device. Data from J1939 messages are mapped to I/O table locations, making them accessible to the Ether- net network.
The Anybus X-gateway provides centralized data storage, the “PassageWay ”, for data that is shared between the J1939 and Ethernet networks. Data is placed into the PassageWay by one network interface, allowing the data to be read through the other network interface.
Anybus X-gateway Module Description 1-3 J1939 Features • Transmission and reception of all types of fixed-length J1939 messages, including PDU1, PDU2, broadcast and destination specific. • Monitoring of DM1 (active diagnostics) and DM2 (previously active diagnostics) messages. • Complete network address management including address claim, protec- tion, and yield on higher priority conflict.
On the front of the X-gateway module are 6 LEDs that are used for status indica- tion. These LEDs provide visual status for the overall module, the J1939 interface, and the Ethernet interface. See “Anybus X-gateway LEDs” Page 10-1 for details on how the LEDs are used.
Installation 2-4 Connecting J1939 The J1939 network connection is a 5-pin terminal block located next to the power connection on the end of the module. The female terminal block connector is pro- vided with the X-gateway. Connections to be made are illustrated in Figure 2-3.
Anybus X-gateway Configuration Tool (BWConfig) The Anybus X-gateway Configuration Tool allows you to configure the parame- ters associated with the Ethernet and J1939 network interfaces as well as to set up the contents and layout of the I/O table. BWConfig is a Microsoft Windows application that communicates with a X-gate- way over a standard RS-232 serial link using the PC serial port or USB serial adapter.
Page 21
X-gateway module that was detected. Ethernet Configuration Configuration of Ethernet network parame- ters. J1939 Configuration Configuration of J1939 network parameters and status of the network interface. J1939 I/O Configuration Configuration of the content and layout of the I/O tables. Tool Operations The following operations are available through the BWConfig menus and tool bar.
Page 22
J1939 I/O configuration. Remove I/O Point Delete the selected input or output data point from the J1939 I/O configuration. Flash Update Perform a field upgrade of the X-gateway module’s firmware. Note: Care should be taken when upgrading firmware, an incomplete update could cause irreparable harm to the module.
Page 24
I/O size are not allowed. The I/O size includes any status and command headers as well as the J1939 device data. See “I/O Data Summary” on page 5-9 for details. The actual output assembly size will be 4 bytes less than the I/O size configured.
Configuration 3-15 J1939 Network Configuration The J1939 network configuration contains the parameters used by the X-gateway for J1939 address management and other network interface options. The parame- ters are described in Table 3-2 below. Refer to Figure 3-1 to see how each param- eter is displayed on the user interface.
Page 33
PGN’s configured. See “Offline Detection” Enabled on page 7-14 for a complete discussion. Baud Rate The J1939 baud rate may be set to either 250K 250K or 500K baud. 500K Important: The standard J1939 baud rate is 250K. Do not set the baud rate to...
Page 34
Figure 3-5 J1939 Device NAME Dialog The NAME is a 64-bit value that must be unique for every module on a given J1939 network. The meaning and format of the data contained in the NAME value is defined in the J1939-81 specification.
J1939 network. The J1939 device output table holds data that is written by a device on the Ether- net network to be transmitted on the J1939 network. Output data points are associ- ated with data of messages that will be transmitted on the J1939 network.
Page 36
Configuration 3-19 Data Point Parameters Each data point defines a single piece of data in the either the J1939 device Input or Output table. The data point parameters are organized in columns in the J1939 I/O configuration editor, shown in Figure 3-6. Note that both Input and Output data points have the same parameters with the exception of the message priority;...
Page 37
Parameter Description Allowable Range Table Offset The offset into the J1939 device I/O data. If Input: this is an input data point, the offset is into the 0-3999 bits Input data; if this is an output data point, the 0-499 bytes offset is into the Output data.
Page 38
Description Allowable Range Priority The J1939 message priority to be used when transmitting this message. If this is an output data point, this is the mes- sage priority that will be used when the mes- sage is produced on the J1939 network.
Page 40
J1939 Diagnostic Tables The X-gateway has the ability to monitor the commonly used diagnostic messages on J1939. The Active Diagnostics (DM1) and Previously Active Diagnostics (DM2) can be monitored by the X-gateway. Configuring diagnostic table monitor- ing is done through the input data points in much the same manner as data PGN configuration.
Page 41
This will automatically be set to 0 Table 3-4 Input Data Point Parameters for Diagnostic Tables Note: See “J1939 Diagnostic Messages” on page 7-9 for details of the format of the diagnostic tables in the J1939 device input data. Note: The J1939 I/O configuration is initialized at X-gateway bootup and when- ever a new configuration is downloaded to the module from BWConfig.
A system controller (PLC) on EtherNet/IP requires some data that is collected by an ECU and produced on J1939. There is also a piece of data that is determined by the system controller that would be beneficial for some of the ECUs that are on the J1939 network.
Refer to “Configuration” on page 3-1 for more details on BWConfig. Figure 4-4 Example J1939 Network Configuration The J1939 device NAME has been set to an arbitrary value for the purpose of this example. The NAME should be set according to the vendor and application where the module is being used based on the J1939 specification.
It is desirable to be able to address the 2 values in our example as individual 16-bit words in the EtherNet/IP data. Since the values are packed into 3 bytes in the J1939 message, they need to be parsed out into 2 word locations in the J1939 device input data.
Page 46
PGN message, the resulting configuration is quite simple. It is shown in Figure 4- Figure 4-7 Example J1939 Output Configuration The single data point specifies that 2 bytes of data from the beginning of the J1939 device output data is going to be copied into the first 2 bytes of the message. The message will be transmitted with a PGN of 256 and a priority of 6 every 100ms.
A system controller (PLC) on Modbus/TCP requires some data that is collected by an ECU on J1939. There is also a piece of data that is determined by the system controller that would be beneficial for some of the ECUs that are on the J1939 net- work.
Refer to “Configuration” on page 3-1 for more details on BWConfig. Figure 4-11 Example J1939 Network Configuration The J1939 device NAME has been set to an arbitrary value for the purpose of this example. The NAME should be set according to the vendor and application where the module is being used based on the J1939 specification.
The input data points are responsible for determining where in the J1939 device input data the J1939 data is to be placed. It is desirable to be able to address the 2 values in our example as individual registers in Modbus/TCP. Since the values are packed into 3 bytes in the J1939 message, they need to be parsed out into 2 regis- ter locations in the input data.
Page 50
ECM at address 10 are to be monitored by this data point. The diagnostic table will start at byte 100 of the J1939 device input data, this will set it at word 50 as desired.
Page 51
PGN message, the resulting configuration is quite simple. It is shown in Figure 4- Figure 4-14 Example J1939 Output Configuration The single data point specifies that 2 bytes of data from the beginning of the J1939 device output data is going to be copied into the first 2 bytes of the message. The message will be transmitted with a PGN of 256 and a priority of 6 every 100ms.
The X-gateway allows an EtherNet/IP Scanner access to the I/O data tables. The data received from the J1939 network is collected in the Input Table (IN) of the X- gateway and becomes the EtherNet/IP Input data to the EtherNet/IP scanner. Eth- erNet/IP Output data from the scanner is stored in the X-gateway’s Output Table...
Page 56
J1939 device input data. Table 5-3 Input Assembly Format The J1939 device input data format and content is determined by the input data point configuration created with BWConfig. The data appears in the table as it is mapped from the J1939 messages. The J1939 device input data in the assembly is 496 bytes long;...
Page 57
J1939 device output data. Table 5-5 Output Assembly Format The J1939 device output data format and content is determined by the output data point configuration created with BWConfig. The data appears in the table as it is mapped to the J1939 messages. The J1939 device output data in the assembly is 492 bytes long;...
Page 58
Status Assembly The status assembly is a collection of status and diagnostic information for the X- gateway J1939 interface. The information in the assembly is updated once a sec- ond. Note: All information in the status assembly is stored in little endian format. The least significant byte of multi-byte values is stored first.
Page 59
EtherNet/IP 5-8 The J1939 Interface Faults word in the Status Assembly is a bit string with the fol- lowing bit definitions. Description Address Claim Failed. The module was unable to claim the configured address and go online. CAN Network Warning. The CAN controller has detected a large number of CAN errors.
Idle header is automatically added by the controller and does not come into play in the size. The input size must be set to the configured J1939 input table size plus 4 bytes for the input status register (up to a maximum of 500 bytes inclusive).
Modbus/TCP 6-5 I/O Data Content Input Table The input table contains a 32-bit status register followed by the J1939 device input data. Modbus Size Description Input Register Words Status register. Up to J1939 device input data. Table 6-6 Input Table Format The J1939 device input data format and content is determined by the input data point configuration created with BWConfig.
Page 69
J1939 device output data. Table 6-8 Output Table Format The J1939 device output data format and content is determined by the output data point configuration created with BWConfig. The data appears in the table as it is mapped to the J1939 messages. The J1939 device output data in the assembly is 492 bytes long;...
Page 70
X-gateway. Both bits must be set for the X-gateway to be in Run mode; other- wise the module will be in Idle mode. Reset Faults. Resets the J1939 network interface faults. Not used. Not used.
Page 71
Modbus/TCP 6-8 Status Data Table The status data table is a collection of status and diagnostic information for the X- gateway J1939 interface. The information in the assembly is updated approxi- mately once a second. Modbus Size Data Type Name...
Page 72
Modbus/TCP 6-9 The J1939 Interface Faults word in the Status Assembly is a bit string with the fol- lowing bit definitions. Description Address Claim Failed. The module was unable to claim the configured address and go online. CAN Network Warning. The CAN controller has detected a large number of CAN errors.
J1939 is a little endian protocol; values are transmitted least significant byte first. Hence, all data in the I/O tables is assumed, by the J1939 nodes, to be stored as lit- tle endian.
Address Management The Anybus X-gateway address management is responsible for bringing the mod- ule online on the J1939 network with a unique network address in accordance to the J1939-81 specification. The address management will claim a configured address, if possible, and protect it against lower priority contending address claims.
Communications Methods The J1939 network interface supports reception and transmission of the following J1939 message types in accordance to the J1939-21 specification. •PDU1 destination specific •PDU1 broadcast •PDU2 (broadcast)
J1939 Interface 7-3 Message Transmission Messages are transmitted on the J1939 network according to the J1939 output configuration. Messages are assembled from data in the Output table and trans- mitted on a cyclic time basis, or in response to a request for the associated PGN.
Page 80
Message Priority The priority of the message being transmitted is set to the priority configured in the Output Data Point. By specification, the default priority of J1939 messages is Important: Care should be taken when changing the priority of mes- sages to a value other than 6 as it may affect the performance of other traffic on the J1939 network.
J1939 Interface 7-6 Receiving Messages Handled Messages The following J1939 messages are handled by the X-gateway when they are received from the network. • Address Claimed messages are handled by address management. See “Address Management” on page 7-1. • Request for Address Claimed messages are handled by address manage- ment.
Page 82
Parameter Timeout Indication Parameter timeout indication has been provided to allow the Modbus controller to determine if a device on the J1939 network has gone inactive. Input data points configured with a non-zero update rate will indicate a timeout when the associated message is not received within the configured update rate.
The previous sections discussed message handling generically, ignoring message sizes. Messages with buffer sizes of 8 bytes or less can be directly sent and received on J1939. However, messages with buffer sizes greater than 8 bytes must be fragmented, transmitted, and reassembled using the J1939 transport protocol.
Using BWConfig, the user is able to configure an active or previously active diag- nostic table (or both) for a given J1939 device. The X-gateway will update the tables based on the contents of DM1 or DM2 messages produced on J1939 by the device, and provide read access to the tables on Ethernet.
Page 85
J1939 Interface 7-10 Table Entry Each entry in the table contains information for a single diagnostic (J1939 SPN/ FMI). Each table entry is 4 bytes with bit fields as described in the tables below. The J1939 SPN value may be encoded differently in the diagnostic message received from the ECU.
If the bus-off reset option is enabled, the X-gateway will re-initialize the CAN controller after a bus-off condition is detected. Once the controller is reinitialized, the module will attempt to go online and resume network activity on the J1939 network.
J1939 Interface 7-14 Offline Detection The X-gateway is able to detect whenever it is not connected to the J1939 network or when it is the only device on the network (lonely). In either case the module is not able to transmit or receive J1939 messages.
J1939 Interface 7-17 J1939 Baud Rate The X-gateway is capable of supporting communication baud rates on the J1939 network of 250K and 500K baud. The correct baud rate must be configured through the BWConfig Baud Rate option in the J1939 Configuration pane.
Page 137
The module is not par- ticipating in J1939 traffic. Solid Green Online A J1939 network address has been suc- cessfully claimed and the module is online and active. Flashing Red/Green Online with...
Status and Diagnostics 10-4 J1939 Status Codes The status codes for the J1939 interface are displayed by the Anybus X-gateway Configuration Tool in the network configuration pane associated with the J1939 network. There are 2 status codes: a general status, and an error status. The gen- eral status is displayed as a textual status.
The status assembly is an assembly object instance that is accessible from Ether- Net/IP both explicitly and using an I/O connection. The status assembly contains current status and diagnostic information pertaining to the X-gateway’s J1939 interface. See “Status Assembly” on page 5-7 for complete details of the format and content of the assembly for EtherNet/IP.
Claims and protects a single configurable address. Self-configurable using a list of addresses. Transport Protocol Sessions Support of J1939 transport protocol for large messages with the following limita- tions: •Single outgoing session (either BAM or RTS/CTS). •35 concurrent incoming sessions (any mixture of BAM and RTS/CTS).
Need help?
Do you have a question about the J1939 and is the answer not in the manual?
Questions and answers