Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g...

20
Application Note Modbus Alarm via SMS Applies to M1000 Document Name: Application Note Version: /01.00 Date: 2012-08-02 Status: /Confidential Doc ID: RT_M1000_AN007_v01.00 www.robustel.com

Transcript of Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g...

Page 1: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Application Note

Modbus Alarm via SMS

Applies to M1000

Document Name: Application Note

Version: /01.00

Date: 2012-08-02

Status: /Confidential

Doc ID: RT_M1000_AN007_v01.00

www.robustel.com

Page 2: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 1 /19 Confidential

Revision History

Updates between document versions are cumulative. Therefore, the latest document version contains all updates

made to previous versions.

Release Date Firmware Version Details

2012-08-02 01.00 First Release

Requests for corrections or amendments to this application note are welcome and should be addressed to:

[email protected]

Requests for new application notes can be sent to the same address.

Page 3: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 2 /19 Confidential

Contents 1.1 Overview ........................................................................................................................................................ 3

1.2 Objective ........................................................................................................................................................ 3

1.3 Parts Used ...................................................................................................................................................... 3

1.4 Application Diagram ....................................................................................................................................... 4

1.5 Benefits .......................................................................................................................................................... 5

1.6 Configuring the M1000 Modem .................................................................................................................... 6

1.7 Installing the Modbus Poll ........................................................................................................................... 10

1.8 Test coil and register .................................................................................................................................... 14

1.9 Introduction of PLC Send SMS ...................................................................................................................... 18

Page 4: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 3 /19 Confidential

1.1 Overview

M1000 Support Modbus RTU slave protocol, converts alarm to text format SMS without using AT commands. It is

convenient for users to apply to M2M applications with the host like PLC, HMI and PAC via Modbus RTU

communication. It supports ASCII format for users to send SMS messages to the specific mobile phones by Modbus

RTU protocol with various languages. Therefore, M1000 can be a powerful tool allowing you to use your mobile

phone to monitor and control your business from any location.

In this application note, we’ll show you how to configure and test M1000 in this application. Also we will introduce

you Modbus Poll software which can simulate as a PLC. With this software, you can test this application with our

M1000 even you have no real PLC.

1.2 Objective

Learn how to configure M1000 Modbus features.

Learn how to install and configure Modbus Poll software.

Receive alarm SMS from M1000 when Modbus coil/register value out of range.

Learn how to use PLC send SMS.

1.3 Parts Used

Hardware requirement:

Robustel GoRugged M1000 Industrial Smart Cellular Modem

SIM card to insert in M1000.

DB9 Male to DB9 Male cable

PC

Software requirement:

ModemConfigurator

Modbus Poll

System requirement:

Windows 7 (32/64), Windows Vista (32/64), Windows 2008 (32/64), Windows 2003 (32/64), Windows 2000, Windows

XP (32/64)

Page 5: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 4 /19 Confidential

1.4 Application Diagram

GSM

PLC

Modbus/RTU Master

Serial Port

M1000 Smart GSM/GPRS ModemModbus/RTU Slave

MonitoringCenter

ServicePersonnel

Serial Port

M1000

SMS Alarm

PLC polls all of the slave devices one by one.

All of the slave devices will respond to the PLC’ polling one by one.

PLC will send the register/coil values from the slave devices to M1000.

M1000 send out alarm via SMS to the cell phone or monitoring center if coils or registers value is out of range.

Note: We will use the software Modbus Poll, to simulate the real PLC in the following test, and we need to input the

values manually.

Page 6: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 5 /19 Confidential

1.5 Benefits

Antenna• SMA Connector

Installation•Din-Rail or Wall Mounting or Desktop

Mode Switch•Normal or Config Mode

Serial Port: DB9F•RS232 and RS485 selecting by s/w

SIM Card

Power Supply: 2-PIN 5mm pluggable terminal block•DC 9-36V input Grounding Screw

LED Indicators• RSSI (Signal Strength)•NET, SYS, PWR

Control via AT commands (Hayes 3GPP TS 27.007 and 27.005).

GPRS, TCP/IP, SMS, CSD access via AT commands.

RS232/RS485 selectable by software, additional one digital input and one digital output.

Six LED indicators provide signal strength (RSSI) and status.

Wide range input voltages from 9 to 36 VDC and wide range operating temperature: ‐25 to 70 °C.

The metal enclosure can be mounted on a DIN-rail or on the wall, also with extra ground screw.

Featured SMS Direct mode which can transparently convert serial data to SMS or vice versa without using AT

Commands. Verification of incoming Caller ID is implemented to block un-authorized users.

Supports Modbus RTU slave protocol, converts alarm to SMS without using AT commands.

Auto reboot via SMS/Caller ID or during a preset time of a day.

Remote configuration via SMS.

Firmware upgrade via serial interface.

Page 7: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 6 /19 Confidential

1.6 Configuring the M1000 Modem

1. Switch the M1000 modem to Config Mode, and then connect M1000 to the PC’s serial port.

2. Run ModemCofigurator and go to Phone Book tab, Input the telephone numbers. These numbers will be used to

receive the SMS alarms from the M1000. Write to save.

Note: In some countries, Phone NO. must be written in international format, starting with “+” followed by the

country cod.

3. Go to Phone Group tab, divide the phone numbers that you set in Phone Book into the groups you need. In the

following example, we put the two numbers into group 1. Write to save.

Page 8: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 7 /19 Confidential

4. Go to Modbus tab, tick to enable the Modbus RTU function, and input the Modbus address, Coil address and

Register address. Write to save.

Page 9: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 8 /19 Confidential

Note:

Modbus address is the Modbus slave ID. PLC will use this ID to send the values to M1000. It corresponds to the

Slave ID in Modbus Poll which we will introduce later.

Coil address is the Modbus address to read coils or wire single coil. It corresponds to the Alarm index address in

Coil tab which we will introduce later. For example, we input 0 in coil address, and if we use Modbus Poll to send

a value to coil address 0, it will trigger the alarm index 1. And so on, if we use Modbus Poll to send a value to coil

address 7, it will trigger the alarm index 8.

Register address is the Modbus address to read holding register or wire single register. It corresponds to the

Alarm index address in Register tab which we will introduce later. For example, we input 0 in register address, so

if we use Modbus Poll to send a value to register address 0, it will trigger the alarm index 1. And so on, if we use

Modbus Poll to send a value to register address 14, it will trigger the alarm index 15.

The Coil address and Register address are divided in the different regions of ARM processor, so you can input the

same number in both Coil address and Register address.

Page 10: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 9 /19 Confidential

5. Go to Coil tab, write the On Massage and Off Massage, and choose the Group (Phone Group). Write to save.

Note:

Coil value usually includes two discrete values on/off.

Only in the first time or the status of coil value changed, the M1000 can send out the alarm SMS.

6. Go to Register tab, write the Register Name, input the Max value and Min value, and choose the Group (Phone

Group). Write to save.

Page 11: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 10 /19 Confidential

Note:

Register value usually includes numerical values which you need to define the max value and minimum value.

Only when the register value is out of range, M1000 can send out the alarm SMS. After that, if the value M1000

received is still abnormal, it will not send out alarm SMS again.

When the register value return to standard range, M1000 will send out alarm elimination SMS.

Note: Factory setting of the modem COM port is: 115200-8-N-1.

1.7 Installing the Modbus Poll

Please follow the following steps to install Modbus Poll:

1. Run the install file by double clicking the file;

Page 12: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 11 /19 Confidential

2. Select I accept the terms in the License Agreement and click Next;

3. Select install location and click Next;

Page 13: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 12 /19 Confidential

4. Click Next;

5. Click Next;

Page 14: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 13 /19 Confidential

6. Finish installation;

Page 15: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 14 /19 Confidential

1.8 Test coil and register

1. Configuring the M1000 as chapter 1.6.

2. Switch the M1000 modem to Config Mode;

3. Click to run the Modbus Poll;

4. Click Connection -> Connect;

5. Click Connection -> Connect;

6. Choose Serial Port and RTU, select the right Port number and parameters of this Port, then click OK;

Page 16: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 15 /19 Confidential

Note: Please enter the registration key numbers at the first time you connect. Reference key:

9876543210ABCDEFGHIJ9813

7. After connecting successfully, you can see the TX number keep increase;

8. Click Functions-> 05: Write Single Coil;

Page 17: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 16 /19 Confidential

9. Input Slave ID and Address, and select On, then click Send;

Note:

Slave ID corresponds to the Modbus address which we introduced in Configuring the M1000 Modem.

Address corresponds to the Coil address which we introduced in Configuring the M1000 Modem.

10. Then you will receive the alarm SMS as below:

11. Then you can change the Value to Off, and you will receive the alarm SMS as below:

Page 18: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 17 /19 Confidential

12. Click Functions -> 06: Write Single Register;

13. Input Slave ID, Address and an abnormal value (eg.10), then click Send;

Page 19: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 18 /19 Confidential

Note:

Slave ID corresponds to the Modbus address which we introduced in Configuring the M1000 Modem.

Address corresponds to the Register address which we introduced in Configuring the M1000 Modem.

14. Then you will receive the alarm SMS as below:

15. Then you can change the Value to an normal value (eg.25), and you will receive an alarm elimination SMS as

below:

1.9 Introduction of PLC Send SMS

We should preset the SMS content, phone number and values when using coil or register. But when using PLC send

SMS, you don’t need to set those parameters. All the conducts of M1000 will totally follow the instructions of PLC’s

modbus function codes.

Note: If you enable PLC Send SMS, the function of register will be disabled automatically. It means that these two

functions can not work at the same time.

Page 20: Modbus Alarm via SMS Applies to M1000 - Fabelec Alarm via SMS Applies to M1000 ... M C sU r t m e g ter e l t 0 m ... receive the SMS alarms from the M1000. Write to save.

Modbus Alarm via SMS

RT_M1000_AN007_v01.00 02.08.2012 Page 19 /19 Confidential

PLC sends SMS:

1. PLC send 0x10 (Set SMS Function code) to M1000;

2. M1000 received 0x10, and then open Phone Number Address and SMS Content Address for PLC to write

the phone number and SMS content in them;

3. PLC write phone number and SMS content into the addresses;

4. PLC send 0x05 (Send SMS Function code) to M1000;

5. M1000 received 0x05, and send out the SMS content which stored in SMS Content Address to the

phone number which stored in Phone Number Address.

PLC receives SMS:

1. M1000 receive SMS from cell phone or remote server;

2. M1000 store the phone number, date and content in Read Phone Number Address, SMS Received Date

Address and SMS Received Content Address separately;

3. PLC send 0x02 (SMS Notification Function Code) to M1000;

4. M1000 send 0x01 (Has New SMS) to PLC;

5. PLC send 0x04 (PLC Get SMS From Modem Function Code) to M1000;

6. M1000 send the SMS stored to PLC.