J1939/Modbus Slave Gateway FAQ v1.2
J1939/Modbus Slave Gateway FAQ v1.2
(For GW-7228/GW-7238D)
Table of Contents
Q01 : How to solve CAN Bus Transmission Fail problem? ................................................................ 2
Q02 : How to solve CAN Bus-Off problem? ...................................................................................... 2
Q03 : Why the gateway can not transmit J1939 output messages? ................................................ 2
Q04 : How to restore factory default?.............................................................................................. 3
Q05 : What is the communication Baud Rate in J1939 protocol?.................................................... 3
Q06 : Should I add the termination resistor (120Ω) between CAN-H and CAN-L with our engine,
when it connect to the gateway? ............................................................................................ 3
Q07 : Explain the Device Name and Network Address Configuration in the Utility......................... 4
Q08 : What’s the relation between the address in the J1939 Input/Output Table and the J1939
device? .................................................................................................................................... 5
Q09 : Is Input or Output Table for getting the J1939 messages from the engine?..................... 5
Q10 : The J1939 Input Table configuration with common PGNs from the engine. ......................... 6
Q11 : Example of the J1939 Input/Output Table configuration. ................................................. 7
Q12 : How to get the parameter from engine if the source address of the engine is unknown? ... 8
Q13 : How to configure the gateway to send requested speed to the engine? .............................. 9
Q03 : Why the gateway can not transmit J1939 output messages?
A03 :
1. Make sure the Start/Stop sending J1939 output messages register (42009) is 0.
2. Make sure the Update Rate of J1939 output messages table is not zero.
Q06 : Should I add the termination resistor (120Ω) between CAN-H and CAN-L with
our engine, when it connect to the gateway?
A06 :
It depends on the environment, we usually use the oscilloscope to measure the CAN bus signals,
it will be determined according to the waveform, please refer the following figure.
➢ In this situation, we recommend to add termination resistor.
Q07 : Explain the Device Name and Network Address Configuration in the Utility.
A07 :
Device Name
The “Device Name” is not the name of the connected J1939 devices. It is the name of the J1939
gateway itself. In general, it will not affect the function without changing it.
A08 :
The J1939 gateway can receive the J1939 messages from the J1939 device. The J1939 gateway
can also send out the J1939 messages to the J1939 device on the bus.
J1939 Input Table is the configuration table for the gateway to receive the J1939 messages
from the J1939 devices. The “Address” field is the “Source Address” in the table, which is
the address of the J1939 device.
J1939 Output Table is the configuration table for the gateway to send out the J1939
messages to the J1939 devices. The “Address” field is the “Destination Address” in the table,
which is the address of the J1939 device.
Q09 : Is Input or Output Table for getting the J1939 messages from the engine?
A09 :
Please refer to the J1939 Input Table configuration and the comparision table in the “Q10”.
These configurations for getting the speed, temperature, pressure, etc. of engine should be
added to the J1939 Input Table in the utility.
The J1939 PGN/SPN Tx messages listed in the engine manual are J1939 messages sent from the
ECU of the engine to the gatway. They should be configured in the J1939 Input Table.
The J1939 PGN/SPN Rx messages listed in the engine manual are J1939 messages got by the ECU
of the engine from the gateway. They should be configured in the J1939 Output Table.
The SPN 190 (Engine Speed) is located at the 4th, 5th byte (Start Position 4-5) and the length is 2
bytes. The value of the SPN 190 is integer which need to be multiplied by the
“Resolution”(Table 2) to convert it to the physical speed. Users can refer to the engine manual
for more detailed information on the supported PGNs.
To get the SPN 190 (Engine Speed) from engine, a PGN 61444 item should be added to the
J1939 Input Table in the utility. Map the SPN 190 (Engine Speed) to the address 30001 of the
Modbus input register in the gateway for the request by the Modbus master as depicted in the
following figure 1.
Q12 : How to get the parameter from engine if the source address of the engine is
unknown?
A12 :
For the Source Address in the J1939 input configuration table, it shall only be one device on the
network with a given source address, messages received must match both the PGN and source
address to be used for this data field. If the Source Address set to 255, any message with a
matching PGN will be accepted.
Please refer to the manual for details about these parameters. The payload (8 bytes) of the PGN
0 message is mapped to the Modbus Holding registers 40001 ~ 40003 in the gateway (according
to Output Register = 0 and Data Length = 8).
Download the configuration to the gateway to take effect the settings ([File]=>[Download
Parameter]). The gateway sends out the PGN 0 messages continuously after download.
If you want 1000 rpm set to the engine, 1000 rpm is multiplied with 8 to give 8000 (decimal),
1F40h in hex (big endian). Flip these bytes to get little endian format, 401Fh. The payload of the
PGN 0 message will look like this:
Identifier Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8
0C000003 01 40 1F 00 FF FF FF FF
s
Use Modbus FC16 command to setup the requested speed 1000 rpm.
(hex) 01 10 00 00 00 04 08 01 40 1F 00 FF FF FF FF 35 89