4G Cellular IoT Modbus MQTT RTU
4G Cellular IoT Modbus MQTT RTU
S275
User Manual
Ver 2.7
www.iot-solution.com
GSM/SMS/GPRS/3G/4G
Cellular IoT Modbus RTU
Table of contents
1. Brief Introduction -------------------------------------------------------------------------------3
2. Safety Directions---------------------------------------------------------------------------------4
3. Standard Packing List---------------------------------------------------------------------------4
4. Mainly Features----------------------------------------------------------------------------------5
5. Physical Layout and Installation Diagram-------------------------------------------------6
6. Settings & Operations -------------------------------------------------------------------------11
7. Example Of Applications---------------------------------------------------------------------36
8. Device SMS Command and SMS APP------------------------------------------------------52
9. Device GPRS/3G/4G Communication Protocol------------------------------------------55
10. Upgrade Firmware-----------------------------------------------------------------------------73
11. Cellular Module Upgrade---------------------------------------------------------------------73
12. Warranty------------------------------------------------------------------------------------------74
This handbook has been designed as a guide to the installation and operation of S273/S274/275
GSM/SMS/GPRS/3G/4G Cellular IoT Modbus RTU
Statements contained in the handbook are general guidelines only and in no way are designed to supersede the
instructions contained with other products.
We recommend that the advice of a registered electrician be sought before any Installation work commences.
King Pigeon Hi-Tech.Co., Ltd, its employees and distributors, accept no liability for any loss or damage including
consequential damage due to reliance on any material contained in this handbook.
King Pigeon Hi-Tech.Co., Ltd, its employees and distributors, accept no liability for GSM Network upgrading or
SIMCard upgrading due to the technology specifications contained in this handbook.
【UPGRADE HISTORY】
CONFIGURATO FIRMWARE HARDWARE
DATE DESCRIPTION
R VERSION VERSION VERSION
1.DIN status revised to reverse from V2.4
version, only support V2.5 configurator
2018.12.
V2.5 V2.5 V2.4 software.
13
2.The total value range function of DIN1
pulse count upgraded.
2020.7.2 1. Add DIN1-3 pulse counter
V2.7 V2.7 V2.7
3 2. Add MQTT
1. Brief introduction
The Cellular IoT Modbus RTU is an industrial class, high reliability, high stability, and programmable Remote
Terminal Unit (RTU). It embedded 32-Bit High Performance Microprocessor MCU, inbuilt industrial Cellular
module. It provides 8 digital inputs, 6 analog or PT100 Resistance Temperature Detector (RTD) inputs, 4 relay
outputs, 1 ambient sensor input for monitoring onsite temperature and humidity, and RS485 serial port, supports
80/224/320 mapping registers via Modbus RTU protocol. It can monitoring and operates the I/O ports by SMS, APP,
Web Server, internet, timers and programmed inter-lock events automatically.
The Cellular IoT Modbus RTU inbuilt TCP/IP protocol stack make it suitable for internet of things (IoT) applications,
it can be easily to operate by the provided cloud, app, and web server, or integrated to you IoT applications
according to the TCP/UDP protocol, or integrated to SCADA systems by standard Modbus TCP protocol, too. This is
very useful if you need remote control onsite devices with low cost solution.
The Cellular IoT Modbus RTU is design for working in the harsh industrial application environment, widely used in a
variety of industrial automation, security monitoring system, automatically measurement and control system, BTS
monitoring, remote data acquisition, telemetrically systems, automatically control system. It can be used as a
remote switch, remote I/O, remote smart PLC, timer switches.
The Cellular IoT Modbus RTU can be used as remote access control for BTS monitoring, the authorized users can
open the gate or turn on the machine with a free charge call at specified time, this is useful for daily maintenance
to save the time of traditional authorized.
The Cellular IoT Modbus RTU supports transparent data transmission and performs as Modbus Slave over
GPRS/3G/4G network and RS485 serial port. Moreover, the Cellular IoT Modbus RTU can be used as Modbus RTU
Master to reading smart meters, I/O modules, PLC, and converts to SMS alert once triggered the threshold value,
or transmit data to remote server over GPRS/3G/4G network.
BTS Monitoring, Security Alarm System applications, Supervision and monitoring alarm systems, Automatic
monitoring system, Vending Machines security protection, Pumping Stations, Tanks, Oil or Water levels, Buildings
and Real Estate, Weather Stations, River Monitoring and Flood Control, Oil and gas pipelines, Corrosion protection,
Temperatures, water leakage applications, Wellheads, boat, vehicle, Energy saving, street lights control system,
Valve controls, Transformer stations, Unmanned machine rooms, Control room application, Automation System,
M2M, Access Control System, etc.
2.Safety Directions
Safe Startup
Do not use the unit when using GSM/3G/4G equipment is prohibited or might bring disturbance or
danger.
Interference
All wireless equipment might interfere network signals of the unit and influence its performance.
4. 1Mainly Features
Embedded ARM Cortex -M4 32 Bit RISC Core, 168 MHz inside, RTOS system, reliable performance
with in-built watchdog;
8 digital inputs, compatibles dry and wet contact. Logic level: 0~0. 5V or short circuit treated as close, +3~30V
or open circuits treated as open.DIN0 as a high-speed pulse counter, sampling frequency: 1MHz;DIN1~3 as
low-speed pulse counter, anti-shake time can be set 1~2000ms, default 1ms;
DIN1 as arm and disarm function;
4. 2 Specifications
Item Reference Scope
DC Power supply Standard adapter: DC 12V/2A Range 9-36VDC
Power consumption Standby:12V/50mA; Working Max.: 12V/150mA
GSM Frequency 850/900/1800/1900Mhz
3G/4G Optional: WCDMA/TDD-LTE/FDD-LTE
TCP/IP stack TCP,UDP
SIM interface Supporting 3V and 1.8V SIM Card
External antenna SMA Antenna interface, 50 Ohm, Gain: 3dB
Serial Interfaces 1 USB Port
SMS, GPRS UDP,TCP, MQTT,Modbus RTU over TCP and King Pigeon RTU
Protocols
protocol.
RS485 1 RS485, Support Transparent transmission and Modbus RTU Slave,
SIM Card Slot For SIM Card Installation, only supports 1.8V/3V SIM Card
Power Switch For switch ON or OFF the RTU
Upgrade For upgrade firmware purpose only. Only when upgrade new firmware version will use it,
DC IN+ External DC Power input port, Connect to 1.5A@9~36V DC power, positive electrode.
DC IN- External DC Power Input port, contact to negative electrode
Power source output port, positive electrode. Provides power from RTU to external
transducers or sensors or detectors. The output current should less than the power from
DC Out+
DC IN inputs. If adapter current is 2A, then suggest external transducer current to be less
than 1.5A
DC Out - Power source output port, Negative electrode.
DIP Switch Definition
Analog inputs, Sampling frequency 200mS, 12bits resolution, supports 0-5V, 0-20mA, 4-20mA output
transducers, please refer to abovementioned DIP Switch Definition to connect the correct transducers.
The 1st Channel Analog input. + stands for positive electrode, - stands for negative
0+/0-
electrode.
The 2nd ~6th Channel Analog input. + stands for positive electrode, - stands for negative
1+/1- ~5+/5-
electrode.
Digital Input Definition
GND Ground
A/B RS485 A /B
5.2 Wiring
6. Settings&Operation
The GSM SMS GPRS 3G 4G Cellular IoT Modbus RTU is user-friendly design. The user can setup it or export historic
data by the PC Configuration through USB cable, and upgrade firmware by USB port. The GSM SMS GPRS 3G 4G
Start to Configure:
Step1: Install the Configurator
Download from www.GPRS-M2M.com, then installs it on the computer.
Step2: Connection
Please insert the SIM Card, and install the GSM/3G/4G Antenna.
Step3: Switch the DIP Switch to Setup Mode. (Before Power On the RTU)
Switch it to upside is Set Mode, under this mode, the user can use PC Configurator via USB cable to
configure the RTU Parameters or Read Parameter settings.
Notice:
Please switch it to Downside after you finished the configurations. Otherwise, the RTU cannot work properly. The Downside is
Run Mode, under this mode; the RTU is in Running mode.
Step4: Connect the Gateway to the PC by USB Cable. And connect the external DC Power to DC Power Ports,
Power on, and switch on the device, see below:
Please click to run it. Enter the password, default is 1234. Then you can enter the
Notice:
If display the below windows, then means the RTU connect to the PC failure. The reasons are below:
Step7: Choose the correct "COM port" in device manager above, enter the password(default is
Tips: If not connect successfully, will not enter into next step. Pls check if USB connect well, or COM port and
password correct or not.
Setting Self-checking
Phenomenon Possible Reason
1. USB Driver installation failure;
2. COM Port not correct or USB driver installation failure;
3. Device not enter into setting mode:
1) Only power light on, that means the Upgrade Firmware Switch at Load side,
Can't enter software not at Work side. Solution: Switch the power switch to OFF---->
Upgrade switch to Work side----> Power switch to ON.
2) Signal light flicks, that means device in working mode. Maybe had not
rebooted the device after switch mode switch to Set.
(In setting mode, Power light normal ON, Run light flicks, other lights Off.)
1. The Upgrade Firmware Switch at Load side, not at Work side.
Solution: Switch the power switch to OFF---->Upgrade switch to Work side---->
After switching panel on,
Power switch to ON;
only Power light on, panel
2. SD card fall out from the slot. Solution: Shake panel to listen if there is voice or
can't work
not;
3. In upgrade mode, use upgrade tool erased the firmware.
1. The Upgrade Firmware Switch at Load side, not at Work side.
Solution: Switch the power switch to OFF---->Upgrade switch to Work side---->
Can't enter into working
Power switch to ON;
mode
2. Device in setting mode. Solution: Switch device OFF---->Mode switch to
"Run"---->Switch the device on.
1. Have not installed driver;
2. PC system problem cause driver installation failure, can't support Apple OS
Can't find COM Port
system.
3.Check USB line, and try other common driver software such as "Drive TheLife".
In working mode, the Have not set the device ID. Solution: In setting mode, set device ID---->Switch the
device not response the device to Run mode.
Modbus command
After switching panel on, After parameter setting, although clicked "Save" in every page, but missed the
5. Reboot the device, switch the Power Switch to OFF, then switch it to ON, the device will enter into normal
running mode after that
Basic Settings
Reminder: Please click the "Read" for previous parameter before starting to set.
Modify Password: This is for modifying the RTU’s Password, default is 1234.
Synchronous device time: This is to setup the RTU’s time for daily report or other timers. After click Write
the RTU Time, the RTU will be synchronous the same time as the PC. If connect to King Pigeon Cloud
Reminder:
Please remember that click "Save" -" Save Settings" button to save it after parameter be written, below pages
are the same.
Output Type: Support 3 output types. The user can choose the Output Type for the relay
outputs, includes Open Door, Switch ON/OFF, Siren. The relay 2 and 3 only used for Switch
ON/OFF; Relay 0 can option as Open Door and Switch ON/OFF; Relay 1 can option as Siren
and Switch ON/OFF.
1) Open Door: Only the first Channel(DO0) can be setup as Open Door, use it for electric lock.
If setup as Open Door, then the authorized number calls in RTU, can open the electric
Application:
When RTU installed in generator room, many workers out and in, not convenience and safe for everyone
taking keys. This function can authorize the person to remotely control the door and disarm the device within
appointed time, avoid fault anti-thief alert. After worker maintenance the generator room, can touch the
inside Arm/Disarm switch button to arm device, DIN2 can do this.
Channel Name: to setup the Output Channel name, e.g.: Pump or Motor and so on, in order
to identify it in SMS Contents.
Open Description: Stands for when the Relay Open, send what SMS to the authorized numbers;
Close Description: Stands for when the Relay Close, send what SMS to the authorized numbers.
Close Time: Stands for the relay close and last time, default 0 second, means always close.
Repeat Times: Stands for how many times does this relay should to repeat.
Interval Time: Stands for interval how many seconds then the relay repeat the action again.
Match with "Repeat Times" can work as pulse output, unit: second.
ON/OFF SMS: Tick it stands for while the Recovery action, will also send SMS to the
authorized numbers;
Start Time: Stands for from what time this authorized number can dial in to control it.
End Time: Stands for till what time this authorized number cannot dial in to control it.
Always: Stands for this authorized number can dial in to control it all the time.
DI Trigger Settings
This page is for setting the digital input alarm conditions and usages.
Input Type: The user can choose the input type for related channel. Includes: Counter, Arm/Disarm,
NC, NO, Change and Disabled.
1) Disabled: Not use this channel.
2) NC: For connecting Normal close type detector, open will alarm.
3) NO: For connecting normal open type detector, close will alarm.
4) Change: For connecting normal open or normal close type detector, once the status
changed, will be treated as alarm.
5) Counter: DIN0 as a high-speed pulse counter, sampling frequency: 1MHz;
DIN1~3 as low-speed pulse counter, anti-shake time can be set 1~2000ms, default 1ms;
Need to tick up the Pulse Counter box to setup initial value and interval alarm value and
total alarm value. E.g.: contact a PIR sensor to count how many people pass through the
ATM machine and so on.
6) Arm/Disarm: Only the Second Channel (DIN1) can be used as Arm/Disarm Switch. For
connecting a pulse output type switch to Arm or Disarmed the RTU.
Alarm SMS: Under Arm or 24h status, once triggered will send this SMS content to
authorized numbers.
Recovery SMS: Under Arm or 24h status, if tick the "Recovery Alarm", when triggered digital input
recovery normal will send this SMS content to authorize number.
Change SMS: Under Arm or 24hr status, only when digital input choose "Change" type, once
action will send this SMS to authorize number.
Current Status: Stands for input’s current status.
Alarm Verify Time: Stands for when the digital input Close or Open last time more than this
value, will be treated as a true alarm, if less than this value, then will not alarm.
Siren: Tick it stands for while this digital input triggering, the DO that output type was setup as
Siren will execute its output parameters.
24Hr: Tick it stands for no matter the RTU is in Arm or Disarmed mode, this digital input triggered
will alarm.
Initial Value: When DIN0 as counter, the value begin to count.
Interval Alarm Value: DIN0 as counter, under Arm or 24hr status, when counter value arrive
"Interval Alarm Value" will send SMS to authorize number.
AI Trigger Settings
This page is to setup the analog input alarm conditions and analog input parameter. AIN can be used for
monitoring temperature, current, voltage, power factor, water level, pressure, environment, wind speed...
And also one channel temperature and humidity transducer can be connected as below:
Input Type: The user can choose the input type for related channel. Includes: Disable, 0~5V, 0~20mA,
4~20mA.
1) Disabled: Not use this channel.
2) 0~5V: For connecting transducers that output voltage 0~5V. Please remember to switch
the related channel DIP switch to V side, see DIP Switch Definitions.
3) 0~20mA: For connecting transducers that output current 0~20mA, Please remember to
switch the related channel DIP switch to A side, see DIP Switch Definitions.
4) 4~20mA: For connecting For connecting transducers that output current 0~20mA, Please
remember to switch the related channel DIP switch to A side, see DIP Switch Definitions.
5) Temperature and Humidity: Enable/Disable support. Only accept AMS230x series sensor,
the temperature maximum is 80, minimum is -40, and Humidity maximum is 100,
minimum is 0, cannot change them.
High Alarm SMS: Under Arm or 24h status, once current value higher than threshold high value will
send this SMS content to authorized numbers.
Low Alarm SMS: Under Arm or 24h status, once current value lower than threshold low value will
send this SMS content to authorized numbers.
Recovery SMS: Under Arm or 24h status, if tick the "Recovery Alarm", when current value recovery
normal will send this SMS content to authorize number.
Maximum: The transducer’s maximum measure range. E.g.:100 Celsius degree. Usually it can
be found out at the transducer’s specification.
Minimum: The transducer’s minimum measure range. E.g : -50 Celsius degree. Usually it can
be found out at the transducer’s specification.
Current Value: Stands for input’s current value of the transducers.
Threshold High: The high value(reached) need to alarm; Example: set 50Celsius degree to alert.
Threshold Low: The low value(reached) need to alarm; Example: set -30Celsius degree to alert.
Recovery Alarm: Tick it stands for when the analog input recovery, will send SMS to the
authorized numbers.
Siren: Tick it stands for while this input triggering, the DO that output type was setup as Siren
Timer Settings
This page is for setup hour timer and periodically timer, it is useful for scheduling when to execute what
action automatically or it with repeat this action according to the interval time. Total can program 10
scheduling events. Tick it stands for enable this timer event:
Reminder:
When GPRS/3G/4G data transmission protocol is King Pigeon IoT RTU Protocol, the periodically auto upload
default enable and upload every 5 minutes.
Tick stands for enable this timer function, otherwise is disable.
Weekly+Hour+Minute: Stands for what day and at what time does the RTU should start to
execute the action and interval how many seconds then repeat to execute the action.
Interval: Stands for interval how many seconds does the RTU should repeat to execute the action.
If setup it as 0, then this event will not be repeated.
Action: Stands for what action does the RTU should to execute at the specified time.
Question: Have set the timer SMS report, but finally not get the SMS.
Solution: Have no ticked the "Timer Reporting SMS Content" in first Basic Parameter Settings page.
Modbus RTU Master: Stands for the RS485 used for Modbus RTU Master.
Modbus RTU Slave: Stands for the RS485 used for Modbus RTU Slave, and the "Scan rate", "Time
out" and "Slave failure verify time " of Master function will be disable.
Baud Rate: 1200/2400/4800/9600/19200/38400/57600/115200 optional.
Read and Write Holding Coil (Function Code 1, Function Code 5, Function Code 15.)
Register Address
Definition Description
(Decimal)
0 RTU DO0 DO0 Value, Read/Write, 1=Close, 0=Open
1 RTU DO1 DO1 Value, Read/Write, 1=Close, 0=Open
2 RTU DO2 DO2 Value, Read/Write, 1=Close, 0=Open
3 RTU DO3 DO3 Value, Read/Write, 1=Close, 0=Open
4--63 (reserved, not work)
Transparent Transmission:
The RS485 can be used as transparent transmission, transmit the device data on this serial port to
GPRS/3G/4G, the device not deal with or store any data, only do as a data transmit channel, converter serial
port to TCP/IP.
This function can be used for connecting PLC, Remote I/O data acquisition module, Smart meter, Power
Reminder:
1.Use this function code when connect to Modbus RTU/Modbus TCP upper computer via GPRS/3G/4G (Device as Modbus
RTU Slave). Stands for when Cloud communication with S275, the S275 is Modbus RTU Slave of Cloud Server.
2. When device connect to Modbus RTU/Modbus TCP upper computer via GPRS/3G/4G (Device as Modbus
RTU Slave). The I/O of S275 itself refer to "Modbus RTU Slave function" above.
Boolean Slave Register Assignment Table(S272 &S275)
Support 03/06/16 function code, 1 data take one address in Modbus protocol, total can mapping 128 slave data.
Read and Write Holding Register (Function Code 03,Function Code 06, Function Code 16)
16 Bit Register Address
Definition Data Type Description
(Decimal)
According to configurator set
mapping rules, this address will
Sort AB, its data type sort slave mapping data to AB,
20000 16 Bit data 20000 according to slave stock in this address, for cloud
mapping data type easy reading together, can
mapping slave inputting and
holding register.
20001 16 Bit data 20001 Same as above Same as above
20002 16 Bit data 20002 Same as above Same as above
124 data similar as
………. Same as above Same as above
above
20127 16 Bit data 20127 Same as above Same as above
Support 03/06/16 function code, 1 data take four address in Modbus protocol, total can mapping 64 slave data.
Holding Register
64 Bit Register Address
Definition Data Type Description
(Decimal)
According to configurator set
mapping rules, this address will
Sort ABCDEFGH, its data sort slave mapping data to
20256 64 Bit data 20256 type according to slave ABCDEFGH, stock in this address,
mapping data type for cloud easy reading together,
can mapping slave inputting and
holding register.
20260 64 Bit data 20260 Same as above Same as above
20264 64 Bit data 20264 Same as above Same as above
60 data similar as
………. Same as above Same as above
above
20508 64 Bit data 20508 Same as above Same as above
Notice:
The difference of S273/S274/S275 is that they have different mapping register qty, but their device I/O register qty are same.
The above is for S275 register address, the S274 and S273 mapping register address range as below. Pls remember to set the
the device ID first before reading register data.
Model No.
S272 S275
Slave Mapping
Register Range (Decimal) (Decimal)
Adding Slave (Extend I/O tags or Modbus RTU converter to SMS alarm gate way)
When RS485 as Modbus RTU Master, can extend I/O tags, support max 16 slaves for connecting PLC,
Remote I/O data acquisition module, Smart meter,UPS , Power monitoring...
When RS485 as Modbus RTU Master, the device will polling the slaves , read the salve register value
to device mapping address and stock them as below. The yellow part is mapping register area.
Slave Settings:
Step1: Connect the slave to device(S272/5) RS485 port.
Step2: Find the salve port communication parameter and register address from user manual.
Step3: Write device RS485 parameter according to slave port communication parameter, pls ensure both
parameter are same, others communication failure, refer to "port setting" part.
Step4: Set RS485 port as Modbus RTU Master, then set polling and time out parameter, refer to "port setting"
part.
Step5: Back to Slave Mapping page as below, right click the line to add.
If one slave have multi register, then need to add seperately according to register type; For exmaple, Mxxx
remote I/O module, with digital and analog inputs, need to add the digital(Boolean) first, then add the
analog(16 Bit).
Click the "Edit Slave" to list the register according to chosen type (Boolean, 16 Bit, 32 Bit, 64 Bit). Boolean list
edit as below:
Reminder:
If need SMS Alarm function, pls tick Slave Alarm function for authorize number in Number Settings page.
When add slave, function code choose 16, then write value page as below:
Step7: Click "Save" when operate finished, then click "Save Setting" in the menu, to save parameter to device.
Delete Slave:
Right click the slave which need to delete---->click the "Delete Slave"----> click "Save"---->click the "Save
Settings" in the menu as below:
Network Settings
This page used for setting device parameters connect to networks.The device can compatible with many third
party upper computer system. And it can communication with monitoring software or clould via GPRS/3G/4G
as below:
1) Modbus RTU Protocol, means Modbus RTU over TCP, commucation with upper computer system. For
example, connect to www.kpiiot.com cloud server. Domain: modbusrtu.kprtu.com, Port: 4000.
2) Modbus TCP Protocol, commucation with upper computer system. For example, connect to
www.my-m2m.com cloud server. Domain: modbus.dtuip.com, Port: 6655.
3)MQTT Protocol,connect to www.my-m2m.com cloud server. Domain: modbus.dtuip.com, Port: 6655.
Note:If connect to KPIIOT or my-m2m cloud,only need ask King Pigeon sales for log in message,other part no
Historical Record
The device inbuilt 8G SD card, store alarm and historical records. For saving historical records, need to set the
saving historical records interval time in "Periodically Timer" page.
For historical record, once it full, will automatically remove the earlier records for new records. And can save
as CS format for other purpose usage.
Total: Display device current historical records qty, "Read All" or "Read Record from xx to xx" optional.
Clear: Clear the screen.
Read: Read historical records.
Save as CSV: Historical records export as CSV file.
Erase RTU Records: Click this button will erase all device historical records, be careful.
7. Example Of Applications
(2) Under "Number Settings" page, write authorize number and tick the times needed. For example, if need
power on, external power off/recovery SMS, then tick and write as below:
(3) Click "Save Settings"---->Switch device off---->Switch working mode to "Run"---->Put it SIM card and switch
device on. 1~2 min after SIM card register network, power on SMS should be received---->The cut the external
power, the power lost SMS should be received---->Connect the power support to device again, then power
recovery SMS should be received. Thus, the device communication self-checking finished.
(1) Switch device off, then switch AIN0 input type to "mA";
(3) Basic setting according (1) and (2) in "Device working self-checking";
(4) Enter into "AIN Trigger" page---->Set input type to "4~20mA"---->Write "High/Low Alarm
SMS"---->"Maximum": 100, "Miximum": -40, "Threshold High": 35, "Threshold Low": 20, "Verify Time": 2. If
still need recovery alarm SMS, then need to tick "Recovery Alarm", and write content in "Recovery
SMS"---->After that, click "Save" as below:
(5) In "AIN Alarm" page, tick the corresponding items for authorize number. For example, when AIN0 alarm,
will can and send SMS to authorize number "0" , remember to click "Save" as below:
(6) Click "Save Settings" in the menu, then switch device off;
(7) Switch DIP mode to "Run", working mode as below:
Application:
When monitoring cabinet temperature, if higher than 38℃, need to start the cabinet fan; If lower than 25℃,
need to close the fan.
Need: Temperature/Humidity transducer AM2301 and 1 channel relay output, if choose the first relay DO0,
the set as below:
(1) Switch device off---->connect temperature/humidity transducer to T/H port---->connect the cabinet fan to
DO0 output as below:
(2) Basic setting according (1) and (2) in "Device working self-checking";
(3) In "Output Settings" page, set first relay DOUT0, output type: Switch on/off, channel name: cabinet fan,
close time: 0, 0 means always close. Click "Save" button as below:
(4) In "AIN Trigger Setting" page, set temperature type "Enable"---->Humidity and AIN0~7 choose "Disable" if
not use---->Set corresponding alarm SMS content---->Threshold high: 38 and Threshold low: 25---->Recovery
and verify time according to need---->Click "Save" button as below:
(5) In "Interlock Settings" page, Event choose "Temperature high alarm", Action: "DO0 close"---->Click "Add"
button, stands for when temperature high than 38℃, device will close DO0 to start the cabinet fan; Same
operate for low alarm setting, then temperature lower than 25℃, device will open DO0 to close the fan
automatically---->Click "Save" button as below:
Reminder:
The AIN data acquisition of Mxxx is ADC current or ADC voltage, device never calculated according to AIN max or min range. If
need extend AIN to read calculated real value, pls choose the acquisition module with inside converter function, such as DAM:
Model List
DAM114 2AIN 12 Bit resolution, default input 4~20mA
DAM116 4AIN 12 Bit resolution, default input 4~20mA
DAM118 2PT RTD 12 Bit resolution, default PT-100, 2/3 wire connection
DAM120 4PT RTD 12 Bit resolution, default PT-100, 2/3 wire connection
DAM122 2AI+2PT Same as above
DAM124 4AI+4PT Same as above
(1) When order M100, if need relay output, need to mark DO as relay when place order;
(2) According to M100 user manual, set port Baud Rate and device ID as below:
M100 port parameter: Baud Rate (9600), Byte Size (8), Stop Bit (1), Parity (Even), M100 device ID: 1.
(4) Basic setting according (1) and (2) in "Device working self-checking";
B) Baud Rate, Data Bit, Parity Bit, Stop Bit port parameter setting need to be corresponding with M100,
otherwise not working; If one more slaves, all slave port parameter need to be corresponding with Master.
C) Scan Rate, Time out, Slave fault verity time can be according to default, if the slaves qty a little more, can
set bigger value;
(6) In "Slave Mapping List" , right click a line---->Click "Add Slave". If have added slave information before,
need to click "Read" first, to avoid other slave device information been covered.
(7) Set slave M100 basic parameter, if one slave have multi input type and function code, need to set data
type, function code and mapping register relationship seperately as below:
A) Slave address: Refer to step (2), it is 1;
B) Set register mapping and function code:
○1 According to M100 user manual, the DI data type and function code as below:
So the parameter set as below, the DI set to Boolean type, Function code 02, Register starting address 0,
Register quantity 2.
Then M100 DIN1 mapping address is 64, DIN2 mapping address is 65, DIN1 and DIN2 parameter can be
editable. "√" Enable stands for enable this channel, "√" Relay 0 stands for when DIN1 trigger, DO0 will close.
And "Alarm SMS Content", "Recovery SMS content" can be editable. After that, click "OK" as below:
○2 In "Slave Mapping List" page, right click blank line---->Choose "Add Slave"---->DO Data type and Function
code as below according to M100 user manual.
So set DO parameter as below, set DO Data type to Boolean, Function code 1, Register start address 0,
Register quantity 2.
Click "Ok"---->Right click this line in "Slave" list---->Click "Edit Slave" to edit the channel.
So set DO parameter as below, set DO Data type to Boolean, Function code 15, Register start address 1,
Register quantity 2. Click "Add Slave" as below:
Click "Ok"----> Right click this line in "Slave" list---->Click "Edit Slave" to edit the channel.
○3 In "Slave Mapping List" page, right click blank line---->Choose "Add Slave". According to M100 user manual,
AIN data is high byte in front, low byte behind, data type and function code as below:
So set AIN parameter as below, set AIN Data Type to 16 Bit, Function code 4, Register start address 0,
Register quantity 2.
Click "Ok"----> Right click this line in "Slave" list---->Click "Edit Slave" to edit the channel.
The M100 AIN data acquisition is ADC current or ADC voltage value, device have not calculated according to
AIN max and min range. So the "Ratio" no need to write, both "Threshold High" and "Threshold Low" are ADC
value.
(8) Paramter setting finished, since slave address is from same one device, the Slaves address are same, Data
type and Function code are not same. Click save button to write parameter into device.
(9) Click "Save Settings" in the menu, then switch device off.
(10) Switch the DIP mode to "Run".
(11) Switch the device on, enter into working mode, device running according parameter setting.
For example, when device as Modbus RTU slave, connect to HMI as below:
(1) Connect device to HMI via RS485 port, set HMI RS485 port parameter;
(2) Basic setting according (1) and (2) in "Device working self-checking";
(3) In "Basic Parameter Settings" page, set "Device ID", range is 1~247 in Modbus protocol as below:
(5) Click "Save Settings" in the menu, switch the device off;
(6) Switch DIP mode to "Run";
(7) In HMI configurator software, set the Modbus RTU Register address of device. Refer to [RS485 Serial Port
Setting---->Modbus RTU Slave Funtction---->Device I/O Register Address and Function code];
(8) Switch the device on, enter into working mode, device running according parameter setting.
(1) Items connect to device via RS485, set RS485 port parameter;
(2) Basic setting according (1) and (2) in "Device working self-checking";
(4) In "GPRS Setting" page, set "Communication Data" as "Modbus RTU Protocol", then set "Server IP/DNS"
and "Port", also can set handshake protocol like "Login Message" below:
(5) Click "Save Settings" in the menu, then switch device off.
(6) Switch the DIP mode to "Run".
(7) Switch the device on, enter into working mode, device running as transparent transmission when data
communication between cloud server and items.
King Pigeon my m2m cloud support Modbus TCP, cloud configuration, wechat alarm function, welcomed
editable function.
(1) Basic setting according (1) and (2) in "Device working self-checking";
(2) In "Basic Parameter" setting page, set device ID, range 1~247 in Modbus RTU protocol as below:
(4) Click "Save Settings" in the menu, then switch device off.
The IOS APP search "M2M RTU" or click to download link (IOS 7.0 version or above support):
https://itunes.apple.com/us/app/gsm-3g-m2m-rtu/id1095288504?l=zh&ls=1&mt=8
5) Set RTU time, format is 2015-05-22 15:20:30W01, the W01 stands for Monday, W07 stands for Sunday.
SMS Command Return SMS Content
password+Dxxxx-xx-xxTxx: xx: xxWxx xxxx(Y)XX(M)XX(D)xx(H)X(M)xx(W)
6) Inquiry Current Status SMS Command
SMS Command Return SMS Content
password+EE Armed/Disarmed
Model:
Version:
IMEI:
GSM Signal Value:
External DC Power Goes OFF/ON
7) Setup 10 User number(Alarm Number&Access Control Number), max 21digits. ( Return 0~4 or 5~9
separately while setting.)
SMS Command Return SMS Content
Setup password+A+series number+T+tel number Tel1: ---
Tel2: ---
Notice: Tel3: 13570810254
Series number = 0~9 Tel4: ---
Tel5: ---
Inquiry password+A Return all numbers
Delete password+A+series number Return 0~4 or 5~9 numbers.
8) Authority User Number to access control: authorized number can dial to disarm and open the door.
SMS Command Return SMS Content
Setup Specified access control time: Tel1: ---
password+B+series number+S+start time+E+endtime Tel2: ---
Always can access control: Tel3: 13570810254
password+B+series number+P Tel4: ---
Notice: Tel5: ---
Time format is 201505231230, stands for year, month, date, hour, minute.
Inquiry password+B Return all authorized user numbers
15)GPRS Online
SMS Command Return SMS Content
password+GPRSonline GPRS always online
16)Delete Historical Data
SMS Command Return SMS Content
password+HISDEL Delete all historical records
17)Clear/Inquiry Pulse Counter Value
SMS Command Return SMS Content
Clear Pulse Counter Value password+DIN0CLR Clear Successfully
Inquiry Pulse Counter Value password+PR Counter Current Value: XX
Communication Networks:
Transparent Transmission
Notice:
1) When Modbus TCP or Modbus RTU over TCP communication protocol adopted, device used as Internet remote server or
slave device of cloud. So device ID is necessary for server polling device address data, and Internet remote server and cloud
used for Modbus Master function.
2) When Modbus TCP or Modbus RTU over TCP communication protocol adopted, cloud server can remotely read and write
device register address and slave mapping register address, according to Modbus TCP or Modbus RTU protocol. Device register
address and function code refer to "RS485 Serial Port Setting---->Modbus RTU Slave Function---->Device I/O Register Address and
Function Code"; Mapping register address and function code refer to " RS485 Serial Port Setting---->Modbus RTU Master
Function---->Mapping Register List and Function Code".
(1) In "GPRS" setting page, "Communication Data" choose "Modbus RTU Protocol", means communication
with Modbus RTU over TCP. After setting server IP/DNS and other parameter, click "Save" button as below:
(4) Click "Save Settings" in the menu, then switch device off.
(5) Switch the DIP mode to "Run".
(6) Switch the device on, enter into working mode, then Slave and Master I/O can connect to network via
Modbus RTU protocol.
16CRC Verify 2 E1 C8H CRC0 CRC1 low byte in front, high behind
Read device AIN DIN pulse count value, temperature and humidity value, external power voltage value:
Master Send Data Format:
Data
Content Bytes Description
(H: HEX)
Device Address 1 01H 01H Device, Range: 1-247, according to setting address
Function Code 1 04H 04 read input register
One address can read 2 bytes.
Register AIN address range: 0000-000BH, One AIN data take two address,
Starting 2 00 00H temperature address: 0018H, humidity address: 0019H, DIN1 count
Address value address: 001A, 001B
External power voltage address: 000E。
Read Register Read qty of input register, read AIN0 to DIN0 count value address,
2 00 1CH
Qty total 28 register, 0000H to 0001BH.
16CRC Verify 2 F1 C3H CRC0 CRC1 low byte in front, high behind
Example: Inquiry device 28 input type register at same time, start from address 0. Include 6 AIN, one device
temperature, humidity, external power voltage, DIN0 count value, then:
Server send: 01 04 00 00 00 1C F1 C3
01H= Device address; 04H= Read input register value; 00 00H AIN0= Starting address; 00 1CH= Serial reading
28 input register value; F1 C3H CRC verify.
Device answer: 01 04 38 00 00 00 E7 00 00 00 DD 00 00 00 DD 00 00 00 DC 00 00 00 DE 00 00 00 DF 00 00 00
00 04 C6 01 9A 00 00 00 01 00 01 00 01 00 01 00 01 00 01 00 01 0B 36 1B E4 00 00 00 0B A9 3C
01H= Device address; 04H= Read input register value; 56 bytes data after 38H, 00 00 00 E7H AIN0 value, 00 00
00 0DD AIN1 value, 00 00 00 DDH AIN2 value, 00 00 00 DCH AIN3 value, 00 00 00 DEH AIN4 value, 00 00 00
DFH AIN5 value, 00 00 00 00H invalid value, 04 C6H external power voltage value, 01 9A 00 00 00 01 00 01 00
01 00 01 00 01 00 01 00 01H invalid value, 0B 36H temperature value, 1B 36H humidity value, 00 00 00 0BH
DIN0 count value, A9 3C CRC verify.
Example: Read 10 mapping Boolean value starting from address 64, then:
Server send: 01 01 00 40 00 0A BD D9
01H= Device address; 01H= Read holding coil; 00 40H= Read Boolean value starting from address 64; 00 0AH=
Serial reading 10 Boolean status; BD D9H CRC verify.
Device answer: 01 01 02 73 01 5D 0C
01H= Device address; 01H= Read holding coil; 02H= Returning data bytes; 73 01H= 10 Boolean status read,
refer to table above; 5D OCH CRC verify.
Example: If the data type of address 20000 mapping salves is signed-int AB, revise mapping address 20000
register to 100, then:
Server send: 01 06 4E 20 00 64 9E C3
01H= Device address; 06H= Revise single holding register value, 4E 20H= Revise address 20000 register value,
00 64H= Write to decimal value 100, 9E C3 H16 byte CRC verify.
Device answer: 01 06 4E 20 00 64 9E C3
01H= Device address; 06H= Revise single holding register value, 4E 20H= Revise address 20000 register value,
00 64H= Revise to decimal value 100, 9E C3 H16 byte CRC verify.
If need to revise multi data type mapping address, refer to Modbus protocol, Function code 16.
MQTT
Introduction to MQTT
MQTT is a client-server based message publish/subscribe transfer protocol. The MQTT protocol is lightweight,
simple, open, and easy to implement. These characteristics make it applicable to a wide range. In many cases,
including restricted environments, such as: machine-to-machine (M2M) communication and Internet of
Things (IoT). It has been widely used in communication sensors via satellite links, occasionally dialed medical
devices, smart homes, and some miniaturized devices. The MQTT protocol runs on TCP/IP or other network
protocols and provides orderly, lossless, bidirectional connections.
Configuration:
Domain:(King Pigeon Cloud 2.0 default:mqtt.dtuip.com)
Server Port : Broker Server Port number(King Pigeon Cloud 2.0 default:1883)
Subscribe topic: Client subscribe topic
Publish topic: Device publish data topic
MQTT Client ID: The unique identity of the device, which can be a serial number, device ID, or IMEI(King
Pigeon Cloud 2.0 default is serial number)
MQTT user name: Device's account on the broker server (King Pigeon Cloud 2.0 default is MQTT)
MQTT password: Password of device's account on the broker server(King Pigeon Cloud 2.0 default is
MQTTPW)
After the configuration is complete, the client will initiate a connection to the server:
CONNECT: The client sends a” CONNECT “connection message request to the server;
CONNACK: The server responds with a “CONNACK” confirmation connection message, indicating that the
connection is successful;
After the client establishes a connection, it is a long connection, and the client can publish or subscribe to the
message on the server;
Take the device and the client's mobile phone as the client:
After the device publishes the topic on the broker proxy server, the customer can view the data through
subscription. That is, the device is the publisher and the customer's mobile phone is the subscriber.
Users can also publish topics through the MQTT server to control the device. That is, the user is the publisher
and the device is the subscriber.
Payload data format of device publish message
Publish Topic: MQTT client ID (filled in configuration software)
],
"time":"1591841863",
//Time stamp (When power on,first time connection no time stamp,later connections
have time stamp)
"state":"alarm",
//Alarm and recovery (only for alarm or recovery data, but not for timely report)
"retransmit":"enable"
//Historical data (only for re-transmission of historical data, but not for real-time data)
}
Note:
//Read and write flag: the character is "flag", followed by "read and write identification of IO data points"
//Data type and value:
1. Switch-type data: the character is "switcher", followed by "0" or "1" (0 open, 1 closed)
2. Numerical data: the character is "value", followed by "specific value"
//Timestamp: the character is "time", followed by "specific timestamp "
//Alarm and recovery identification: the characters are "state", followed by "alarm" or "recovery" (alarm is alarm
data, recovery is recovery data)
//Historical data identification: the character is "retransmit", followed by "enable"
The data collected during the network disconnection will be temporarily stored in the device, and will be
republished when the network is recovered. It is identified by the "retransmit" character, indicating historical data.
(Need to enable MQTT data retransmission function in the configuration software)
Note:
Mapping register read and write identification is unified as "REGx" (x is the address of the mapping register)
The End!
Any questions please help to contact us feel free.
Http://www.iot-solution.com