LabVIEW send - receive SMS message
The LabVIEW function palette does not contain functions for communication with GSM modem, so I developed a set of routines that allow you to send, receive, list or delete SMS messages. Based on these functions, I wrote the main program for easy sending, receiving, deleting and listing text messages. In addition to these functions it is also possible to test all AT functions of GSM modem. All programs are fully written in the programming language LabVIEW 8.6. Figure 1 presents the front panel of the main program.
Technical article
Link for the technical article: The original subrograms for sending/receiving SMS messages for LabVIEW
This paper describes a set of original subroutines for sending/ receiving SMS messages from LabVIEW programming language. The subprograms are specifically designed for the project of monitoring of gamma radiation in the facilities in which radioactive waste and radiation sources are stored. Briefly are explained the features of SMS services, format of AT commands and the role of SMS center in sending and receiving SMS messages. Data transfer between the measuring computer and GSM modem is performed over RS-232 serial port and is implemented by VISA functions. The source code of the main program and all subroutines for sending and receiving SMS messages can be downloaded from the author's website.
Fig.1 Front panel of the main program
Length of SMS messages to be sent is limited to 140 characters as a message is sent in text mode.
If it encounters a "storm cloud" and in a short time deliver the rain of SMS messages,the program will probably not read all messages in real time. Any missed SMS message can be viewed at any time by pressingkey "LIST SMS MESSAGES".
If the indicator "Bytes at serial port" has a value different from zero before the activation of some of the keys delete all characters which currently contains a serial buffer by clicking the key "CLEAR SERIALBUFFER" and then continue using the program.
The program analyzes the incoming SMS message, and if there is a text in the message "cmd = xx" where X is a hexadecimal digit the 8-bit LED port will be set according to separated hexadecimal number.
If you want to call all GSM subVIs from function palette you should create the directory with the desired name (eg. GSM) in the LabVIEW directory "user.lib" and than copy all subVIS in that directory. Figure 1 shows calling GSM subVIS from the function palette.
Fig.1 Calling GSM subVIs from the function palette
Discovered bugs
Dear readers, if you discover errors during using the main program andsubVIs do not hesitate to send me a brief description of the errors. I willtry to correct the errors reported to the site and upload the correctversion. Thank you in advance.
GSM modem GT900
All programs for sending and receiving SMS messages were tested with GSM modem GT900. This modem is product of Belgrade company DECODE (www.decode.rs). I want to thank company Decode that lent me GSM modem for long period of time.