msLoggerDestroy (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

NX-200, LX2

Firmware version:

1.50.00


Remove specified logger from available loggers.

 

Input:

Logger : SYSHANDLE

A user provided handle to uniquely identify the logger. See SYSHANDLE page. This field is mandatory.

The handle will be invalidated after a successful call to this function.

 

Returns: INT

1

- Success.

0

- This function is not supported.

-1

- Interface is not open. Call msOpen first.

-2

- Generic error.

-5

- The logger is not present.

-9

- The specified logger is running. Call msLoggerStop first.

 

 

Declaration

FUNCTION msLoggerDestroy : INT;
VAR_INPUT
  Logger       : ACCESS SYSHANDLE;
END_VAR;
 

Example:

INCLUDE rtcu.inc
 
VAR
  logger       : SYSHANDLE;
END_VAR;
 
PROGRAM test;
VAR
  rc           : INT;
  buf1         : ARRAY[1..10000] OF DINT;
END_VAR;
rc := msOpen();
DebugFmt(message:="msOpen (rc=\1)", v1:=rc);
...
rc := msLoggerCreate(logger:=logger, buffer:=ADDR(buf1), size:=SIZEOF(buf1), stoponfull:=TRUE);
DebugFmt(message:="msLoggerCreate (rc=\1) buffer_size=\4, stoponfull=TRUE", v1:=rc, v4:=SIZEOF(buf1));
...
rc := msLoggerDestroy(logger:=logger);
...
BEGIN
  ...
END;
END_PROGRAM;