HMS Anybus X-gateway User Manual

HMS Anybus X-gateway User Manual

J1939 to modbus interface
Hide thumbs Also See for Anybus X-gateway:

Advertisement

Quick Links

Anybus X-gateway
J1939 to Modbus Interface
User Manual
Part No. AB7612
For Firmware Revision 2.06.01 and Later
Manual Revision 1.20
Doc.Id. HMSI-168-25
Connecting Devices
+$/067$' ‡ &+,&$*2 ‡ .$5/658+( ‡ 72.<2 ‡ %(,-,1* ‡ 0,/$12 ‡ 08/+286( ‡ &29(175< ‡ 381( ‡ &23(1+$*(1
HMS Industrial Networks
Mailing address: Box 4126, 300 04 Halmstad, Sweden
E-mail: info@hms-networks.com
Visiting address: Stationsgatan 37, Halmstad, Sweden
Web: www.anybus.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Anybus X-gateway and is the answer not in the manual?

Questions and answers

Summary of Contents for HMS Anybus X-gateway

  • Page 1 Anybus X-gateway J1939 to Modbus Interface User Manual Part No. AB7612 For Firmware Revision 2.06.01 and Later Manual Revision 1.20 Doc.Id. HMSI-168-25 Connecting Devices +$/067$' ‡ &+,&$*2 ‡ .$5/658+( ‡ 72.<2 ‡ %(,-,1* ‡ 0,/$12 ‡ 08/+286( ‡ &29(175< ‡ 381( ‡ &23(1+$*(1...
  • Page 2: Table Of Contents

    Table of Contents i Table of Contents Preface................. iii Important User Information ........iii Related Documentation.......... iv Anybus X-gateway Module Description ....1-1 Overview ..............1-1 Theory of Operation ........... 1-2 J1939 Features ............1-3 Modbus Features ............1-3 System Requirements ..........1-4 Hardware Description..........
  • Page 3 J1939 Diagnostic Messages ........6-9 Bus-Off Reset Option ..........6-13 Offline Detection............6-14 J1939 Baud Rate ............. 6-17 Status and Diagnostics..........7-1 Anybus X-gateway LEDs ........... 7-1 Status Codes.............. 7-3 Specifications ............8-1 Environmental Specifications ........8-1 EMC Directive Compliance ........8-1 Electrical Specifications..........
  • Page 4: Preface

    HMS Industrial Networks. HMS Industrial Networks assumes no responsibility for errors that may appear in this document There are many applications of the Anybus X-gateway module. Those responsible for the use of this device must satisfy themselves that all necessary steps have been taken to verify an application meets all performance and safety requirements including any applicable laws, regulations, codes, and standards.
  • Page 5: Related Documentation

    Document Name Author Web Page Modbus Protocol Specification Modbus-IDA www.modbus.org J1939 Recommended Practice www.sae.org Table 1-1 Related Documentation Modbus is a trademark of Modbus.org. Microsoft, MS-DOS, and Windows are trademarks of Microsoft Corporation. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 6: Anybus X-Gateway Module Description

    Chapter 1 Anybus X-gateway Module Description 1-1 Anybus X-gateway Module Description Overview The X-gateway J1939 to Modbus Interface (JMI) allows you to monitor and con- trol data on a J1939 heavy duty vehicle network using a Modbus RTU master device. Data from J1939 messages are mapped to I/O table locations, making them addressable using standard Modbus read and write commands.
  • Page 7: Theory Of Operation

    No special, or extended, protocol features are required of the devices on either network to read and write the data flowing through the PassageWay; all cross-network activity is transparent to the devices on either network. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 8: J1939 Features

    Support of all commonly used Modbus functions for reading and writing I/O data and diagnostics. • Overall module, Modbus, and J1939 status and diagnostics accessible through Modbus diagnostic functions and addressable registers. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 9: System Requirements

    • Modbus RTU master device. • 24 VDC power connection • PC to execute Anybus X-gateway Configuration Tool (BWConfig). • RS-232 null-modem cable to connect PC running BWConfig to the JMI. Optional Hardware • DIN rail to mount the JMI.
  • Page 10: Hardware Description

    Anybus X-gateway Module Description Hardware Description The Anybus X-gateway J1939 to Modbus Interface has a 15-pin D-Subminiature connector for power and network connections. This connector has pins for module power, J1939 CAN connections, and Modbus RS-485 connections. See “Installa- tion” Page 2-1 for details on using this connector.
  • Page 11: 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. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 12: Power And Network Connector

    The X-gateway requires 24 volts DC power. Power is applied to pins 9 and 10 of the 15-pin D-Sub connector. The module will start immediately when power is applied (There is no On/Off switch on the module). © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 13 The CAN High and Low signal lines should be connected to the CAN High and Low connections respectively on all devices on the network. The signal lines should not be swapped on any device connections. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 14: Configuration Port Connector

    PC has a 9-pin serial port (or USB serial adapter), use a 9-pin to 25-pin straight through cable. 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.
  • Page 15: Configuration

    Chapter 3 Configuration 3-1 Configuration This chapter describes how the Anybus X-gateway J1939 to Modbus Interface is configured using the Anybus Configuration Tool (BWConfig). Detailed descrip- tions of each configurable parameter in the JMI are provided as well as how they are set in the tool.
  • Page 16 Configuration 3-2 Connecting to the Anybus X-gateway Module If the PC running BWConfig has a 25-pin serial port, use a 25-pin to 25-pin null- modem (pins 2 and 3 swapped) cable to connect the PC to the X-gateway. If the PC has a 9-pin serial port (or USB serial adapter), use a 9-pin to 25-pin straight through cable.
  • Page 17 Configuration 3-3 BWConfig User Interface The Anybus Configuration Tool’s user interface is shown in Figure 3-1. Figure 3-1 BWConfig User Interface © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 18 X-gateway module. This will overwrite any configuration that is displayed on the tool’s user interface. Download Configuration Send the configuration shown on the tool’s user interface to the X-gateway module. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 19 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. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 20: Modbus Network Configuration

    (J1939 message transmission is suspended in Idle mode.) The module will switch to, and remain in, Run mode when messages are being received from a master. Table 3-1 Modbus Network Configuration Parameters © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 21: J1939 Network Configuration

    Up to 10 address. addresses may be in the See “Address Management” on page 6-1 for list. details on how the address list is used. Table 3-2 J1939 Network Configuration Parameters © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 22 250K. Do not set the baud rate to a rate other then 250K unless you know for certain that the devices on the J1939 are communicat- ing at the other baud rate. Table 3-2 J1939 Network Configuration Parameters © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 23 Each component of the NAME value is broken out and displayed in the lower fields of the dialog; components can be edited individually using these fields. Pressing the Apply button will update either set of fields to reflect the changes that were made. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 24: J1939 I/O Configuration

    200 total data points in the configuration. This is the combined number of input and ouput data points. Up to 120 different PGN’s may be monitored by input data points Up to 100 different PGN’s may be transmitted by output data points © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 25 Note: The J1939 I/O configuration is initialized at module bootup and whenever a new configuration is downloaded to the module from BWConfig. Any changes made to the I/O configuration will take place immediately after the configuration is downloaded to the module. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 26 Input table. If this is an output data point, a message with this PGN will be built and transmitted using data from the Output table. Table 3-3 J1939 I/O Data Point Parameters © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 27 If the Update Rate is set to 0, the message will only be transmitted when a Request PGN is received for the con- figured PGN. Table 3-3 J1939 I/O Data Point Parameters (Continued) © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 28 The message priority to be used when trans- mitting the message on the J1939 network. Note that this parameter is only available on Output data points. The default priority is 6. Table 3-3 J1939 I/O Data Point Parameters (Continued) © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 29 PGN configuration. Figure 3-4 shows the data point editor dialog when a diagnostic type is selected. Figure 3-4 J1939 Data Point Editing Dialog for Diagnostics © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 30 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. Any changes made to the I/O configuration will take place immediately after the con- figuration is downloaded to the module. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 31: Modbus Interface

    Network Communication Protocol The Anybus X-gateway J1939 to Modbus Interface supports the Modbus RTU serial protocol. The module acts as a Modbus slave on the network. i.e. The mod- ule does not transmit any messages on the network unless they have been requested by the Modbus master.
  • Page 32: Supported Modbus Functions

    AND and OR Mask provided. The register is set using the following formula:        ANDMask ORMask ANDMask Table 4-1 Supported Modbus Function Codes © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 33: Diagnostic Subfunctions

    Read Modbus slave message counter. This is the number of Modbus messages that have been addressed to the JMI since bootup or the last counter reset. Table 4-3 Supported Modbus Diagnostic Subfunctions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 34 This is the number of times a CAN frame has been received before the previous CAN frame has been handled since bootup or the last counter reset. Table 4-3 Supported Modbus Diagnostic Subfunctions (Continued) © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 35 The JMI is online and is actively participating in J1939 network activ- ity. The J1939 network interface is initializing and has not yet joined the network. Table 4-5 J1939 Status Register Values © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 36 A transmit message queue has overflowed at least one time since bootup or the last fault reset. 7-15 Not used. Table 4-6 J1939 Fault Register Bit Definitions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 37: Modbus Addressing

    The first byte of the table is addressed as 1, word address 2 accesses the third byte of the table, and so on. Input Input Register Table Offset 30001 30002 31024 2046 Holding Output Register Table Offset 40001 40002 41024 2046 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 38 1-8 address the first byte of the table, bits 9-16 the second byte, and so on. Input Input Table Offset (byte, bit) 10001 10002 19999 1249,7 Coil Output Table Offset (byte, bit) 00001 00002 09999 1249,7 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 39: Diagnostic Registers

    Modbus receive overrun counter. 32008 J1939 status register. 32009 J1939 fault register. 32010 J1939 CAN error counter. 32011 J1939 CAN bus-off counter. 32012 J1939 CAN receive overrun counter. Table 4-7 Input Register Addresses for Diagnostics © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 40: Interaction With I/O Tables

    (register) data as it is transferred between the I/O tables and the Modbus network. See “J1939 Network Configuration” on page 3-7 for details on this option. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 41: Example Application

    The data from the system controller is to be produced using PGN 256. The data is a 16-bit value and will be placed into the first 2 bytes of the message data. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 42: Modbus Network Configuration

    Figure 5-3 Example Modbus Network Configuration The JMI’s Modbus network address must be set to an unused address on the Mod- bus network. The master connection time-out has been set to 5 seconds. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 43: J1939 Network Configuration

    The network address list is set to a single address of 128. The Swap I/O Bytes option has been enabled so that the data will be in the right byte orientation when accessing it via Modbus. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 44: J1939 I/O Configuration

    Both data points monitor the network for messages with PGN 4608 and any source address (Target Address 255 specifies “don’t care” source address). The resulting Input table provides the following Modbus Input Register addresses: 30001 Value #1 30002 Value #2 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 45 “J1939 Diagnostic Messages” on page 6-9 for details on the content of the Input Registers. 30051 Table header 30052, 30053 Table entry #1 30054, 30055 Table entry #2 30070, 30071 Table entry #10 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 46 (Target Address 255) so that it can be seen by everyone on the network. The Modbus Holding Register address 40001 will be used by the system control- ler to set the data for the message. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 47: J1939 Interface

    J1939 network using that address. If an address cannot be claimed, the module moves to the next address in the list and attempts to claim that address. If no addresses in the list can be claimed, the module remains offline. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 48: 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) © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 49: Message Transmission

    The JMI does not know the required data length for all possible PGN’s. The Output Data Point configuration must provide a data point that will specify data at the end of the message to ensure that the correct size message is assembled. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 50 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. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 51 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. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 52: Receiving Messages

    Input table according to the data point configura- tion. Data of the configured length is copied from the configured message buffer offset to the configured Input table offset. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 53 Note: The timeout indication (all bits set to 1) will also be used for input data points with non-zero update rates whenever an offline status is detected. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 54: Transport Protocol For Large Messages

    The concurrent sessions may be any mixture of BAM and RTS/ CTS sessions. Additional BAM sessions will be ignored and RTS connec- tion requests will be denied once the limit is reached. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 55: J1939 Diagnostic Messages

    J1939 Amber Warning lamp status. J1939 Red Stop lamp status. J1939 Malfunction lamp status. 8-14 Entry count. The current number of entries in the table. Table overflow indication. Table 6-1 J1939 Diagnostic Table Header Content © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 56 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 6-2 Diagnostic Table Entry Content for SPN Conversion Method 0 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 57 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 6-4 Diagnostic Table Entry Content for SPN Conversion Method 1, Version 2 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 58 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 6-5 Diagnostic Table Entry Content for SPN Conversion Method 1, Version 3 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 59: Bus-Off Reset Option

    CAN errors. Important: THIS OPTION SHOULD NEVER BE ENABLED WHEN THE MODULE IS USED ON A CONTROL NETWORK OF ANY KIND! IT SHOULD BE RESERVED FOR MONITORING NETWORKS. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 60: Offline Detection

    Offline Detection Message, to test for online status. The Offline Detection Message uses PGN 61184 (EF00h) with the source and des- tination address both set to the address of the X-gateway. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 61 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. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 62 If output data point messages are transmitted at a faster rate than the Offline Detection Time, the Offline Detection Message will not be transmitted. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 63: J1939 Baud Rate

    500K baud unless you are certain that all devices on the network are communicating at 500K baud. Important: Configuring the module with the incorrect baud rate may cause other devices on the network to experience bus-off faults. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 64: Status And Diagnostics

    The layout of the LEDs is shown in Figure 7-1. X-gateway Status Modbus Status Not Used J1939 Status Figure 7-1 Anybus X-gateway LEDs X-gateway Status LED State Summary Description No Power No power to the module.
  • Page 65 The Modbus interface is initialized and waiting for requests from a Modbus master. Solid Green Connected The Modbus interface is actively pro- cessing requests from a Modbus mas- ter. Table 7-3 Modbus Status LED States © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 66: Status Codes

    A serial communication parity error has been detected. A serial communication framing error has been detected. A CRC error on a Modbus message has been detected. 7-15 Not used. Table 7-5 Modbus Error Status Bit Definitions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 67 A transmit message queue has overflowed at least one time since bootup or the last fault reset. 7-15 Not used. Table 7-7 J1939 Error Status Bit Definitions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 68: 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-30 VDC. Current Requirements: 93-95 mA at 24 VDC. © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 69: Mechanical Specifications

    Specifications 8-2 Mechanical Specifications Mechanical Rating IP20/NEMA 1 DIN Rail Mount The X-gateway connects to a DIN 3 rail. Dimensions Figure 8-1 Anybus X-gateway J1939 to Modbus Interface Mechanical Dimensions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 70: I/O Data Sizes

    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). © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 71: Connectors

    Modbus RS-485 A Not used Modbus RS-485 B Not used J1939 CAN Shield Not used J1939 CAN Low Not used J1939 CAN High Not used Table 9-1 Power and Network Connector Pin Definitions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 72: Configuration 25-Pin D-Subminiature

    Signal Ground Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Not used Table 9-2 Configuration Connection Pin Definitions © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 73: Support

    +46 (0) 35 17 29 09 Fax: +46 (0) 35 - 17 29 09 Online: www.anybus.com Online: www.anybus.com HMS India E-mail: in-sales@hms-networks.com E-mail: in-support@hms-networks.com Phone: +91 (0) 20 40111201 Phone: +91 (0) 20 40111201 © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...
  • Page 74 Support 10-2 Sales Support Fax: +91 (0) 20 40111105 Fax: +91 (0) 20 40111105 Online: www.anybus.com Online: www.anybus.com © 2012 HMS Industrial Networks AB Doc.Id. HMSI-168-25...

This manual is also suitable for:

Ab7612

Table of Contents