I. Introduction
SMS (Short Message Service) is a fundamental service on GSM networks and has gained increasing popularity among system operators and developers.
It is highly valued. Currently, mobile networks such as GSM, CDMA, and TDMA all support SMS, making it a very popular mobile data service. Various applications based on this service have flourished, such as information services, business and entertainment, and remote monitoring. SMS enables nationwide roaming and overcomes the shortcomings of traditional private network communication systems, such as long network construction cycles, high investment, high maintenance costs, and limited user numbers. If users use STK encryption cards, point-to-point secure communication can also be achieved. Two-way data transmission using the GSM SMS system has low operating costs and stable performance, providing a brand-new communication platform for various remote monitoring applications.
Because PLCs are well-suited to the high reliability requirements of industrial enterprises for automation systems, they have long been a mainstay in the field of industrial automation control, providing advanced and reliable application examples for various automation control systems. On the other hand, PLCs must also rely on other new technologies to cope with the impact of their shrinking market share. The application of open communication network technology is at the forefront, and some PLC manufacturers have made breakthroughs in the development of PLC network interconnection functions based on fieldbus, the internet, and mobile communication.
The distributed remote wireless monitoring system designed in this paper uses the M90 PLC with SMS functionality from UNITRONICS, Israel, for on-site measurement and control. The remote wireless transmission route uses a stable GSM public network, and the transmission mode adopts the mature SMS short message method. The main information flow is the data that is automatically uploaded from the PLC field station to the monitoring center on a regular basis. At the same time, the monitoring server is equipped with the function of calling specified parameters in a timely manner and the function of encrypted mobile query by mobile phone, thus forming a complete remote monitoring application solution that combines centralized and mobile methods. Practice has proved that the system has complete functions, reliable performance, flexible scale configuration, and high cost performance.
II. System Hardware Configuration and Working Principle
The system consists of a centralized monitoring center, multiple PLC field monitoring stations, and a GSM network.
2.1 GSM Transmission Station
A GSM transmission station consists of a GSM modem, SIM card, RS232 connection cable, DC power supply, and external antenna. Each transmission station can easily access the public GSM network. The GSM modem integrates a GSM channel unit, signaling conversion unit, and level conversion unit using Siemens TC35. In applications, the field PLC control station and monitoring server connect to the GSM modem with a SIM card compatible with GSM mobile phones via an RS232 interface to send and receive GSM SMS messages, completing remote data exchange. A DC 24V power supply is convenient for field GSM transmission stations, while a commonly used 5V transformer can be selected for the monitoring center's GSM transmission station.
2.2 Field Measurement and Control Station
A PLC field control station consists of various field sensors and an M90 PLC, with each PLC configured with a GSM transmission station.
Field sensors such as flow meters and level gauges monitor data and input it to the PLC in the form of standard analog signals of 0-5V or 4-20mA. Field device status and switch control signals are connected to the PLC's digital I/O terminals, allowing the PLC to independently implement traditional field control. The M90-PLC has strong communication capabilities, including CAN bus and PSTN-based serial remote communication. A particularly unique feature is its serial-based SMS messaging function. According to the monitoring system requirements, the M90-PLC can send equipment operating status and production information to the monitoring center via GSM transmission station in the form of SMS messages, and receive operation command SMS messages from the monitoring center or authorized mobile phones for field parameter setting and equipment control.
2.3 Monitoring Center
The monitoring center mainly consists of a monitoring server and office equipment such as printers. Depending on the user's security requirements, the monitoring center server can be a high-performance PC or a high-reliability industrial control computer, or two redundant servers can be configured. Each server connects to a GSM transmission station via an RS232 interface, enabling 24/7 online real-time monitoring. Reports can be printed, or dynamic monitoring can be displayed on a large screen.
The system architecture diagram is shown in Figure 1.
This monitoring system primarily uses data automatically uploaded from PLC field stations to the monitoring center at regular intervals. It also features manual, timely calls to specify parameters, encrypted mobile query functionality, and automatic alarm functions, forming a complete information transmission model. The monitoring center categorizes and organizes data from various monitoring and control stations located in different locations and stores it in a database. If an alarm occurs on-site, the field monitoring and control station simultaneously sends the alarm information to the monitoring center and the mobile phones of on-duty personnel via a GSM transmission station. The monitoring center statistically analyzes the alarm information, promptly notifies relevant personnel, and can activate emergency plans based on the situation, including remote start/stop control of on-site equipment. Once the alarm is cleared, the field monitoring and control station also sends an alarm clearance notification SMS to the monitoring center, allowing the monitoring center to resume normal data acquisition and status reporting.
III. System Software Design
3.1 Lower-level software design
The programming of the lower-level machine, namely the M90-PLC control station, is achieved by using the Unironics U90 programming software installed on the computer.
Unitronics' software tools comply with the IEC 113.1 standard and provide a visual integrated development environment. In addition to the traditional PLC programming functions such as mnemonics and ladder diagrams, it offers various functional modules, including various communication function selections, communication parameter settings, SMS content editing, a 1K field database, and multiple timers that can be specified down to a specific year, month, day, or time period. This allows for more efficient methods to execute a wide variety of functions. This facilitates the development of lower-level software for monitoring systems and helps shorten development cycles and save program size.
M90 programming steps:
(1) Then, according to the field control requirements, the PLC general ladder diagram method is used to realize the monitoring and control of switch quantity and standard analog input.
(2) According to the monitoring needs, the SMS window provided by the integrated development tool is used to realize the editing of fixed short messages and GSM communication settings;
(3) Connect the internal relay representing a short message to the ladder diagram. When the set logic conditions are met, the unique S and R contacts are triggered to realize the sending and receiving of short messages.
3.2 Design of Supervisory Control Software
The supervisory control and data acquisition (SCADA) software consists of three parts: the SCADA SMS communication program, the monitoring interface software, and the monitoring center database software. We chose VB6.0 as the development tool.
1. Host computer SMS transceiver communication program design
Visual Basic serial communication is extremely convenient thanks to the support of Windows system programs, and the method of controlling a GSM modem via serial port to implement SMS functionality is also relatively simple.
The GSM modem of the GSM transmission station supports AT command set instructions, and the host computer transmits data to the GSM modem via RS232 serial port.
The modem can directly issue AT commands to quickly send, receive, query, and process SMS messages. SMS messages are commonly sent and received in two formats: Text and PDU (Protocol Description Unit) . The M90PLC internally uses the Text format. In the design of the upper-level monitoring software, I mainly implemented fixed text message communication between the upper and lower level stations using the Text format. A Text/PDU mode conversion interface was also set up to facilitate Chinese querying of the monitoring center database via mobile phone or PC.
Due to space limitations, this section will only introduce VB program development for sending and receiving SMS messages using the Text method. Sending and receiving SMS messages using the Text method is relatively simple, and VB programming makes it even more convenient. After initialization settings in the program, SMS messages can be sent by issuing AT commands through the MSComm1 control. Below is a VB example of SMS initialization and testing:
MSComm1.CommPort =1
Select COM1 as the communication port.
MSComm1.Setting =”9600,N,8,1”1
'Set serial communication format: speed 9600bps, no parity check, 8 data bits, 1 stop bit'
MSComm1.PortOpen =True
'Open COM port'
MSComm1 . Output=”AT+CSCA=”&Chr(34)&”+863800210500”&Chr(34)&”
Set the China Unicom SMS service center number for Xi'an area
MSComm1 . Output=”AT+CMGS=”&Chr(34)&”+13110043774”&Chr(34)&”
MSComm1 . Output=”HappyNewYear!”
MSComm1.PortOpen =FalSe
'Close COM port'
2. Monitoring Interface and Database Design
This section introduces the design of an interface for a small to medium-sized SMS remote monitoring system.
The monitoring system interface mainly includes the system login interface and the main monitoring system interface. Click the SMS remote monitoring system icon on the monitoring server desktop.
First, a system login window appears. The system verifies the username and password. Once the username and password are confirmed to be valid, you can enter the main interface of the monitoring system.
The main interface of the monitoring system is divided into the system settings interface, the SMS query and processing interface, and the remote control interface.
User Management: Monitoring center username, password, and user permissions changes; user addition and deletion management.
System communication management: communication format settings, SIM card number settings, and SMS sending and receiving management.
Site setup: This includes setting the site unit name, station number, mobile phone number, number of devices, etc.
Current on-site information: Inquiry into the working status of each site of each unit; such as the instantaneous flow rate and cumulative flow rate of sewage at the discharge outlet or oil output from the oil well, equipment status and operating time.
SMS sending and receiving records: Classified records of SMS sending and receiving between the monitoring center and field stations.
Real-time query: In addition to the data uploaded by the field stations on a regular basis, users in the monitoring center can manually query the field information.
Equipment control: Authorized monitoring system users can remotely control the equipment, including setting parameters and starting/stopping the equipment.
IV. Conclusion
Short Message Service (SMS) offers advantages such as always-on connectivity, no dialing required, low cost, and wide coverage, making it particularly suitable for applications requiring frequent transmission of small amounts of data, as well as remote areas where establishing communication lines is difficult. Highly reliable monitoring systems centered around PLCs have provided advanced and reliable application examples for various automated control systems. This paper utilizes the GSM network's SMS service to achieve remote data communication between the field PLC control station, the monitoring center, and mobile phones. This is a perfect combination of communication, control, and computer technologies, giving the remote monitoring system significant advantages in terms of advancement, reliability, economy, and convenience. Whether on a production line, near an oil well, or beside a natural gas pipeline, wherever you are, you can use this remote monitoring system to monitor the output of various products and perform remote mobile monitoring of operating conditions anytime, anywhere, using a mobile phone or computer. The system has been deployed in multiple industries in Kunming, Chengdu, Dalian, and other locations, and practical experience has proven its extremely high reliability.