DebugGetLogParam (Functionblock)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

4.70 / 1.30.00


This function will read out the parameters for the log to file service previously set from the RTCU IDE or by the DebugSetLogParam function.

 

 

Input:

None.

 

 

Output:

ready : BOOL

True if valid data is available.

 

media : SINT

The media where the log files are stored.

 

dbg_enable : BOOL

Determines whether debug message logging is enabled.

 

dbg_files : INT

The maximum number of log files with debug messages which is saved.

 

con_enable : BOOL

Determines whether network console output logging is enabled.

 

con_files : INT

The maximum number of log files with network console output which is saved.

 

 

Declaration:

FUNCTION_BLOCK DebugGetLogParam;
VAR_OUTPUT
  ready     : BOOL;
  media     : SINT;

  dbg_enable : BOOL;
  dbg_files : INT;
  con_enable : BOOL;
  con_files : INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  param : DebugGetLogParam;
END_VAR;
 
// Check settings
param();
IF param.ready AND (NOT param.dbg_enable OR param.dbg_files <> 20) THEN
  // Set parameters
  DebugSetLogParam(param.dbg_enable := TRUE, param.dbg_files := 20);
  boardReset();
END_IF;
 
 
BEGIN
  ...
END;
END_PROGRAM;