Modem (FB)¶
FUNCTION_BLOCK Modem EXTENDS CBM.ETrigTo
This function block represents the physical device; therefor only one instance should exist for one physical modem.
It has to be initialized once, to get a connection to the modem, set the pin if required and check the network status.
- InOut:
Scope
Name
Type
Comment
Inherited from
Input
xExecuteBOOLRising edge: Action startsFalling edge: Resets outputsIf 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
udiTimeOutUDINTDefines the time (µs) after which an FB (e.g. requiring an external acknowledgement) aborts operation due to a timeout with error message.
ETrigTo
Output
xDoneBOOLTRUE: Action successfully completedETrigTo
xBusyBOOLTRUE: Function block activeETrigTo
xErrorBOOLTRUE: Error occurred, function block aborts actionFALSE: No errorETrigTo
Input
itfConnectionTypeThe function which implements this interface. The connection parameters must be added to this function block.
sPinSTRING(10)The pin for the sim card which is included in the GSM modem
Output
eErrorerror code