mbusSlaveUnregister (Function)

Top  Previous  Next

Architecture:

NX32L

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:=mbindex:=1);
   DebugFmt(message:="mbusSlaveUnRegister(): \1", v1:=rc);
   ...
END;
END_PROGRAM;