background image

 

GW-7228 J1939/Modbus RTU Slave Gateway 

User’s Manual (Ver 1.3, Apr/2011) ------------- 45

 

Get J1939 input data  

 
Using the Modbus command as below: 

FC4  Read multiple input registers (3xxxx)  for AI

 

 

[Request] (Request by Modbus master device) 

    Byte 0:                  Net ID (Station number) 
    Byte 1:                  FC=04 
    Byte 2-3:               Reference number 
    Byte 4-5:               Word count 
    Byte 6-7:               Value for the CRC calculation 
 

 

[Response] (Response from the GW-7228) 

    Byte 0:                  Net ID (Station number) 
    Byte 1:                  FC=04 
    Byte 2:                  Byte count of response (B=2 x word count) 
    Byte 3-(B+2):        Register values 
    Byte (B+3)-(B+4): Value for the CRC calculation 
 

Example: 

 

Read a value of one word in the address 30001. 

[Request] (Byte0, Byte1... Byten) (Hex)  
01 04 00 00 00 01 31 CA 
 

GW-7228 responds a value of one word in the address 30001. 

[Response](Byte0, Byte1... Byten) (Hex)  
01 04 02 

12 34

 B4 47 

 
 
 
 
 
 
 
 
 
 

Summary of Contents for GW-7228

Page 1: ...GW 7228 J1939 Modbus RTU Slave Gateway User s Manual Ver 1 3 Apr 2011 1 User s Manual www icpdas com GW 7228 J1939 Modbus RTU Slave Gateway ...

Page 2: ...P DAS is believed to be accurate and reliable However no responsibility is assumed by ICP DAS for its use or for any infringements of patents or other rights of third parties resulting from its use Copyright Copyright 2010 by ICP DAS All rights are reserved Trademark The names used for identification only may be registered trademarks of their respective companies Document Revision Version Author D...

Page 3: ...Operation Mode 16 2 7 LED Indication 17 2 8 Cable Selection 18 3 Software 20 3 1 Configuration Tool GW 7228 Utility 20 3 2 GW 7228 Utility 21 3 2 1 Connection Screen 21 3 2 2 Main Screen 23 4 Communication Network 30 4 1 Modbus Network 30 4 1 1 Supported Modbus Functions 30 4 1 2 Modbus Address 30 4 2 J1939 Network 32 4 2 1 Communication Methods 32 4 2 2 Parameter Groups 32 4 2 3 Suspect Parameter...

Page 4: ...odbus RTU Slave Gateway User s Manual Ver 1 3 Apr 2011 4 5 2 2 J1939 Network Configuration 40 5 2 3 J1939 I O Configuration 41 5 2 4 Upload Parameter to the GW 7228 43 5 3 Modbus Communication 44 6 Troubleshooting 47 ...

Page 5: ...on specific type of J1939 messages From the view of Modbus RTU network the GW 7228 is a Modbus RTU slave to reply the request from Modbus RTU master We provide Utility software for users to configure the parameters of J1939 Modbus RTU of the GW 7228 The application fields can be Diesel power train applications In Vehicle networks for trucks and buses etc The following is the application architectu...

Page 6: ...ges including PDU1 PDU2 broadcast and destination specific J1939 Transport Protocol for transmission and reception of large messages 9 1785 bytes Support BAM of Connection Management Message Network addresses management Support RS 232 RS 485 and RS 422 interfaces Support Modbus RTU slave protocol Configurable for Modbus Network ID 1 250 Configurable baud rates of 2400 4800 9600 19200 38400 57600 1...

Page 7: ...m H x W x D Operating temperature 25 to 75ºC 13 to 167ºF Storage temperature 40 to 80ºC 40 to 176ºF Humidity 5 to 95 non condensing LEDs PWR LED for power J1939 LED for J1939 communication MODBUS LED for Modbus communication Software Utility Tool Provide Modbus network configuration interface Provide J1939 network configuration interface Network Address Device Name etc Provide J1939 Input Output c...

Page 8: ...pr 2011 8 2 Hardware Figure 2 1 Hardware externals of the GW 7228 2 1 Block Diagram Figure 2 2 is a block diagram illustrating the functions on the GW 7228 module It provides the 3000Vrms Isolation in the CAN interface site Figure 2 2 Block diagram of the GW 7228 ...

Page 9: ...ion 1 Not Connect 2 CAN Low 3 CAN Ground 4 Not Connect 5 6 CAN Ground 7 CAN High 8 Not Connect 9 Table 2 2 14 pin screw terminal connecter Pin Description 1 RS 485 DATA 2 RS 485 DATA 3 Not Connect 4 RS 422 Tx 5 RS 422 Tx 6 RS 422 Rx 7 RS 422 Rx 8 Not Connect 9 RS 232 RXD 10 RS 232 TXD 11 RS 232 GND 12 Not Connect 13 Vs 10 30 VDC 14 GND ...

Page 10: ... CAN interface for J1939 network and three serial interfaces for Modbus network 2 3 1 CAN port connection The pin assignment of the CAN port on the GW 7228 DB9 male is defined in both the CANopen DS102 profile and in appendix C of the DeviceNet specifications It is the standard pin assignment for CAN The hardware connection between device and the GW 7228 is as Figure 2 4 Figure 2 4 CAN Hardware Wi...

Page 11: ...and the screw terminal connector on the module The GW 7228 offers three serial interfaces to the user and not through any setting It is recommended to use only one serial port RS232 RS422 or RS485 of the gateway at the same time The following figures describe the three COM port types to a serial device via serial network Figure 2 5 RS 232 Wire Connection Figure 2 6 RS 422 Wire Connection Figure 2 ...

Page 12: ... for proper operation as shown in the below figure Figure 2 8 Terminal Resistor Therefore the GW 7228 module supplies a jumper for users to active the terminal resistor or not If users want to use this terminal resistor please open the GW 7228 cover and use the JP3 to activate the 120Ω terminal resistor built in the module as the Figure 2 9 Note that the default setting is active Figure 2 9 Termin...

Page 13: ...upplies a jumper for users to active the watchdog timer or not If users want to use this WDT can open the GW 7228 cover and use the JP1 to activate the WDT built in the module as the Figure 2 9 Note that the default setting is active Enable default Disable Figure 2 11 Watchdog timer JP1 Jumper Position 2 6 Init Normal Dip switch On the back of the GW 7228 module there is a dip switch used for firm...

Page 14: ...14 reset the power of the module In this mode users can update the firmware of the GW 7228 module from computer s RS 232 port via CA 0910 cable shown as Figure 2 14 Figure 2 12 Init Position of Dip Switch Figure 2 13 CA 0910 Cable Figure 2 14 Firmware downloads connection ...

Page 15: ...n to choose firmware file e g GW7228 fw 3 Click Firmware Update button to start firmware updating process The result will show in Firmware Update field Figure 2 15 GW 7228 firmware update process The GW 7228 firmware can be downloaded from http ftp icpdas com pub cd fieldbus_cd J1939 gateway gw 7228 firmware The Firmware_Update_Tool program can be downloaded from http ftp icpdas com pub cd fieldbu...

Page 16: ...on Mode In the operation mode users need to set the dip switch to the Normal position as Figure 2 16 and reset the power The GW 7228 can run in the operation mode In this mode users can use the Modbus Master command to set get J1939 messages via COM port Figure 2 16 Normal Position of Dip Switch ...

Page 17: ...ror that has occurred The PWR LED is normally turned on when the module works in a good condition When the Bus Off error is happened the PWR LED will blink per 500 ms until the Bus Off condition disappears If the CAN message can t be sent out successfully then the PWR LED will blink per 100 ms 2 J1939 LED It is used to show whether the GW 7228 is transmitting receiving CAN messages The J1939 LED w...

Page 18: ...US LED Transmission Blink Bus Idle Off 2 8 Cable Selection The CAN bus is a balanced differential 2 wire interface running over either a Shielded Twisted Pair STP Un shielded Twisted Pair UTP or Ribbon cable The CAN L and CAN H Wire start on one end of the total CAN network that a terminator of 120 Ohm is connected between CAN L and CAN H The cable is connected from CAN node to CAN node normally w...

Page 19: ...0k bit s at 500m 0 5 0 6 mm2 20AWG 60 mOhm 150 300 Ohm 300 600m 500k bit s at 100m 0 34 0 6mm2 22AWG 20AWG 40 mOhm 127 Ohm 40 300m 1000k bit s at 40m 0 25 0 34mm2 23AWG 22AWG 40 mOhm 124 Ohm 0 40m Note The AWG means a standard method used to measure wire The numbering system works backwards from what people would think the thicker heavier the wire the lower the number For example a 24AWG wire is t...

Page 20: ...o configure the parameters associated with the Modbus and J1939 network interfaces as well as to layout of the I O table and set up the contents GW 7228 Utility is a Microsoft Windows application that communicates with a GW 7228 over a standard RS 232 RS 422 RS 485 serial link by using the PC serial port It is compatible with Microsoft Windows 95 98 NT 2000 Vista and 7 The GW 7228 Utility can be d...

Page 21: ...ration for connection parameters 1 COM The serial com port number COM1 COM32 2 Baud Rate Serial com port baud rate setting 2400 115200 bps default 115200 3 Parity Serial com port parity setting NONE ODD EVEN default NONE 4 Net ID Modbus network Net ID setting 1 250 default 1 5 Data Bits Serial com port data bits setting Fixed at 8 6 Stop Bits Serial com port stop bits setting 1 2 default 1 Figure ...

Page 22: ...tatus such as Interface Data Created Error Firmware Version would be shown otherwise it shows abnormal connection screen as Figure 3 2 and Figure 3 3 Figure 3 2 Open COM Error Screen Figure 3 3 COM Receive Time Out Error Screen Figure 3 4 COM Connection Successful Screen Table 3 1 GW 7228 error status Error Code Status 00 No Error 01 Can t Claim Address in J1939 Network 02 CAN Bus Off 04 CAN Bus T...

Page 23: ...ity Main Screen Display Areas 1 GW 7228 Status Display the module type and status information about the GW 7228 module that was detected 2 Modbus Configuration of Modbus network parameters 3 J1939 Configuration of J1939 network parameters 4 J1939 I O table Configuration of the contents and layout of the I O tables ...

Page 24: ...module in address claim messages 7 About Display the GW 7228 utility version Modbus Configuration The Modbus configuration contains the parameters used to control the behavior of the Modbus serial interface The parameters are described as Table 3 2 All modules on the network must use the same baud parity data stop bits configuration Table 3 2 Modbus Configuration Parameters Item Description Range ...

Page 25: ... When Can Bus off the module will auto reset the CAN controller Enable Disable PDU1 Check Destination Address Enable Disable to check the destination address in PDU1 mode Enable Disable Swap IO Byte If this option is enabled data in the I O table would be byte swapped on 16 bit boundaries this function is easy reading the J1939 data on Modbus network Enable Disable Auto Transmission Enable or Disa...

Page 26: ...ry Address Capable Industry Group Vehicle System Instance Vehicle System Reserved Function Function Instance ECU Instance Manufacturer Code Identity Number 1 bit 3 bit 4 bit 7 bit 1 bit 8 bit 5 bit 3 bit 11 bit 21 bit Byte 8 Byte 7 Byte 6 Byte 5 Byte 4 Byte 3 Byte 2 Byte 1 J1939 Input Output Table The J1939 Input Output table is used define the content and format of the J1939 messages The Data fro...

Page 27: ...he Modbus master Input data points are associated with data from messages that are received on the J1939 network Output Table The Output table holds data that is written by the Modbus master and will be transmitted on the J1939 network Output data points are associated with data of messages that will be transmitted on the J1939 network Figure 3 7 J1939 Input Output Configuration Table ...

Page 28: ...o the Modbus AI Output table Output Register Offset Byte Modbus Output Register Word 0 1 40001 LSB MSB 2 3 40002 LSB MSB 3070 3071 41536 LSB MSB 0 1535 byte Data Length The amount of the data to be transferred between the Modbus I O table and the J1939 message data the length is in bytes 0 1785 byte PGN The J1939 PGN is associated with this data field In Input Table the data from messages received...

Page 29: ...used for this data field If the Source Address is 255 any message with a matching PGN will be accepted 0 253 255 Update Rate In the input table the data will be updated within the configured Update Rate If no update is received within the configured time the module will request the data point s PGN by transmitting a Request PGN to the Source Address If the Update Rate is set to zero the PGN will n...

Page 30: ...1 Supported Modbus Function Codes Function Code Function Name Description 3 03 Hex Reading Holding Register Read multiple registers 4xxxx for AO 4 04 Hex Reading Input Register Read multiple input registers 3xxxx for AI 6 06 Hex Preset Single Register Write single register 4xxxx for AO 16 10 Hex Preset Multiple Registers Write multiple registers 4xxxx for AO 4 1 2 Modbus Address Only the areas of ...

Page 31: ...output J1939 messages in the GW 7228 It can use the Modbus functions code 6 06 Hex and 16 10 Hex to change the register Table 4 4 Start Stop the transmission register of J1939 output message Register Description 42009 Dec 7D8 Hex If Value 0 Start the transmission of output J1939 message If Value 1 Stop the transmission of output J1939 message The following register address is defined the error sta...

Page 32: ...pecific communications use PDU1 but also the global destination address 255 There are cases where this method will require the utilization of destination specific Parameter Group Numbers for instance in the case of more than one engine A torque message for example must be sent only to the desired engine and not to both Broadcast Communications Broadcast communications use PDU2 and as the name impl...

Page 33: ... Figure 4 1 Example of a parameter group definition of SAE J1939 71 4 2 3 Suspect Parameter Number SPN A Suspect Parameter Number SPN is a number assigned by the SAE to a specific parameter within a parameter group SPN that shares common characteristics are grouped into Parameter Groups PG and they will be transmitted throughout the network using the Parameter Group Number PGN To follow up on the ...

Page 34: ...r Groups and Parameter Group Numbers Figure 4 3 SPN PG and PGN structure 4 2 4 J1939 Message Transmission In the GW 7228 messages are transmitted on the J1939 network according to the J1939 output configuration table Messages are assembled from data in the output table and transmitted on a cyclic time basis Messages are transmitted automatically based on the Update Time parameter in the output dat...

Page 35: ...6 Transport Protocol for Large Messages Transmission and Reception of Large Messages 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 Users should reference the J1939 21 specification It provides the description of when an...

Page 36: ...rough the Modbus network for the ECU to the J1939 network Figure 5 1 Application network structure 5 1 Hardware Installation Users may need to make some hardware settings before the application The detailed illustration is as below Step1 Check GW 7228 Firmware Mode In operation mode users can use the Modbus Master command to send and receive J1939 messages via the GW 7228 Users need to set the dip...

Page 37: ... 3 Apr 2011 37 Figure 5 2 Operation mode Position of Dip Switch Step2 Enable the 120Ω terminator resistor Please open the GW 7228 cover and use the JP3 to activate the 120Ω terminal resistor built in the module as the Figure 5 3 Figure 5 3 JP3 Jumper Position ...

Page 38: ...ules and ECU e g engine in J1939 network using the following structure as Figure 5 4 Figure 5 4 CAN bus Wire Connection Step4 Modbus network Serial port connection It is recommended to use only one serial port RS232 RS422 or RS485 of the gateway at the same time The following figures describe the three COM port types to a serial device via serial network ...

Page 39: ...anual Ver 1 3 Apr 2011 39 Figure 5 5 Serial Port Wire Connection Step5 Power wire connection Connect the power supply to the GW 7228 module s power terminal connecter please see the following connection as Figure 5 6 Figure 5 6 Power Wire Connection ...

Page 40: ... Utility 5 2 GW 7228 Utility Configuration 5 2 1 Modbus Network Configuration The GW 7228 and the controller must be set the same serial communication parameters of the Modbus network configuration The Modbus network configuration screen from the GW 7228 is shown as Figure 5 8 Figure 5 8 Modbus configuration screen 5 2 2 J1939 Network Configuration The device NAME should be set according to the ap...

Page 41: ...enabled the data will be in the right byte orientation when accessing it via Modbus The Network Address list is set to 1 5 2 3 J1939 I O Configuration The following figure is a PGN definition about Electronic Transmission Controller when users want to receive the Transmission Output Shaft Speed from the transmission and send the Transmission Input Shaft Speed to the transmission via the GW 7228 Fi...

Page 42: ...S MODBUS Address Send Input Shaft Speed 61442 Dec F002 Hex 2 5 0 40001 Receive Output Shaft Speed 61442 Dec F002 Hex 2 1 0 30001 Note PGN Data Length Bytes Byte Oder in J1939 Data Field Transmission manufacturers provide the information required Byte Order in MODBUS User defined Modbus address Figure 5 11 J1939 configuration screen Byte Order In Modbus Data Length PGN Dec Priority ECU s J1939 Addr...

Page 43: ...er to the GW 7228 After the previous parameter settings users need to upload the parameters to the GW 7228 Please refer to the following figure to finish the operation Figure 5 12 Parameter upload screen Figure 5 13 Confirm Parameter upload screen Figure 5 14 Parameter upload successful screen ...

Page 44: ...number Byte 4 5 Word count Byte 6 Byte count B 2 x word count Byte 7 B 6 Register values Byte B 7 B 8 Value for the CRC calculation Response Response from the GW 7228 Byte 0 Net ID Station number Byte 1 FC 10 Hex Byte 2 3 Reference number Byte 4 5 Word count Byte 6 7 Value for the CRC calculation Example In the address 40001 write the value in 0x1234 Request Command Byte0 Byte1 Byten Hex 01 10 00 ...

Page 45: ...number Byte 4 5 Word count Byte 6 7 Value for the CRC calculation Response Response from the GW 7228 Byte 0 Net ID Station number Byte 1 FC 04 Byte 2 Byte count of response B 2 x word count Byte 3 B 2 Register values Byte B 3 B 4 Value for the CRC calculation Example Read a value of one word in the address 30001 Request Byte0 Byte1 Byten Hex 01 04 00 00 00 01 31 CA GW 7228 responds a value of one ...

Page 46: ...Net ID Station number Byte 1 FC 06 Hex Byte 2 3 Reference number Byte 4 5 Register value Byte 6 7 Value for the CRC calculation Example Start sending J1939 output message In the address 42009 write the value in 0x00 Request Command Byte0 Byte1 Byten Hex 01 06 07 D8 00 00 08 85 GW 7228 responds the register value Response Byte0 Byte1 Byten Hex 01 06 07 D8 00 00 08 85 Example Stop sending J1939 outp...

Page 47: ...ility 4 Can not transmit the output J1939 message 1 Make sure the Start Stop sending J1939 output message register 42009 is 0x00 2 Make sure the Update Rate of J1939 output message table is not zero 5 How to restore factory default 1 Power on the GW 7228 2 Change the Dip Switch position of the GW 7228 and to complete the following steps in 5 seconds Step1 From Normal to Init position Step2 From In...

Page 48: ... Gateway User s Manual Ver 1 3 Apr 2011 48 4 Reset the power of the GW 7228 and the GW 7228 would back to factory defaults 6 Reconnect the GW 7228 by using the network setting as 115200 baud with none parity 1 stop bit and 1 Net ID ...

Reviews: