accLoggerGetConfig (Functionblock)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

CX1, SX1, MX2 turbo/encore/warp, NX-200, NX-900, LX2, LX5

Firmware version:

2.40 / 1.40.00


This function will return the current configuration and status of the logging

This configuration must first be set with accLoggerSetConfig.

 

 

Outputs:

Size : INT

The maximum number of samples the buffer can hold.

 

Samples  : INT

The current number of samples in the buffer.

 

DownSample : SINT

Skip X number of samples when collecting.

 

Level : INT

How full the buffer is in 0.1 percent.

 

WarningLevel : INT

At what level a "Logger level warning" event will be generated in 0.1 percent. If 0 no warning will be generated.

 

WarnIfFull : BOOL

Generates a "Logger is full" event when the data area is full and data begins to be overwritten.

 

StopOnFull : BOOL

Stops logger when data area if full.

 

StopOnShock : BOOL

Stops logging when shock event is detected.

 

StopOnAcc : BOOL

Stops logging when acceleration event is detected.

 

Running : BOOL

True if logging is started, False if logging is stopped.

 

Declaration:

FUNCTION_BLOCK accLoggerGetConfig;
VAR_OUTPUT
  Size           : INT;
  Samples        : INT;
  Level          : INT;
  WarningLevel   : INT;
  DownSample     : SINT;
  WarnIfFull     : BOOL;
  StopOnFull     : BOOL;
  StopOnShock    : BOOL;
  StopOnAcc      : BOOL;
  Running        : BOOL;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
VAR
  buf : ARRAY [1..500] OF DINT;
  cfg : accLoggerGetConfig;
END_VAR;
accOpen();
accLoggerSetConfig(buffer := ADDR(buf), size := SIZEOF(buf));
cfg();
...
BEGIN
 ...
END;
END_PROGRAM;