Skip to content

XINJE Modbus RTU

The Neuron XINJE Modbus RTU plugin is for collecting XINJE PLC tags using the Modbus RTU protocol, supporting XINJE XC/XD/XL PLC models.

Add Device

Go to Configuration -> South Devices, then click Add Device to add the driver. Configure the following settings in the popup dialog box.

  • Name: The name of this device node.
  • Plugin: Select the XINJE Modbus RTU plugin.

Device Configuration

After clicking Create, you will be redirected to the Device Configuration page, where we will set up the parameters required for Neuron to establish a connection with the device. You can also click the device configuration icon on the southbound device card to enter the Device Configuration interface.

ParameterDescription
PLC ModelSelects the XINJE PLC model.
Physical LinkSelects the communication medium, either serial or Ethernet.
Connection TimeoutThe time the system waits for a device to respond to a command.
Maximum Retry TimesThe maximum number of retries after a failed attempt to send a read command.
Retry IntervalResend reading instruction interval(ms) after a failed attempt to send a read command.
Send IntervalThe waiting time between sending each read/write command. Some serial devices may discard certain commands if they receive consecutive commands in a short period of time.
EndiannessByte order of tags with 32 bits, ABCD corresponds to 1234.
Serial DeviceOnly needed in Serial mode, the path to the serial device when using a serial connection, e.g., /dev/ttyS0 in Linux systems.
Stop BitsOnly for the Serial mode, the serial connection parameter.
ParityOnly for the Serial mode, the serial connection parameter.
Baud RateOnly for the Serial mode, the serial connection parameter.
Data BitsOnly for the Serial mode, the serial connection parameter.
Connection ModeOnly for the Ethernet mode, you can choose Neuron as the TCP client or server.
IP AddressOnly for the Ethernet mode, the IP address of the device when using TCP connection with Neuron as the client, or the IP address of Neuron when using TCP connection with Neuron as the server. The default value is 0.0.0.0.
PortOnly for the Ethernet mode, the port number of the device when using TCP connection with Neuron as the client, or the port number of Neuron when using TCP connection with Neuron as the server.
Maximum Retry TimesThe maximum number of retries after a failed attempt to send a read command.
Retry IntervalResend reading instruction interval(ms) after a failed attempt to send a read command.

The XINJE Modbus RTU plugin configuration is similar to that of the Modbus RTU driver module.

Configure Data Groups and Tags

After the plugin is added and configured, the next step is to establish communication between your device and Neuron by adding groups and tags to the Southbound driver.

Once device configuration is completed, navigate to the South Devices page. Click on the device card or device row to access the Group List page. Here, you can create a new group by clicking on Create, then specifying the group name and data collection interval.

Upon successfully creating a group, click on its name to proceed to the Tag List page. This page allows you to add device tags for data collection. You'll need to provide information such as the tag address, attributes, and data type.

For information on general configuration items, see Connect to Southbound Devices. The subsequent section will concentrate on configurations specific to the driver.

Data types

  • BIT
  • INT8
  • UINT8
  • INT16
  • UINT16
  • INT32
  • UINT32
  • INT64
  • UINT64
  • FLOAT
  • DOUBLE
  • STRING
  • BYTES

Address format

SLAVE!ADDRESS[.BIT][#ENDIAN][.LEN[H][L][D][E]][.BYTES]

The address format is nearly the same to that of the Modbus RTU driver module, the only difference is in the ADDRESS part.

SLAVE

Required, Slave is the slave address or site number.

ADDRESS

XINJE PLC maps memory data unit (input/output relay, timer, counter etc) onto the Modbus address space for access through the Modbus RTU protocol. Depending on the PLC model, such address mapping may vary. The Neuron XINJE Modbus RTU plugin frees users from details of the address mapping, and designates the PLC data unit name as the ADDRESS.

Users could check the address mapping according to the PLC model from XINJE official documents, and the following tables are listed here for convenience.

NOTICE

The X and Y area' data units are numbered in octal.

As an example, for XC1/XC2/XC3/XC5/XCM/XCC PLC models:

  • X0~X7:16384~16384+7
  • X10~X17:16384+8~16384+15
  • X70~X77:16384+56~16384+63
  • XC1/XC2/XC3/XC5/XCM/XCC PLC models:
AreaModbus Address RangeQuantityAttributeRegister SizeData Type
M0-M7999 (Coils)0x0000-0x1F3F (0-7999)8000Read/Write1BitBIT
X0-X1037 (Coils)0x4000-0x421F (16384-16927)543Read/Write1BitBIT
Y0-Y1037 (Coils)0x4800-0x4A1F (18432-18975)543Read/Write1BitBIT
S0-S1023 (Coils)0x5000-0x53FF (20480-21503)1024Read/Write1BitBIT
M8000-M8511 (Coils)0x6000-0x61FF (24576-25087)512Read/Write1BitBIT
T0-T618 (Coils)0x6400-0x666A (25600-26218)619Read/Write1BitBIT
C0-C634 (Coils)0x6C00-0x6E7A (27648-28282)635Read/Write1BitBIT
D0-D7999 (Hold Registers)0x0000-0x1F3F (0-7999)8000Read/Write16Bit,2ByteVarious
TD0-TD618 (Hold Registers)0x3000-0x326A (12288-12906)619Read/Write16Bit,2ByteVarious
CD0-CD634 (Hold Registers)0x3800-0x3A7A (14336-14970)635Read/Write16Bit,2ByteVarious
D8000-D8511 (Hold Registers)0x4000-0x41FF (16384-16895)512Read/Write16Bit,2ByteVarious
FD0-FD5000 (Hold Registers)0x4800-0x5B88 (18432-23432)5000Read/Write16Bit,2ByteVarious
FD8000-FD8511 (Hold Registers)0x6800-0x69FF (26624-27135)512Read/Write16Bit,2ByteVarious
ED0-ED36863 (Hold Registers)0x7000-0xFFFF (28672-65535)36864Read/Write16Bit,2ByteVarious
  • XD1/XD2/XD3/XL1/XL3 PLC models:
AreaModbus Address RangeQuantityAttributeRegister SizeData Type
M0-M7999 (Coils)0x0000-0x1F3F (0-7999)8000Read/Write1BitBIT
X0-X77 (Coils)0x5000-0x503F (20480-20543)64Read/Write1BitBIT
X10000-X11177 (Coils)0x5100-0x537F (20736-21375)640Read/Write1BitBIT
X20000-X20177 (Coils)0x58D0-0x594F (22736-22863)128Read/Write1BitBIT
X30000-X30077 (Coils)0x5BF0-0x5C2F (23536-23599)64Read/Write1BitBIT
Y0-Y77 (Coils)0x6000-0x603F (24576-24639)64Read/Write1BitBIT
Y10000-Y11177 (Coils)0x6100-0x637F (24832-25471)640Read/Write1BitBIT
Y20000-Y20177 (Coils)0x68D0-0x694F (26832-26959)128Read/Write1BitBIT
Y30000-Y30077 (Coils)0x6BF0-0x6C2F (27632-27695)64Read/Write1BitBIT
S0-S1023 (Coils)0x7000-0x73FF (28672-29695)1024Read/Write1BitBIT
SM0-SM2047 (Coils)0x9000-0x97FF (36864-38911)2048Read/Write1BitBIT
T0-T575 (Coils)0xA000-0xA23F (40960-41535)576Read/Write1BitBIT
C0-C575 (Coils)0xB000-0xB23F (45056-45631)576Read/Write1BitBIT
ET0-ET31 (Coils)0xC000-0xC01F (49152-49183)32Read/Write1BitBIT
SEM0-SEM31 (Coils)0xC080-0xC09F (49280-49311)32Read/Write1BitBIT
HM0-HM959 (Coils)0xC100-0xC4BF (49408-50367)960Read/Write1BitBIT
HS0-HS127 (Coils)0xD900-0xD97F (55552-55679)128Read/Write1BitBIT
HT0-HT95 (Coils)0xE100-0xE15F (57600-57695)96Read/Write1BitBIT
HC0-HC95 (Coils)0xE500-0xE55F (58624-58719)96Read/Write1BitBIT
HSC0-HSC31 (Coils)0xE900-0xE91F (59648-59679)32Read/Write1BitBIT
D0-D7999 (Hold Registers)0x0000-0x1F3F (0-7999)8000Read/Write16Bit,2ByteVarious
ID0-ID99 (Hold Registers)0x5000-0x5063 (20480-20579)100Read/Write16Bit,2ByteVarious
ID10000-ID10999 (Hold Registers)0x5100-0x54E7 (20736-21735)1000Read/Write16Bit,2ByteVarious
ID20000-ID20199 (Hold Registers)0x58D0-0x5997 (22736-22935)200Read/Write16Bit,2ByteVarious
ID30000-ID30099 (Hold Registers)0x5BF0-0x5C53 (23536-23635)100Read/Write16Bit,2ByteVarious
QD0-ID99 (Hold Registers)0x6000-0x6063 (24576-24675)100Read/Write16Bit,2ByteVarious
QD10000-QD10999 (Hold Registers)0x6100-0x64E7 (24832-25831)1000Read/Write16Bit,2ByteVarious
QD20000-QD20199 (Hold Registers)0x68D0-0x6997 (26832-26931)200Read/Write16Bit,2ByteVarious
QD30000-QD30099 (Hold Registers)0x6BF0-0x6C53 (27632-27731)100Read/Write16Bit,2ByteVarious
SD0-SD2047 (Hold Registers)0x7000-0x77FF (28672-30719)2048Read/Write16Bit,2ByteVarious
TD0-TD575 (Hold Registers)0x8000-0x823F (32768-33343)576Read/Write16Bit,2ByteVarious
CD0-CD575 (Hold Registers)0x9000-0x923F (36864-37439)576Read/Write16Bit,2ByteVarious
ETD0-ETD31 (Hold Registers)0xA000-0xA01F (40960-40991)32Read/Write16Bit,2ByteVarious
HD0-HD999 (Hold Registers)0xA080-0xA467 (41088-42087)1000Read/Write16Bit,2ByteVarious
HSD0-HSD499 (Hold Registers)0xB880-0xBA73 (47232-47731)500Read/Write16Bit,2ByteVarious
HTD0-HTD95 (Hold Registers)0xBC80-0xBCDF (48256-48351)96Read/Write16Bit,2ByteVarious
HCD0-HCD95 (Hold Registers)0xC080-0xC0DF (49280-49375)96Read/Write16Bit,2ByteVarious
HSCD0-HSCD31 (Hold Registers)0xC480-0xC49F (50304-50335)32Read/Write16Bit,2ByteVarious
FD0-FD5119 (Hold Registers)0xC4C0-0xD8BF (50368-55487)5120Read/Write16Bit,2ByteVarious
SFD0-SFD1999 (Hold Registers)0xE4C0-0xEC8F (58560-60559)2000Read/Write16Bit,2ByteVarious
FS0-FS47 (Hold Registers)0xF4C0-0xF4EF (62656-62703)48Read/Write16Bit,2ByteVarious
  • XD5/XDM/XDC/XD5E/XDME/XL5/XL5E/XL5H/XLME PLC models:
AreaModbus Address RangeQuantityAttributeRegister SizeData Type
M0-M20479 (Coils)0x0000-0x4FFF (0-20479)20480Read/Write1BitBIT
X0-X77 (Coils)0x5000-0x503F (20480-20543)64Read/Write1BitBIT
X10000-X11777 (Coils)0x5100-0x54FF (20736-21759)1024Read/Write1BitBIT
X20000-X20177 (Coils)0x58D0-0x594F (22736-22863)128Read/Write1BitBIT
X30000-X30077 (Coils)0x5BF0-0x5C2F (23536-23599)64Read/Write1BitBIT
Y0-Y77 (Coils)0x6000-0x603F (24576-24639)64Read/Write1BitBIT
Y10000-Y11777 (Coils)0x6100-0x64FF (24832-25855)1024Read/Write1BitBIT
Y20000-Y20177 (Coils)0x68D0-0x694F (26832-26959)128Read/Write1BitBIT
Y30000-Y30077 (Coils)0x6BF0-0x6C2F (27632-27695)64Read/Write1BitBIT
S0-S7999 (Coils)0x7000-0x8F3F (28672-36671)8000Read/Write1BitBIT
SM0-SM4095 (Coils)0x9000-0x9FFF (36864-40959)4096Read/Write1BitBIT
T0-T4095 (Coils)0xA000-0xAFFF (40960-45055)4096Read/Write1BitBIT
C0-C4095 (Coils)0xB000-0xBFFF (45056-49151)4096Read/Write1BitBIT
ET0-ET39 (Coils)0xC000-0xC027 (49152-49183)40Read/Write1BitBIT
SEM0-SEM127 (Coils)0xC080-0xC0FF (49280-49407)128Read/Write1BitBIT
HM0-HM6143 (Coils)0xC100-0xD8FF (49408-55551)6144Read/Write1BitBIT
HS0-HS999 (Coils)0xD900-0xDCEF (55552-56551)1000Read/Write1BitBIT
HT0-HT1023 (Coils)0xE100-0xE4FF (57600-58623)1024Read/Write1BitBIT
HC0-HC1023 (Coils)0xE500-0xE8FF (58624-59647)1024Read/Write1BitBIT
HSC0-HSC39 (Coils)0xE900-0xE927 (59648-59687)40Read/Write1BitBIT
D0-D20479 (Hold Registers)0x0000-0x4FFF (0-20479)20480Read/Write16Bit,2ByteVarious
ID0-ID99 (Hold Registers)0x5000-0x5063 (20480-20579)100Read/Write16Bit,2ByteVarious
ID10000-ID11599 (Hold Registers)0x5100-0x573F (20736-22335)1600Read/Write16Bit,2ByteVarious
ID20000-ID20199 (Hold Registers)0x58D0-0x5997 (22736-22935)200Read/Write16Bit,2ByteVarious
ID30000-ID30099 (Hold Registers)0x5BF0-0x5C53 (23536-23635)100Read/Write16Bit,2ByteVarious
QD0-ID99 (Hold Registers)0x6000-0x6063 (24576-24675)100Read/Write16Bit,2ByteVarious
QD10000-QD11599 (Hold Registers)0x6100-0x673F (24832-26431)1600Read/Write16Bit,2ByteVarious
QD20000-QD20199 (Hold Registers)0x68D0-0x6997 (26832-26931)200Read/Write16Bit,2ByteVarious
QD30000-QD30099 (Hold Registers)0x6BF0-0x6C53 (27632-27731)100Read/Write16Bit,2ByteVarious
SD0-SD4095 (Hold Registers)0x7000-0x7FFF (28672-32767)4096Read/Write16Bit,2ByteVarious
TD0-TD4095 (Hold Registers)0x8000-0x8FFF (32768-36863)4096Read/Write16Bit,2ByteVarious
CD0-CD4095 (Hold Registers)0x9000-0x9FFF (36864-40959)4096Read/Write16Bit,2ByteVarious
ETD0-ETD39 (Hold Registers)0xA000-0xA027 (40960-40999)40Read/Write16Bit,2ByteVarious
HD0-HD6143 (Hold Registers)0xA080-0xB87F (41088-47231)6144Read/Write16Bit,2ByteVarious
HSD0-HSD1023 (Hold Registers)0xB880-0xBC7F (47232-48255)1024Read/Write16Bit,2ByteVarious
HTD0-HTD1023 (Hold Registers)0xBC80-0xC07F (48256-49279)1024Read/Write16Bit,2ByteVarious
HCD0-HCD1023 (Hold Registers)0xC080-0xC47F (49280-50303)1024Read/Write16Bit,2ByteVarious
HSCD0-HSCD39 (Hold Registers)0xC480-0xC4A7 (50304-50343)40Read/Write16Bit,2ByteVarious
FD0-FD8199 (Hold Registers)0xC4C0-0xE4BF (50368-58559)8192Read/Write16Bit,2ByteVarious
SFD0-SFD4095 (Hold Registers)0xE4C0-0xF4BF (58560-62655)4096Read/Write16Bit,2ByteVarious
FS0-FS47 (Hold Registers)0xF4C0-0xF4EF (62656-62703)48Read/Write16Bit,2ByteVarious
  • XDH/XLH PLC models:
AreaModbus Address RangeQuantityAttributeRegister SizeData Type
M0-M20479 (Coils)0x0000-0x4FFF (0-20479)20480Read/Write1BitBIT
X0-X77 (Coils)0x5000-0x503F (20480-20543)64Read/Write1BitBIT
X10000-X11777 (Coils)0x5100-0x54FF (20736-21759)1024Read/Write1BitBIT
X20000-X20177 (Coils)0x58D0-0x594F (22736-22863)128Read/Write1BitBIT
X30000-X30077 (Coils)0x5BF0-0x5C2F (23536-23599)64Read/Write1BitBIT
Y0-Y77 (Coils)0x6000-0x603F (24576-24639)64Read/Write1BitBIT
Y10000-Y11777 (Coils)0x6100-0x64FF (24832-25855)1024Read/Write1BitBIT
Y20000-Y20177 (Coils)0x68D0-0x694F (26832-26959)128Read/Write1BitBIT
Y30000-Y30077 (Coils)0x6BF0-0x6C2F (27632-27695)64Read/Write1BitBIT
S0-S7999 (Coils)0x7000-0x8F3F (28672-36671)8000Read/Write1BitBIT
SM0-SM4095 (Coils)0x9000-0x9FFF (36864-40959)4096Read/Write1BitBIT
T0-T4095 (Coils)0xA000-0xAFFF (40960-45055)4096Read/Write1BitBIT
C0-C4095 (Coils)0xB000-0xBFFF (45056-49151)4096Read/Write1BitBIT
ET0-ET39 (Coils)0xC000-0xC027 (49152-49183)40Read/Write1BitBIT
SEM0-SEM127 (Coils)0xC080-0xC0FF (49280-49407)128Read/Write1BitBIT
HM0-HM6143 (Coils)0xC100-0xD8FF (49408-55551)6144Read/Write1BitBIT
HS0-HS999 (Coils)0xD900-0xDCEF (55552-56551)1000Read/Write1BitBIT
HT0-HT1023 (Coils)0xE100-0xE4FF (57600-58623)1024Read/Write1BitBIT
HC0-HC1023 (Coils)0xE500-0xE8FF (58624-59647)1024Read/Write1BitBIT
HSC0-HSC39 (Coils)0xE900-0xE927 (59648-59687)40Read/Write1BitBIT
D0-D20479 (Hold Registers)0x0000-0x4FFF (0-20479)20480Read/Write16Bit,2ByteVarious
ID0-ID99 (Hold Registers)0x5000-0x5063 (20480-20579)100Read/Write16Bit,2ByteVarious
ID10000-ID11599 (Hold Registers)0x5100-0x573F (20736-22335)1600Read/Write16Bit,2ByteVarious
ID20000-ID20199 (Hold Registers)0x58D0-0x5997 (22736-22935)200Read/Write16Bit,2ByteVarious
ID30000-ID30099 (Hold Registers)0x5BF0-0x5C53 (23536-23635)100Read/Write16Bit,2ByteVarious
QD0-ID99 (Hold Registers)0x6000-0x6063 (24576-24675)100Read/Write16Bit,2ByteVarious
QD10000-QD11599 (Hold Registers)0x6100-0x673F (24832-26431)1600Read/Write16Bit,2ByteVarious
QD20000-QD20199 (Hold Registers)0x68D0-0x6997 (26832-26931)200Read/Write16Bit,2ByteVarious
QD30000-QD30099 (Hold Registers)0x6BF0-0x6C53 (27632-27731)100Read/Write16Bit,2ByteVarious
SD0-SD4095 (Hold Registers)0x7000-0x7FFF (28672-32767)4096Read/Write16Bit,2ByteVarious
TD0-TD4095 (Hold Registers)0x8000-0x8FFF (32768-36863)4096Read/Write16Bit,2ByteVarious
CD0-CD4095 (Hold Registers)0x9000-0x9FFF (36864-40959)4096Read/Write16Bit,2ByteVarious
ETD0-ETD39 (Hold Registers)0xA000-0xA027 (40960-40999)40Read/Write16Bit,2ByteVarious
HD0-HD6143 (Hold Registers)0xA080-0xB87F (41088-47231)6144Read/Write16Bit,2ByteVarious
HSD0-HSD1023 (Hold Registers)0xB880-0xBC7F (47232-48255)1024Read/Write16Bit,2ByteVarious
HTD0-HTD1023 (Hold Registers)0xBC80-0xC07F (48256-49279)1024Read/Write16Bit,2ByteVarious
HCD0-HCD1023 (Hold Registers)0xC080-0xC47F (49280-50303)1024Read/Write16Bit,2ByteVarious
HSCD0-HSCD39 (Hold Registers)0xC480-0xC4A7 (50304-50343)40Read/Write16Bit,2ByteVarious
FD0-FD8199 (Hold Registers)0xC4C0-0xE4BF (50368-58559)8192Read/Write16Bit,2ByteVarious
SFD0-SFD4095 (Hold Registers)0xE4C0-0xF4BF (58560-62655)4096Read/Write16Bit,2ByteVarious
FS0-FS255 (Hold Registers)0xF4C0-0xF5BF (62656-62911)256Read/Write16Bit,2ByteVarious

.BIT

Optional, specify a specific bit in a register

AddressData TypeDescription
D4.0bitPLC data register D4, bit 0
D10.4bitPLC data register D10, bit 4
D1.15bitPLC data register D1, bit 15

#ENDIAN

Optional, byte order, applicable to data types int16/uint16/int32/uint32/float, see the table below for details.

SymbolByte OrderSupported Data TypesNote
#B2,1int16/uint16
#L1,2int16/uint16Default byte order if not specified
#LL1,2,3,4int32/uint32/floatDefault byte order if not specified
#LB2,1,4,3int32/uint32/float
#BL3,4,1,2int32/uint32/float
#BB4,3,2,1int32/uint32/float

TIP

The byte order of a tag has a higher priority than the byte order configuration of a node. That is to say, once the byte order is configured for a tag, it follows the configuration of that tag and ignores the node configuration. The byte order can be illustrated using the notation ABCD, which corresponds directly to the sequence 1234. As an example, the ABCD designation represents the standard or default Endianness 1234. (#LL).

.LEN[H][L]

When the data type is STRING, .LEN is a required field, indicating the number of bytes the string occupies. Each register contains four storage methods: H, L, D, and E, as shown in the table below.

SymbolDescription
HOne register stores two bytes, with the high byte first
LOne register stores two bytes, with the low byte first
DOne register stores one byte, and it is stored in the low byte
EOne register stores one byte, and it is stored in the high byte

.BYTES

Optional, read and write the length of bytes type data, applicable to bytes data type.

TIP

A register of the Modbus driver contains 2 bytes. When reading and writing Modbus register data in the bytes data type, please ensure that the bytes parameter is set to an even number.

Example Addresses

AddressData TypeDescription
D4int16PLC data register D4, byte order #L
D4#Lint16PLC data register D4, byte order #L
D4#Buint16PLC data register D4, byte order #B
D4int32PLC data register D4, byte order #LL
D4#LBuint32PLC data register D4, byte order #LB
D4#BBuint32PLC data register D4, byte order #BB
D4#LLint32PLC data register D4, byte order #LL
D4#BLfloatPLC data register D4, byte order #BL
D1.10StringPLC data register D1, character length 10, byte order L, which occupies addresses D1 to D5
D1.10HStringPLC data register D1, character length 10, byte order H, which occupies addresses D1 to D5
D1.10LStringPLC data register D1, character length 10, byte order L, which occupies addresses D1 to D5
M8bitAuxiliary relay M8
X10bitInput relay X10

Data Monitoring

After completing the point configuration, you can click Monitoring -> Data Monitoring to view device information and control devices. For details, refer to Data Monitoring.