Difference between revisions of "SMS"

From IPLOG
Jump to: navigation, search
(Created page with "== Description: == === SMS_Rx === PICTURE {| class="wikitable" | colspan="5" |Asynchronous interface |- |in |IP_ADDR |string | |ip address...")
 
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Description: ==
 
== Description: ==
 +
SMS_TX/SMS_RX blocks are used for communication between the program and the user through the GSM network. It uses SMS messages to transmit and receive information.
  
 +
[[Libraries for IEC 61131-3|Back to Libraries]]
  
 +
=== SMS_RX ===
 +
Receive SMS messages.
  
=== SMS_Rx ===
+
[[File:SMS_RX.png]]
 
 
 
 
PICTURE
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
| colspan="5" |[[Libraries for IEC 61131-3|Asynchronous interface]]
 
|-
 
|-
|in
+
|out
|IP_ADDR
+
|VALID
|string
+
|bool
 
|
 
|
|ip address
+
|indicates success operation and valid output
 
|-
 
|-
|in
+
|out
|TMO_S
+
|FROM
|int
+
|string
 
|
 
|
|timeout in seconds
+
|source phone number
 
|-
 
|-
 
|out
 
|out
|Q
+
|TEXT
|bool
+
|string
 
|
 
|
|status
+
|SMS content '''(ASCII)'''
 
|}
 
|}
  
  
 +
=== SMS_TX ===
 +
Sends SMS messages.
  
=== SMS_Tx ===
+
[[File:SMS_TX.png]]
 
 
 
 
PICTURE
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 41: Line 41:
 
|-
 
|-
 
|in
 
|in
|IP_ADDR
+
|SEND
|string
+
|bool r_edge
 
|
 
|
|ip address
+
|rising edge starts new operation
 
|-
 
|-
 
|in
 
|in
|TMO_S
+
|NUMBER
|int
+
|string
 
|
 
|
|timeout in seconds
+
|destination phone number
 
|-
 
|-
|out
+
|in
|Q
+
|TEXT
|bool
+
|string
 
|
 
|
|status
+
|SMS content '''(ASCII)'''
 
|}
 
|}
  
Line 62: Line 62:
 
'''Block behavior:'''
 
'''Block behavior:'''
  
 +
'''SMS_RX''' - If a new incoming SMS is detected, a short pulse appears on the VALID output, the FROM and TEXT outputs are filled according to the SMS content.
 +
 +
'''SMS_TX''' - If a rising edge is detected at the SEND input, an SMS message is sent to the phone number from NUMBER input and the text contains the text from the TEXT input.
 +
 +
 +
 +
== Valid Phone Number Format ==
 +
The '''NUMBER''' input is a STRING format, so the phone number is entered in single quotes.
 +
 +
Example for Czech Republic: ''' '00420731523929' '''
 +
 +
 +
'''00''' - For international communication. According to the operator, it is possible to replace 00 with +, but not all countries support the + format. '''00 is recommended'''.
 +
 +
'''420''' - International Code for Czech Republic. Use the international code for the country where the device is located.
 +
 +
'''731523929''' - Phone number
  
  
  
 
== Examples ==
 
== Examples ==
 +
 +
'''SMS_RX'''
 +
 +
Closing the bus0_001_re1 relay provided the SMS text is ON and has been received from Phone_Number.
 +
 +
[[File:SMS_RX_Example.png]]
 +
 +
'''SMS_TX'''
 +
 +
Closing the tamper sends an SMS in the form "Door open" to the phone number Phone_Number.
 +
 +
[[File:SMS_TX_Example.png]]
 +
 +
 +
 +
 +
== Related links: ==
 +
 +
Example: [[Sending and Receiving SMS | Sending and Receiving SMS]] <br>
 +
Example: [https://www.metel.eu/en/newdesign/solutions?itemId=93 SMS Basic Example]
  
  
 
[[Libraries for IEC 61131-3|Back to Libraries]]
 
[[Libraries for IEC 61131-3|Back to Libraries]]

Latest revision as of 04:57, 21 May 2020

Description:

SMS_TX/SMS_RX blocks are used for communication between the program and the user through the GSM network. It uses SMS messages to transmit and receive information.

Back to Libraries

SMS_RX

Receive SMS messages.

SMS RX.png

Asynchronous interface
out VALID bool indicates success operation and valid output
out FROM string source phone number
out TEXT string SMS content (ASCII)


SMS_TX

Sends SMS messages.

SMS TX.png

Asynchronous interface
in SEND bool r_edge rising edge starts new operation
in NUMBER string destination phone number
in TEXT string SMS content (ASCII)


Block behavior:

SMS_RX - If a new incoming SMS is detected, a short pulse appears on the VALID output, the FROM and TEXT outputs are filled according to the SMS content.

SMS_TX - If a rising edge is detected at the SEND input, an SMS message is sent to the phone number from NUMBER input and the text contains the text from the TEXT input.


Valid Phone Number Format

The NUMBER input is a STRING format, so the phone number is entered in single quotes.

Example for Czech Republic: '00420731523929'


00 - For international communication. According to the operator, it is possible to replace 00 with +, but not all countries support the + format. 00 is recommended.

420 - International Code for Czech Republic. Use the international code for the country where the device is located.

731523929 - Phone number


Examples

SMS_RX

Closing the bus0_001_re1 relay provided the SMS text is ON and has been received from Phone_Number.

SMS RX Example.png

SMS_TX

Closing the tamper sends an SMS in the form "Door open" to the phone number Phone_Number.

SMS TX Example.png



Related links:

Example: Sending and Receiving SMS
Example: SMS Basic Example


Back to Libraries