HMS J1939 User Manual

Anybus x-gateway ethernet gateway
Hide thumbs Also See for J1939:
Table of Contents

Advertisement

Quick Links

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
HMS Industrial Networks
Mailing address: Box 4126, 300 04 Halmstad, Sweden
E-mail: info@hms-networks.com
Visiting address: Stationsgatan 37, Halmstad, Sweden
www.hms-networks.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the J1939 and is the answer not in the manual?

Questions and answers

Summary of Contents for HMS J1939

  • Page 1: User Manual

    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 2: Table Of Contents

    Configuration Port Connector........2-5 Configuration ............3-1 Anybus X-gateway Configuration Tool (BWConfig) ... 3-1 Ethernet Network Configuration ......... 3-6 J1939 Network Configuration ........3-15 J1939 I/O Configuration ........... 3-18 Example Application ..........4-1 Scenario #1 - EtherNet/IP .......... 4-1 Ethernet Network Configuration ......... 4-2 J1939 Network Configuration ........
  • Page 3 Table of Contents ii Ethernet Network Configuration ......... 4-7 J1939 Network Configuration ........4-7 J1939 I/O Configuration ..........4-8 EtherNet/IP Interface ..........5-1 Product Features............5-1 CIP Objects ..............5-1 CIP Messaging ............5-2 I/O Messaging ............5-3 Assembly Objects and Connections......5-4 I/O Data Summary .............
  • 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 ........
  • Page 5: Preface

    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.
  • Page 6: Related Documentation

    Table 1-1 Related Documentation Modbus/TCP is a trademark of Modbus.org. EtherNet/IP is a trademark of ODVA. Microsoft, MS-DOS, and Windows are trademarks of Microsoft Corporation. Support For technical support, FAQ:s etc, please see www.anybus.com © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 7: Anybus X-Gateway Module Description

    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.
  • Page 8: Theory Of Operation

    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.
  • Page 9: J1939 Features

    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.
  • Page 10: It-Features

    HTML code. This enables the user to access the IN/OUT area using a cus- tomizeable web page interface. • Firmware updates of the X-gateway using the RS232 port and Anybus X- gateway Configuration Tool. • Email client capability. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 11: System Requirements

    DIN rail to mount the X-gateway. Required Software • Anybus X-gateway Configuration Tool software (BWConfig) to config- ure the Anybus X-gateway. • BWConfig requires that the PC be running Microsoft Windows 98, NT, 2000, or XP. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 12: Hardware Description

    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.
  • Page 13: Installation

    •Terminal tightening torque must be between 5-7 lbs-in (0.5-0.8 Nm). •For use in Class 2 circuits only. •Suitable for surrounding temperature of 65 degrees C maximum. •Use 60/75 C copper wire only. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 14: Power And Network Connections

    The power and network connections to the X-gateway are made on the end of the module. Figure 2-1 indicates the location of each connector. J1939 Power Configuration Ethernet Ethernet IP Address Figure 2-1 Anybus X-gateway Power and Network Connections © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 15: Connecting Power

    24VDC Common 24 VDC + Figure 2-2 Power Connection The X-gateway requires 24 volts DC power. The module will start immediately when power is applied (There is no On/Off switch on the module). © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 16: Connecting J1939

    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.
  • Page 17: Connecting To Ethernet

    Note: The Anybus X-gateway does not make use of the modem control signals specified for a DTE connector. Connecting the module through devices, such as isolation modules, which assume control of these lines may cause the BWConfig communications to be unreliable. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 18: Configuration

    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 19 Make sure that the mod- ule is powered and the connection is made, then press the Refresh button on the BWConfig tool bar; this will cause the tool to rescan the serial ports for a module. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 20 Configuration 3-3 BWConfig User Interface The Anybus X-gateway Configuration Tool’s user interface is shown below. Figure 3-1 BWConfig User Interface © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • 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 23: Ethernet Network Configuration

    The speed that the module will communicate 10, 100, or at on the Ethernet network. Auto If the network speed is set to Auto, the module will auto-negotiate network speed. Table 3-1 Ethernet Network Configuration Parameters © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • 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.
  • Page 25 Note: The numbers on the switches on the IP configuration DIP switch do NOT correspond to bit locations in the address value. In fact, they are reversed. i.e. bit 0 is set by switch 8. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 26 Subnet mask, and Gateway address is automatically configured by the DHCP/BootP server. It can be enabled using BWConfig or the X-gateway’s Set- tings web page. Note: The use of DHCP is the default configuration for the Anybus X-gateway as shipped. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 27 Switch all 8 switches of the IP Configuration DIP switch to the OFF position to disable the feature. This method can be used to reconfigure a module that has been previously config- ured, or even to reconfigure modules outside the host’s subnet. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 28 Configuration 3-11 Arp/Ping Example: The following commands will set the IP address of a X-gateway with MAC address 00-30-11-02-00-5E to 65.106.34.252. arp -s 65.106.34.252 00-30-11-02-00-5e ping 65.106.34.252 arp -d 65.106.34.252 © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 29 The ethernet addresses can also be configured using the Status and Settings web page resident on the X-gateway. The Status and Settings web page appears as shown below. Figure 3-3 Status and Settings Web Page © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 30 Make sure that the browsers settings are configured to always reload pages. On Internet Explorer this is done in the Temporary Internet Files Settings dialog by selecting the “Every Visit” option for when the browser should check for page changes. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 31 Received? IP = 192.168.1.n IP = 192.168.1.255 Sub = 255.255.255.0 Sub = 255.255.255.0 No Gateway No Gateway Valid Use configuration Configuration from file File? Remain offline Figure 3-4 IP Configuration Initialization Sequence © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 32: J1939 Network Configuration

    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.
  • Page 35: J1939 I/O Configuration

    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 39 2 values separated by a comma or a period will be interpreted as a byte, bit combination. i.e. ‘16’ and ‘2,0’ are equivalent entries. Table 3-3 J1939 I/O Data Point Parameters (Continued) © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • 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.
  • Page 42: Example Application

    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.
  • Page 43: Ethernet Network Configuration

    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.
  • Page 44: J1939 I/O Configuration

    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 45 Notice that the table length has been set to 20 entries. The target address specifies that the diagnostics of the 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. © 2014 HMS Industrial Networks AB...
  • 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.
  • Page 47: Scenario #2 - Modbus/Tcp

    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.
  • Page 48: Ethernet Network Configuration

    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.
  • Page 49: J1939 I/O Configuration

    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.
  • Page 52: Ethernet/Ip Interface

    Instance. The X- gateway contains the same objects as other modules that are based on the CIP pro- tocol. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 53: Cip Messaging

    Service. The Path is an encoded series of bytes or Segments describ- ing the location of the data item involved in the transfer. The Logical Segment is most often used. It describes the Class, Instance, and Attribute of the data. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 54: I/O Messaging

    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 55: Assembly Objects And Connections

    I/O assemblies. (see the assembly formats below) If a connection is created with a size larger than the configured I/O data table size, the extra data will be filled with 0. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • 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.
  • Page 60: I/O Data Summary

    I/O Data Summary The following diagram illustrates how the various components of the input data are used to create the input assembly and connection data accessible from Ether- Net/IP. Figure 5-2 Input Data Association © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 61 EtherNet/IP 5-10 The following diagram illustrates how the various components of the output data are used to create the output assembly and connection data accessible from Ether- Net/IP. Figure 5-3 Output Data Association © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 62: Using Controllogix With The Gateway

    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).
  • Page 63 EtherNet/IP 5-12 The figure below shows a typical ControlLogix device configuration. Figure 5-4 ControlLogix Configuration © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 64: Modbus/Tcp Interface

    Read Multiple Registers IN/OUT Word Read Input Registers IN/OUT Word Write Coil Write Single Register Word Force Multiple Coils Force Multiple Registers Word Mask Write Registers Read/Write Registers IN/OUT Table 6-1 Modbus Commands © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 65: Supported Exception Codes

    Illegal Data The data address received in the query is out- address side the initialized memory area Illegal Data The data in the request is illegal Value Table 6-2 Exception Codes © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 66: Modbus/Tcp Addressing

    Register 4097 4098 4099 4100 4101 4102 4103 4111 4112 4113 4114 4115 4116 4117 4118 4119 4127 4128 4161 4162 4163 4164 4165 4166 4167 4175 4176 Table 6-5 Status Addressing © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 67 Input Table use Input Register address • To reference the first word of the Output Table use Holding Register address 1025. • To reference the 100 word of the Output Table use Holding Register address 1124. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 68: I/O Data Content

    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.
  • Page 73: I/O Data Summary

    I/O Data Summary The following diagram illustrates how the various components of the input data are used to create the input assembly and connection data accessible from Mod- bus/TCP. Figure 6-1 Input Data Association © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 74 Modbus/TCP 6-11 The following diagram illustrates how the various components of the output data are used to create the output assembly and connection data accessible from Mod- bus/TCP. Figure 6-2 Output Data Association © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 75: I/O Data Format

    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.
  • Page 76: J1939 Interface

    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.
  • Page 77: Communications Methods

    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)
  • Page 78: Message Transmission

    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 79 Automatic transmission for a message will occur Update Time milliseconds after the last transmission of the message, regardless of whether the last transmission was automatic or a response to a request PGN. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • 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.
  • Page 81: Receiving Messages

    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.
  • Page 83: Transport Protocol For Large Messages

    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.
  • Page 84: J1939 Diagnostic Messages

    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.
  • Page 86 J1939 SPN bits 0-2 J1939 FMI. Occurrence count. SPN Conversion Method (set to 0) J1939 SPN bits 3-10 J1939 SPN bits 11-18 Table 7-4 Diagnostic Table Entry Content for SPN Conversion Method 1, Version 2 © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 87 J1939 SPN bits 16-18. J1939 FMI. Occurrence count. SPN Conversion Method (set to 0) J1939 SPN bits 0-7 J1939 SPN bits 8-15 Table 7-5 Diagnostic Table Entry Content for SPN Conversion Method 1, Version 3 © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 88: Bus-Off Reset Option

    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.
  • Page 89: Offline Detection

    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.
  • Page 90 Offline Detection Message is being transmitted more often. This trade-off could affect the performance of the X-gateway and of the J1939 network overall. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 91 If output data point messages are transmitted at a faster rate than the Offline Detection Time, the Offline Detection Message will not be transmitted © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 92: J1939 Baud Rate

    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 93: File System

    File Size The file size is not restricted. Naturally, a file cannot be larger than the available space, see below. Free space There is approximately 1 MB available for user files. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 94: Security

    A default “sys_pswd.cfg” file is provided. The default file provides a guest user access to FTP and Telnet. This user has username “guest” and password “guest”. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 95 Administration mode. The user has full access to the file system via FTP or Telnet. No login is needed for Telnet, and the FTP server accepts any username/password combination. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 96: Structure

    (files used in web pages) email_1.cfg email_2.cfg ad_pswd.cfg (Admin password file) (User defined email files) email_10.cfg email email_1.cfg email_2.cfg (Admin defined email files) email_10.cfg Figure 8-1 File System Directory Structure © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 97: Default Files

    The following files are also on the X-gateway; \pswd\ad_pswd.cfg, \telwel.cfg, \ethcfg.cfg, \index.htm \user\pswd\sys_pswd.cfg. These files can be edited as needed. Each file is discussed below. The X-gateway power must be recycled for any changes to take effect. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 98: Virtual File System

    ASCII files and can be edited with any text editor. Depending on security settings, the files may be inaccessible for normal users. Note: These files shall not be used to store any user or application data. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 99: Configuration Files

    Needed to be able to resolve host names. 0.0.0.0 [DNS2 address] Needed to be able to resolve host names. 0.0.0.0 [Domain name] The default domain name for not fully qualified domain host names. [DHCP/BOOTP] DHCP/BootP ‘ON’-Enabled, ‘OFF’-Disabled © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 100 In this example, the settings described above will be loaded from the file ‘user\eth_settings.cfg’. This permits normal users to access the network configuration settings. Note: The module needs to be restarted for changes in this file to have affect. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 101 IP addresses. If a protocol header is not given, the system will use the configuration set under the header ‘All’. If the ‘All’ header is not given, the protocol will not accept any connections. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 102 In this example, the settings described above will be loaded from the file ‘\my_settings\ip_access_rights.cfg’. Note: The module has to be restarted in order for any changes in this file to have affect. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 103: Password Files

    In this example, the username is ‘JohnQ’, and the password is ‘Password’. If no ‘:’ is present, the password will be equal to the username. Example: BillH In this example, both username and password will be ‘BillH’. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 104 In this example, the accepted user/passwords will be loaded from the files ‘\user\pswd\my_passwords\web_pswd.cfg’ and ‘\user\pswd\my_passwords\more_pswd.cfg’ If any errors in the format of these files is detected the user/password protection will be ignored. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 105: Other Files

    The contents of this file can be redirected by placing the line ‘[File path]’ on the first row, and a file path on the second. Example: [File path] \my_settings\telnet_welcome_message.txt In this example, the welcome message will be loaded from the file ‘\my_settings\telnet_welcome_message.txt’. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 106 8-7). The file must have the following format. [Register] Area, Offset, Type [Register Match] Match Value, Mask, Match Operand [To] Recipient(s) [From] Sender [Subject] Subject Line [Headers] Extra Headers [Message] Message Body © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 107 Sender text Sender email address Subject text (only 1 email subject line) Extra Head- text Optional. It may be useful to send HTML email Message text Message Body Table 8-1 Email Parameters © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 108 A byte is read from the Input area at location 3. [Register match] 0x20, 0x7F, > Mask Input byte with 0x7F, if result greater than 0x20 send email. [To] support@your_company.com [From] YourDevice@your_network.com [Subject] Status [Message] Data out of range © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 109: Anybus X-Gateway Web Page Files

    Click on the “IOTableView” link to display a web page providing the current val- ues in the first 20 registers of the Input and Output data from a Modbus/TCP per- spective. The current module status is also displayed on this page. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 110: It Functionality

    This can be done by changing the username or password. The Administrator can access the Password files to add or remove users or change passwords. (See files “‘sys_pswd.cfg & ad_pswd.cfg’” on page 8-11). © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 111: The Ftp Server

    ‘admin’ in order to get admin permission. The admin user has full access to the file system. The root directory will be “\” and no files or folders will be hidden. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 112: General Commands

    - Exit station program Also try ‘help general|diagnostic|filesystem’ version Usage: version This command will display version information, serial number and MAC Address of the module. exit Usage: exit This command closes the Telnet session. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 113 The following commands can be viewed by the command ‘help diagnostic’ arps Usage: arps Display ARP stats and table iface Usage: iface Display net interface stats sockets Usage: sockets Display socket list routes Usage: routes Display IP route table © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 114 Creates a directory. If no path is given, the directory is created in the current direc- tory. Usage: rd [[path][directory name]] Removes a directory. The directory can only be removed if it is empty. Usage: cd [path] Changes current directory. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 115 This command moves a file or directory from the source location to a specified destination. copy Usage: copy [[source path][source file]] [[destination path]] This command creates a copy of the source file at a specified location. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 116 Types the contents of a file. mkfile Usage: mkfile [[path][filename]] Creates an empty file. append Usage: append [[path][filename]] [“The line to append”] Appends a line to a file. Usage: Displays file system information. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 117: Http Server

    - Configuration frame page configform.htm - Configuration form page configform2.htm - Configuration form page store.htm - Configuration store page logo.gif - Logo configuration.gif - Configuration picture boarder_bg.gif - Picture boarder_m_bg.gif - Picture © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 118: Ssi Functionality

    SSI functions. Ethernet Address Display Functions DisplayIP This function returns the currently used IP address. Syntax: <?--#exec cmd_argument=’DisplayIP’--> DisplayMacId This function returns the MAC ID in the format xx:xx:xx:xx:xx:xx. Syntax: <?--#exec cmd_argument=’DisplayMacId’--> © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 119 “Output when ON”, “Output when OFF”)’--> DisplayEmailServer This function returns the current SMTP server address. Syntax: <?--#exec cmd_argument=’DisplayEmailServer’--> DisplayDNS1 This function returns the address of the primary DNS server. Syntax: <?--#exec cmd_argument=’DisplayDNS1’--> © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 120 This function returns the default domain name. Syntax: <?--#exec cmd_argument=’DisplayDomainName’--> DisplaySMTPUser This function returns the username used for SMTP authentication. Syntax: <?--#exec cmd_argument=’DisplaySMTPUser’--> DisplaySMTPPswd This function returns the password used for SMTP authentication. Syntax: <?--#exec cmd_argument=’DisplaySMTPPswd’--> © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 121 Invalid Email Server IP address! Configuration stored correctly. Invalid DHCP state! Failed to store the configuration! For information about how to change the SSI output, please see “Changing SSI Output” on page 9-23. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 122 Each conversion specification begins with the character “%” and ends with a conversion character. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 123 L A length modifier. “L” or “l” indicates that the argument is along or unsigned long. Table 9-1 printf Modifiers © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 124 “%e” or “%E” is used if the exponent is less than -4 or greater than or equal to the precision; other- wise “%f” is used. Trailing zeroes and trailing decimal point are not printed. Print a “%” Table 9-2 printf Conversion Characters © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 125 Reads a string (char*) byte from position offset in the OUT area OutReadFloat(offset) Reads a floating point (float) value from position offset in the OUT area Table 9-3 SSI Functions to Read Data © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 126 Some data may have to be manipu- lated to account for byte ordering when displaying it on a web page depending on the configuration of the Swap I/O Bytes parameter in the Ethernet configuration. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 127 “\0” that will be added. e, f, g Floating-point number with optional sign, optional decimal point and optional exponent; float Literal “%”; no assignment is made. Table 9-4 scanf Formats © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 128 Some data may have to be manipu- lated to account for byte ordering when displaying it on a web page depending on the configuration of the Swap I/O Bytes parameter in the Ethernet configuration. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 129 “ObjName”, OutWriteString (offset), n)’--> offset specifies the offset from the beginning of the OUT area. n (optional) specifies maximum number of characters to read Default output: Success - Write succeeded Failure - Write failed © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 130 The contents can either be Appended to the file or overwrite the current content of the file. Syntax: <?--#exec cmd_argument=’SaveToFile( “File name”, “Separator”, [Append|Overwrite])’--> Default output: Success - Form saved to file Failure - Failed to save form © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 131 The contents can either be Appended to the file or Overwrite the current contents of the file. Syntax: <?--#exec cmd_argument=’SaveDataToFile( “File name”, “Object name”, [Append|Overwrite])’--> Default output: Success - Form data saved to file Failure - Failed to save form data © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 132 Invalid DHCP state: “String to use when the DHCP state is invalid” [scanf] Success: “String to use on success” Failure: “String to use on failure” [IncludeFile] Failure: “String to use when failure” To include filename “%s” can be included to the string once © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 133 ‘\ssi_str.cfg’. The maximum size of a string is 128 bytes. Syntax: <?--#exec cmd_argument=’SsiOutput( “Success string”, “Failure string”)’--> Example: This example shows how to change the output strings for a scanf SSI call. <?--#exec cmd_argument=’SsiOutput (“Parameter1 updated”, “Error”)’--> <?--#exec cmd_argument=”scanf(“Parameter1”, “%d”, OutWriteByte(0))’--> © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 134: Email Client

    • DisplayIP • DisplayMACID • DisplaySubnet • DisplayGateway • DisplayDNS1 • DisplayDNS2 • DisplayHostName • DisplayDomainName • DisplayEmailServer • DisplayDHCPState • DisplaySMTPUser • DisplaySMTPPswd • printf • IncludeFile • SsiOutput © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 135: Displaying I/O Data On A Web Page

    IN table and the third byte of data of the OUT table using the SSI “printf” command. <html> <head> <title>Ethernet to DeviceNet X-gateway</title> </head> <body> <center> </h1> <?--#exec cmd_argument='printf(“IN 2 = 0x%2X”,InReadUByte(2))'--> <?--#exec cmd_argument='printf(“OUT 3 = 0x%2X”,OutReadUByte(3))'--> </body> </html> © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 136: Status And Diagnostics

    Major unrecoverable faults are indicated by a series of green and red flashes. If the X-gateway Status LED is flashing red and green for an extended period of time, count the number of red and green flashes and call technical support. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • 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...
  • Page 138 Red,Green Self Test A self test of the module is in progress. Alternate Flashing Table 10-4 Ethernet Network Status LED States © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 139: J1939 Status Codes

    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.
  • Page 140: Diagnostic Web Pages

    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.
  • Page 141: Specifications

    EN50082-2-EMC Generic Immunity Standard, Part 2 - Industrial Envi- ronment This product is intended for use in an industrial environment. Electrical Specifications DC Power Operating voltage: 12-30v DC. Current Requirements: 130-140 mA at 24 VDC. © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 142: Mechanical Specifications

    Specifications 11-2 Mechanical Specifications Mechanical Rating IP20/NEMA 1 DIN Rail Mount The X-gateway connects to a DIN 3 rail. Dimensions Figure 11-1 Anybus X-gateway Mechanical Dimensions © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 143: I/O Data Sizes

    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).
  • Page 144: Connectors

    Chapter 12 Connectors 12-1 Connectors Power Figure 12-1 Power Connector Connection 24 VDC + 24 VDC Common Table 12-1 Power Connector Pin Definitions MSTB 2,5/2-ST-5,08 ABGY Use Phoenix connector part number © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 145: J1939

    Table 12-2 J1939 Connector Pin Definitions Use Phoenix connector part number MSTB 2,5/5-ST-5,08-ABGYAU. Note: The 24VDC connections on the J1939 and Power connectors are physically connected internally. The module may be powered from either set of pins. © 2014 HMS Industrial Networks AB...
  • Page 146: Ethernet Rj45

    Connectors 12-3 Ethernet RJ45 Signal Termination Termination Termination Termination Table 12-3 RJ45 Pinout © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...
  • Page 147: Configuration Rs-232 9 Pin D-Subminiature

    Connectors 12-4 Configuration RS-232 9 Pin D-Subminiature Signal Receive Transmit Signal Ground Table 12-4 RS232 9 Pin © 2014 HMS Industrial Networks AB Doc: HMSI-168-27...

Table of Contents