The ReceiveSMS function block is used to wait for SMS received by a GSM Modem. For example, the controller can handle a command received in SMS from a specified cell phone.
NOTE:
Be sure to have your GSM modem properly configured as follows:
oMake sure the SIM card in the modem is unlocked.
oMake sure the telephone number of the SMS center is valid.
You can use the ConfigSim function block to properly set these parameters from your application program.
Output |
Type |
Description |
---|---|---|
smsText |
STRING(255) |
The smsText output contains the body of the text message. |
phoneNb |
STRING |
The phoneNb output contains the number of the phone that sent the SMS. |
smsDate |
DATE_AND_TIME |
The smsDate output contains the date of the communication. |
This figure shows the declaration and use of the ReceiveSMS function