EXAMPLE 1

Suppose we want to activate a heater connected to output 3 when the temperature measured at analog input 3 is lower than 20°C but only if the regulation is active.

Upon receiving an SMS from an active user that contains the text ON we will activate the memory bit 3 that we have called regulator, we will deactivate it if it contains the text OFF.

This bit is used to activate or deactivate the adjustment.

Output 3 is switched off in any case when the temperature is above 20°C.


SME SMS FROM USER

$N24)ON SMS LAST TEXT ) ON





regulator=on





trigger event is the receipt of an SMS from an active user.

The first condition to check is that the text of the last SMS received contains the word ON.

The first action contains the command that sets to 1 the memory bit that we have called regulator.


SME SMS FROM USER

$N24)OFF SMS LAST TEXT ) OFF





regulator=off





trigger event is the receipt of an SMS from an active user.

The first condition to check is that the text of the last SMS received contains the word OFF.

The first action contains the command that resets to 0 the memory bit that we have called regulator.


A3 ANALOG INPUT 3

$A32<20 ANALOG INPUT 3 AVERAGE < 20

$M31=1 MEMORY BIT 3 STATUS = 1




out3=1





trigger event is the end of the analog input 3 measurement period.

The first condition to check is that the average value measured by analog input 3 is less than 20.

The second condition to check is that the memory bit 3 called regulator is active.

The first action contains the command that turns on output 3.


A3 ANALOG INPUT 3

$A32>20 ANALOG INPUT 3 AVERAGE > 20





out3=0





trigger event is the end of the analog input 3 measurement period.

The first condition to check is that the average value measured by analog input 3 is greater than 20.

The first action contains the command that turns off output 3.

EXAMPLE 2

An incoming call from strangers (therefore non-users) generates a 3-second pulse on output 2 used to open an electric gate.

A limit switch is connected to digital input 2 which closes when the gate is completely closed.

Simultaneously with the output we activate the memory bit 2 specifying the switch-off after 2 minutes. After this time we will check the status of the gate and if it is still open we will send an alarm SMS.


CAU CALL FROM UNKNOWN






out2=1,3

mem2=1,120




trigger event is the receipt of a telephone call from unknown.

The first action contains the command that closes the output 2 contact for 3 seconds to open the gate.

The second action contains the command that activates the memory bit 2 for 120 seconds, to give the gate the time to close.


M2 MEMORY BIT 2

$M21=0 MEMORY BIT 2 STATUS = 0

$I22=0 INPUT 2 STATUS = 0




AT+SMS=+391234,"Gate locked open"





trigger event is the state change of the memory bit 2.

The first condition to check is that the memory bit 2 is off (0).

The second condition to check is that the digital input 1 is open (limit switch open because the gate has not closed).

The first action contains the command that sends an SMS message to the number +391234 with the text "Gate locked open".