Using LabVIEW to Create a GPRS Monitoring System

  Print Print

"We created a system for monitoring base stations using fully configurable LabVIEW application software. Because LabVIEW works with databases and supports various communication protocols, as well as offers easy, well-designed, and intuitive user interface development, we significantly reduced our software development time."

- Aleksandar Popović, UNO-LUX NS d.o.o.

The Challenge:
Developing an alternative to MODBUS-transparent general packet radio service (GPRS) routers for monitoring remote locations using GPRS for data transfer.

The Solution:
Using NI LabVIEW to create a solution that uses a Global System for Mobile Communications (GSM)/GPRS modem in a central location to establish dial-up connections while encapsulating MODBUS data in user datagram protocol (UDP) packages and sending it via a GSM modem to GPRS routers in remote locations.

Author(s):
Aleksandar Popović - UNO-LUX NS d.o.o.

For data transmission at larger distances, it is most logical to use the existing infrastructure of mobile operators. In this application digital signals (alarm's states) are transmitted via GPRS communication from remote base stations for their supervision. This application can be used in various industries for transmission of various parameters. Upon implementation of this application, very quickly we have developed a number of similar applications that also allow the transmission of analog signals, their logging, showing trends. The largest number of applications is installed in water supply systems.

System Setup and Communication

In a central location, a desktop computer runs the application based on LabVIEW as well as two GSM/GPRS modems. One of the modems communicates with base-station GPRS routers in remote locations, while the other sends short message service (SMS) messages to servicers. Along with the GPRS routers, the system features programmable logic controllers (PLCs) and touch panels at the remote location. The PLC receives various device statuses and communicates with a GPRS router using the MODBUS protocol and a touch panel. The operator can log in and modify data on the base station using the touch panel.

In typical solutions, the GPRS router is in a central location, and the time to call remote locations increases with the number of locations. Because MODBUS addresses do the routing, every PLC in the base station has a unique address. With our solution, the time needed to call remote locations has practically nothing to do with how many there are, and PLCs can have identical MODBUS addresses because remote locations have different IP addresses.

System Software

As a National Instruments Alliance Partner, we use LabVIEW for all of our applications. LabVIEW is a powerful programming language for developing well-designed, intuitive user interfaces. It supports various communication protocols and works with databases. In this application, we encapsulated MODBUS data in a UDP packet and sent it through a GSM modem to remote GPRS routers. The application consists of a server and client application. The server application runs on the server computer, which is connected to a GSM modem. We installed client applications on remote computers and connected them to a server application via the Internet.

The software we created is completely configurable. Users can define locations; add, remove, and modify data; define alarms; modify operator passwords for logging in to remote locations; define the names of servicers and groups for sending SMS messages; and define user profiles for logging in to the system. The remote locations table shows current alarm statuses. The list of alarms and events shows currently active and unconfirmed alarms and events. The system saves all of the alarms, events, and important administrator actions in a database. Users can search this database by exporting it to MS Excel.

System Main Application Window

The main application window (see Figure 1) shows the program main menu, remote location table,  alarm and event list, and status line. The main menu contains application control action calls. The status line contains information about the current program state and the name of the currently logged-in user. The remote locations table shows the current state of all alarms monitored for all defined locations in the system. Each table corresponds to one remote location. The first three columns give general location information, while the other columns represent remote-location PLC digital inputs. These digital inputs represent alarms from a corresponding location. Depending on the current state of every alarm in every location, a specific field changes color—green means the alarm is not active, orange means the alarm is active but not urgent, red means the alarm is active and urgent, and white means the alarm is not monitored for the current location.

In the remote locations table, general information fields also change color according to the color of the location’s dominant alarm. If a user is logged in at an observed location, the fields are blue. If communication with a remote location is lost, a whole row in the table is red.

Users can find currently active and/or unconfirmed alarms and events at any moment in the list of alarms and events. An event represents operator login to a remote location and a change in the type of input contacts (normally-open/normally-closed). The operator login event is active as long as the operator is logged in. Every row of alarms and events in the list describes one active and/or unconfirmed alarm or event including activation and deactivation date and time; the label of and location in which the alarm or event occurred; the name, number of activations, and alarm or event date and time confirmation in the central station; and the name of the user who acknowledged the alarm or event, optionally followed by a user comment. Alarm or event text color changes based on its current state—red means active (an unconfirmed alarm or event); black means active (a confirmed alarm or event); and blue means inactive (an unconfirmed alarm or event).

When right-clicking a location in the main application window and choosing the Add Location option from the pull-down menu, a window for defining a remote location appears (see Figure 2). This window is separated into three sections:

Location

The first section, Location, is for entering general remote location information. Fields include the following:

  • Location ordinal number: A unique number greater than zero and sequential to the previously defined location.
  • Location label: A unique two- to 12-character label for a defined location that represents the unique remote location mark.
  • Location name: A four- to 40-character text title.
  • IP address: The remote location IP address; for example, the IP address of the SIM card inserted in the GPRS router at the remote location.

Alarms

In the second section of the window, the user can select alarms to monitor at the defined location  by defining the digital PLC inputs (X0 to X23). If a specific digital PLC input is not wired or should not be considered functional, the user selects the option, > alarm is not chosen <, from the pull-down menu. If a digital PLC input signal is monitored, the user selects one of the defined alarms from the pull-down menu. The first four PLC inputs (X0 to X3) are reserved for time alarms, and, in corresponding pull-down menus, users can select only these kinds of alarms. Other inputs (X4 to X23) are for urgent and nonurgent alarms. For each remote location, the user can select any alarm only once.

SMS Message Sending

The third section of the window, SMS message sending, defines which service providers belong to which group for the defined location. For each of five groups, users can select three service providers defined elsewhere in the application from pull-down menus. Urgent alarms that require sending SMS messages are defined for each group in another application location.

To enter data, press the OK button. The system logs this screen and the added location appears in the remote locations table in the main window. The application automatically starts collecting data from the newly added remote location. 

Significantly Reduced Software Development Time

We created a system for monitoring base stations using fully configurable LabVIEW application software. Because LabVIEW works with databases and supports various communication protocols, as well as offers easy, well-designed, and intuitive user interface development, we significantly reduced our software development time.

Author Information:
Aleksandar Popović
UNO-LUX NS d.o.o.
Generala Milutina Vlajica 36
11147 Belgrade
Serbia
Tel: +381112511122
salac@unoluxns.com

Bookmark and Share


Explore the NI Developer Community

Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.

‌Check‌ out‌ the‌ NI‌ Community


Who is National Instruments?

National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.

‌Learn‌ more‌ about‌ NI