Xinje 4GBOX User manual

4GBOX
wireless data transmission module
User manual
WUXI XINJE ELECTRIC CO., LTD.
File No. MC08 20170724 3.5

Catalog
1-1. SUMMARIZATION........................................................................................................................- 1-
2-1. STRUCTURE................................................................................................................................- 3-
2-2. DIMENSION ................................................................................................................................- 5-
2-3. POWER SUPPLY...........................................................................................................................- 6-
2-4. COMMUNICATION PORT (FOR 4GBOX)......................................................................................- 7-
2-5. STATE DISPLAY ...........................................................................................................................- 8-
2-6. SIGNAL STRENGTH .....................................................................................................................- 8-
2-7. DIP SWITCH ...............................................................................................................................- 8-
2-8. INITIALIZATION TIME..................................................................................................................- 9-
2-9. PRODUCT FEATURES.................................................................................................................- 10 -
3-1. FUNCTION OVERVIEW...............................................................................................................- 10 -
3-2. REMOTE CONFIGURATION ........................................................................................................- 10 -
3-3. FLAG REGISTER........................................................................................................................- 11 -
3-4. USER AUTHORITY.....................................................................................................................- 12 -
3-5. MESSAGE FUNCTION ................................................................................................................- 13 -
3-5-1. Message (phone=> 4G-BOX => PLC) .......................................................................... - 13 -
3-5-2. Message (PLC => 4G-BOX => phone)......................................................................... - 14 -
4-1. PREPARTION .............................................................................................................................- 15 -
4-2. MODULE CONFIGURATION........................................................................................................- 15 -
4-2-1. Serial port setting ........................................................................................................... - 15 -
4-2-2. Function setting .............................................................................................................. - 18 -
4-3. ONLINE MONITORING ...............................................................................................................- 18 -
4-3-1. Get remote information................................................................................................... - 18 -
4-3-2. Remote monitoring ......................................................................................................... - 19 -
5-1. PREPARTION .............................................................................................................................- 20 -
5-2. MODULE CONFIGURATION........................................................................................................- 20 -
5-2-1. Serial port setting ........................................................................................................... - 21 -

5-2-2. Function setting .............................................................................................................. - 22 -
5-3. ONLINE MONITORING ...............................................................................................................- 23 -
5-3-1. Get remote information................................................................................................... - 23 -
5-3-2. Remote monitoring ......................................................................................................... - 23 -
APPENDIX .......................................................................................................................................- 24 -

1. Introduction
1-1. Summarization
XD-4GBOX-ED (4GBOX) is wireless data communication module based on telecom operator
network, supports TCP/IP protocol, is used together with XD and XC series PLC, can be applied
to automation system to perform remote wireless monitoring. The monitoring mode include
message, XCPpro, XD/EPPro software, website, app and so on. It can provide more convenient,
fast and reliable digital and intelligent service for equipment manufacturing, production and
processing, urban construction, warehousing and logistics, intelligent agriculture and other
industries.
4GBOX module include two types which are 4GBOX and XD-4GBOX-ED. Part of them has L
antenna and 3 meters extended antenna, other functions are same with standard type. The
appearance of standard type is shown as below:
4GBOX XD-4GBOX-ED
Compatibility
XD series PLC provide technical support for 4GBOX and XD-4GBOX-ED
XC series PLC provide technical support for 4GBOX
Only support Nano SIM card
Support various telecom operators
××
Features

Support GPS function
4GBOX has standard industrial interface (RS232 or RS485)
As the left extension ED module of XD series PLC, the transmission speed can up to
1M
Support fieldbus X-NET, deeply optimize the data monitoring
Support message sending and receiving
Persistent online, break line redial and watchdog function
Suitable PLC version
Series
4GBOX
XD-4GBOX-ED
Support
Version
Support
Version
XD
√
Hardware V3.4.5 and up
Software V3.5.1 and up
√
Hardware V3.4.5 and up
Software V3.5 and up
XC
√
XC2 series and up
XCPPro V3.3r and up
×
-
ModbusRTU
√
Support 0/1/3/4 address
×
-
Application
The application in the network:
Message monitoring
Monitoring the device by sending fixed format message in PLC program.
Online programming
Remote monitoring, programming, data uploading and downloading through XCPpro, XD/EPPro
software.
Remote monitoring
Support XINJE Cloud remote monitoring platform, realize the visualization, digitization and
intelligent management of the equipment.
GPS positioning

The module uses high sensitivity GPS module, which has low power consumption, high speed
accuracy and wide application, provides real-time and accurate positioning data for users.
Application field
4GBOX is fit for the following automation fileds:
Remote diagnosis of equipement fault
Equipment after-sales reliable maintenance, such as air compressor maintenance
Data authenticity guarantee of test equipment, such as lithium battery detection
Smart urban construction, such as sewage treatment, garbage treatment, cold storage
Wisdom agriculture, smart home, intelligent car
2. Performance and parameters
2-1. Structure
4GBOX

XD-4GBOX-ED

GPS antenna (optional)
2-2. Dimension
XD-4GBOX-ED
The dimension is 25.0mm×100.0mm×90.0mm (width×height×depth).
Please use M3 screw to fix or install on the DIN46277 (width is 35mm) rail.

4GBOX
Note:
(1) Do not let the chips and wire cuttings drop into the module when wiring and installing.
(2) Confirm the module and connected equipment specifications before wiring.
(3) Make sure the connection is strong, the loss of connection will result in incorrect data,
short circuit, etc. installation, wiring and other operations must be performed after the
power supply is cut off.
2-3. Power supply
The module power supply is DC24V, the voltage range is DC 21.6V~26.4V.
PWR
COM
LINK
+24V
0V
FG
NETSTATUS
SIM
4G
71.0
84.0
92.0
63.0
66.7
5.0

2-4. Communication port (For 4GBOX)
1. RS232 port
RS232 is DB 9-pin port, the diagram is shown as below:
The wiring diagram between PC and 4GBOX:
PC 4GBOX
The wiring diagram between XC series PLC and 4GBOX:
XC-PLC 4GBOX
3
45
1
2
6
87
15
9 6
4GBOX can communicate with XINJE XC and XD series PLC.
2. RS485 port
B
A
0V
+24V
4GBOX has one RS485 port (terminal A, B). A is RS485+, B is RS485-.
Note: RS485 port is only for connecting Modbus RTU device to monitor the data. It supports XC
series PLC online programming and debugging, XD series PLC only support online data
monitoring in RS485 connection mode (seemed as Modbus RTU device).
3. Serial port information
Communication
protocol
Suitable model
Network module
Default serial port information
ModbusRTU
XC2 series and
up
4GBOX (S2: OFF)
19200,8,1,E
X-NET
XD integrated
controller, XG
4GBOX (S2: ON)
XNET-PPFD-RS232/TTL, 115200
Any Net ID and station no.
XD, XE series
XD-4GBOX-ED
XNET-PPFD-TTL, 1000000
Any Net ID and station no.
15
69
2
3
5
2
3
5
2
RXD
3
TXD
5
GND

2-5. State display
PWR
COM
LINK
NETSTATUS
The indicator will light according to the function.
Light
Function
PWR
Module power supply status, it lights when the module
power on.
COM
Module and PLC serial port connection success flag.
When there is communication data through the port, COM
will flash.
LINK
4GBOX logs on target server succeessfully
2-6. Signal strength
L3
L2
L1
L0
The module running state, 4GBOX visiting server succeeded. L0~L3 show the signal strength of
network. In error state, L0~L3 will show the error type, please see below table:
L0
L1
L2
L3
Explanation
-
-
-
flashing
No SIM card or SIM card insert error
-
-
flashing
flashing
4GBOX cannot open the network (SIM card arrears or not
open the data traffic service)
flashing
flashing
flashing
flashing
4GBOX not configure server information
L0, L1, L2, L3 flashes alternately
4GBOX serial port parameters did not match the DIP
switch setting
2-7. DIP switch
S1
S2
S3
S4
If the serial port configuration of 4GBOX is error and cannot connect the PLC, please turn on
switch 1, then repower on the module. At this time, 4GBOX is configuration mode, serial port
runs with default parameters, the configured serial port parameters will not change.

XD-4GBOX-ED
S1
S2
S3
S4
Function
ON
OFF
-
-
Configuration mode
OFF
OFF
-
-
Running mode
-
-
-
ON
Factory mode (V2.0.0 and up)
-
ON
-
-
Factory mode (V1.1.4 and up)
Other
Undefined
4GBOX
S1
S2
S3
S4
Function
OFF
-
-
-
Running mode
ON
-
-
-
Configuration mode (please power on again)
-
OFF
-
-
Modbus RTU
-
ON
-
-
X-NET mode (V2.0.0 and up)
other
Undefined
Note: 4GBOX v2.0.0 and up supports Modbus RTU and X-NET mode. Version 1.1.4 and down
only supports X-NET mode. The switch S2 ON is factory mode, please turn if off for normal
using.
4GBOX-M (only for V1.1.2 and down version)
S1
S2
S3
S4
Function
OFF
OFF
-
-
Running mode
ON
OFF
-
-
back to default serial port parameters
when power on again
-
ON
-
-
Configuration mode (power on again)
Other
Note: after setting the serial port connection flag, SIM card, signal strength of 4GBOX-M, if it
needs to set them again, please turn on switch 2 and power on again.
2-8. Initialization time
The module initialization time is depend on the telecom operator. The table shows the time of
Chinese telecom operators:
Telecom operator
Initialization time (s)
China mobile
21.31
China unicom
23.24
China telecom
59.89

2-9. Product features
Parameters
Description
Working
frequency
GSM/GPRS: 900, 1800MHz EDGE: 900, 1800MHz
UMTS: CDMA2000(BC0), WCDMA(B1, B8), TD-SCDMA(1.9G, 2G)
LTE: FDD(B1, B3, B8)TDD(B38, B39, B40, B41)
GNSS: GPS, GLONASS
Max
transmission
speed
100 Mbps
Max
transmitting
power
GSM/GPRS: 2W EDGE: 0.5W
UMTS: 0.25W LTE: 0.25W
Working
temperature
-10℃~50℃
Average
standby current
<5mA
3. Function settings
3-1. Function overview
4GBOX supports XD and XC series PLC, Modbus RTU device. When it connects XINJE PLC,
the PLC software can be used to configure the module function. In below software, click 4GBOX
to start configuration window.
Please refer to chapter 4 or 5 for details.
3-2. Remote configuration
The following is 4GBOX configuration window.

Enable remote
Enable the remote communication for 4GBOX, make sure to choose this item.
Comm port
4GBOX uses port 1 which cannot be changed.
Safe mode
4GBOX can support safe mode 1, please choose it.
Domain name
Please set it to default domain name www.x-net.info.
IP address
If the domain name is default settings, it no needs to fill in the IP. If not fill in the domain name,
please fill in XINJE server IP address 61.160.67.86.
Device password
Set 4GBOX remote login password. If setting password, it needs to input password for remote
login.
Version
Click version button to get 4GBOX version and device ID.
3-3. Flag register
The flag register can be used to control remote device such as device shutdown, signal detection.

4GBOX connection
Set on this flag every 5 second when 4GBOX communicates with PLC serial port normally after
module initialization.
Signal strength
Write in signal strength in PLC appointed address every 5s after module initialization. The signal
range is 0 to 31, 31 is the strongest.
SIM card change
Write in the status in PLC appointed address every 5s after module initialization. The status is off
if using bind SIM card, otherwise, the status is ON.
GPS coordinate
Write in the GPS position in PLC appointed address every 5s after module initialization. The
position information occupied 4 registers (two floating numbers), which are latitude and longitude.
Note:
(1) Serial port connection and bind SIM card bit address type:
XD series PLC: M, HM
XC series PLC: M
(2) Signal strength, GPS coordinate register address type:
XD series PLC: D, HD
XC series PLC: D
3-4. User authority
User authority is user white list function. If not fill in the phone number, the 4GBOX will execute
message control when message monitoring without distinguishing phone number. after using this
function, the 4GBOX will distinguish the phone number and authority and control the device.

3-5. Message function
3-5-1. Message (phone=> 4G-BOX => PLC)
User can edit the message as fixed format to monitor the equipment. 4GBOX needs to work in
running mode for this function.
Read soft component (example)
Sending message format: R M0 returning message format: M0=ON
Sending message format: R D5 returning message format: D5=K1234
Sending message format: R DD0 returning message format: DD0=K654321
R D0 S20 return Thinget Made (S means the string length in decimal format expected to be read)
Write soft component
Sending message format: W M0 1 //set ON M0
Sending message format: W Y23 0 //set OFF Y23
Sending message format: W Y35 1 //set ON Y35
Sending message format: W D5 K1234 //D5=1234(decimal format)
Sending message format: W DD0 H654321 //DD0(double word)=654321(hex format),
DD0 occupies D0 and D1.
W D0 “XINJE Made”//write the string in the address starting from D0 (occupy D0…….Dn,
total n characters)
Error code:
If the message format, user authority, soft component type is error, the returning message will be
error code. If there is no error, the returning message is OK.
Error1: the phone number which sending the message is not in the white list.
Error2: message format is not correct
Error3: the soft component is not correct

Error4: the phone number only has read authority, but it wanted to write in
Error5: 4GBOX and PLC BWO read write failure
Error6: 4GBOX and PLC BWO read write failure
Error7: 4GBOX and PLC BWO read write failure
Error8: 4GBOX and PLC BWO read write failure
Note:
(1) all the letters must be capitalized.
(2) The command, register, operands are separated by a space, the whole message should not
exceed 99 English characters.
(3) To send the character message, quotation mark must be English half angle “
(4) Message function only support China mobile, China unicom.
3-5-2. Message (PLC => 4G-BOX => phone)
The 4GBOX will send message to user’s phone in certain condition. Please refer to below
example.
The trigger coil should be edge signal(falling or rising edge of pulse).
In the message configuration window, 4GBOX connects the left extension port of XD
series PLC, set the port to com3
First address can be D or HD, these registers cannot be used in other place of program
Support multi phone number type-in and set the phone number on the HMI, the using
method please refer to above picture, multi numbers are separated by “,”
The message support Chinse and English contents, such as “present temp {HD0}”, and
user will receive the message “present temp 30” for example. Register analysis function
supports single and double words, such as D, DD, HD, DHD, but not support DM.

4. Using steps (XD series)
4-1. Prepartion
Open the function of data traffic for the Nano SIM card
Open the message function (optional)
XD series PLC hardware V3.4.5 and up
XD/EPPro programming software V3.5.1 and up
XINJEConfig tool version v1.6.375 and up
XD series PLC programming cable
PC (enable to visit internet, installed XD/EPPro software)
4-2. Module configuration
The module configuration needs XD/EPPro software and Config tool. Please make sure the PLC
hardware and software version meet the requirements in chapter 4-1.
4-2-1. Serial port setting
4-2-1-1. XD-4GBOX-ED configuration
XD series PLC serial port communication protocol includes Modbus RTU, XNET
(OMMS/TBN/PPFD), free format protocol. When connecting 4GBOX, make sure the parameters
are compatible with below table. The network number, station number is recommended to use
default parameters.
Communication protocol
XNET-PPFD
Serial port speed
1000000bps
Physical layer
TTL
Network ID
32768
Station number
1
When configuring the serial port parameters, please set the DIP switch as below and power on
again.
S1
S2
S3
S4
function
ON
-
-
OFF
Configuration mode
OFF
-
-
OFF
Running mode

Please power on the PLC again after setting the parameters. The XNET communication module
COM light will flash periodically when the serial port parameters are consistent.
Note: the default serial port baud rate can fit for most of the applications, for some applications
that the electromagnetic interference is too strong, please reduce the baud rate to avoid the effect
of interference.

4-2-1-2. 4GBOX configuration
4GBOX (v2.0.0 and up) can supports XNET protocol connecting XD/ZG series PLC, please set
the PLC serial port as below parameters. The configuration method is same as above.
Communication protocol
XNET-PPFD
Serial port speed
115200bps
Physical layer
RS232
Network ID
32768
Station number
1
When configuring the serial port parameters, please set the DIP switch as below and power on
again.
S1
S2
S3
S4
function
ON
ON
-
-
XNET configuration mode
OFF
ON
-
-
XNET running mode
Please power on the PLC again after setting the parameters. The XNET communication module
COM light will flash periodically when the serial port parameters are consistent.
This manual suits for next models
1
Table of contents