canLoggerStop (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2 pro, DX4 pro, CX1 pro-c/warp-c, MX2 turbo/encore/warp, NX-200, NX-400, LX2, LX5

Firmware version:

2.50 / 1.00.00


This function will stop the logging.

The logger must first have been started with the canLoggerStart function.

 

 

Input:

port : SINT (1/2) (default 1)

The port of the logger.

 

 

Returns: INT

0

- Success.

1

- Logger is not started.

3

- Illegal logger index.

 

Declaration:

FUNCTION canLoggerStop : INT;

VAR_INPUT
  port : SINT := 1;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM CANExample;
VAR_INPUT
  LogBuf : ARRAY [1..1300] OF SINT;
END_VAR;
 
// Open can
canOpen(baud := 250);
canLoggerSetup(buffer := ADDR(LogBuf), size := SIZEOF(LogBuf));
...
 
BEGIN
  ...
  canLoggerStart();
  ...
  canLoggerStop();
  ...
END;
END_PROGRAM;