accLoggerStop (Function)

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 stop logging.

The logger must first have been started with accLoggerStart.

 

 

Inputs:

Event : BOOL (Default FALSE)

If TRUE, then a "Logging stopped" event will be raised.

Note: this will overrule the configuration setting for raising a "Logging stopped" event.

 

Returns: INT

0

- OK.

-1

- General error.

-2

- Interface not open (see accOpen).

-3

- Logger not running.

 

Declaration:

FUNCTION accLoggerStop : INT;
VAR_INPUT
  Event : BOOL := FALSE;
END_VAR;

 

Example:

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