gprsGetMonitorParm (Functionblock)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

2.60 / 1.00.00


This function will read out the parameters for the mobile network monitoring service previously set by using the gprsSetMonitorParm function.

 

Please note that this function is deprecated, please use the netGetMonitorParam function block instead.

 

 

Input:

None.

 

 

Output:

Enabled : BOOL

Determines whether the mobile network monitor service is enabled.

 

MaxAttempt : INT

Maximum number of check attempts before mobile network recovery actions are initiated.

 

AliveFreq : DINT

Frequency for checking the mobile network connection in seconds.

With this frequency, the connection will be checked "MaxAttempt" times before mobile network recovery actions are initiated.

 

 

Declaration:

FUNCTION_BLOCK gprsGetMonitorParm;
VAR_OUTPUT
  Enabled   : BOOL;
  MaxAttempt : INT;
  AliveFreq : DINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  gprscfg : gprsGetMonitorParm;
END_VAR;
 
// Check settings
gprscfg();
IF NOT gprscfg.Enabled OR gprscfg.MaxAttempt <> 3 OR gprscfg.AliveFreq <> 180 THEN
  // Set mobile network monitor parameters
  gprsSetMonitorParm(Enabled := TRUE, AliveFreq := 180);
  boardReset();
END_IF;
 
// Turn on power to the GSM module
gsmPower(power := ON);
gprsOpen();
 
BEGIN
  ...
END;
END_PROGRAM;