SendSMS (FB)

FUNCTION_BLOCK SendSMS EXTENDS CBM.ETrigTo

By use of this function block, a short message with the provided information will be send.
After starting this function block, it will try to allocate the modem.
When it is free a lock is set and therefore reserved for the currently function block.
After a reset (falling edge on “xExecute”) the lock is released.
InOut:

Scope

Name

Type

Comment

Inherited from

Input

xExecute

BOOL

Rising edge: Action starts
Falling edge: Resets outputs
If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError) are present at the outputs for exactly one cycle.

ETrigTo

udiTimeOut

UDINT

Defines the time (µs) after which an FB (e.g. requiring an external acknowledgement) aborts operation due to a timeout with error message.

ETrigTo

Output

xDone

BOOL

TRUE: Action successfully completed

ETrigTo

xBusy

BOOL

TRUE: Function block active

ETrigTo

xError

BOOL

TRUE: Error occurred, function block aborts action
FALSE: No error

ETrigTo

Inout

ModemFB

Modem

The modem function block

Input

smsInfo

SMS

The neccessary information to send a short message.

Output

eError

ERROR

error

VisuResult

VISU_RESULT

This output is needed for the visualization.