mbusSlaveUnregister (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

LX4,NX-400

Firmware version:

1.94.00


This function removes a slave device registration created with mbusSlaveRegister.

 

Input:

handle : SYSHANDLE

A handle to the connection

 

index : USINT (1..64)

The index of the registration to remove.

 

Returns: INT

1

- Success.

0

- Not supported.

-1

- Invalid handle

-2

- Index out of range.

-5

- Invalid interface type.

-9

- Communication error

 

Declaration:

FUNCTION mbusSlaveUnregister : INT;
VAR_INPUT
  handle   : SYSHANDLE;
  index    : USINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  mb     : SYSHANDLE;
  rc     : INT;
END_VAR;
 
BEGIN
  ...
  // Remove registration for slave index 1
  rc := mbusSlaveUnregister(handle:=mb, index:=1);
  DebugFmt(message:="mbusSlaveUnRegister(): \1", v1:=rc);
  ...
END;
END_PROGRAM;