owAlarmRelease (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

2.80 / 1.00.00


Releases the lock to the 1-Wire net previously obtained with owAlarmAccess.

 

Input:

None.

 

Returns: INT

0


Successful.

-1


1-Wire not supported on target.

-6


Not locked.

 

Declaration:

FUNCTION owRelease : INT;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
   ...
   // Query for a device that is alerting.
   IF owAlarmSearch() < 1 THEN
      DebugMsg(message:="No alarm!");
   ELSE
      // Get ID of device
      DebugMsg(message:="Alarm on device: " + owAlarmGetID());
      // Get Family of device
      DebugMsg(message:="Device family: " + owAlarmGetFamily());
      IF owAlarmAccess() = 0 THEN
         // Communicate with device
         ...
         // Release device
         owAlarmRelease();
      END_IF;
   END_IF;
END;
 
END_PROGRAM;