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
...
IF owAlarmSearch() < 1 THEN
DebugMsg(message:="No alarm!");
ELSE
DebugMsg(message:="Alarm on device: " + owAlarmGetID());
DebugMsg(message:="Device family: " + owAlarmGetFamily());
IF owAlarmAccess() = 0 THEN
...
owAlarmRelease();
END_IF;
END_IF;
END;
END_PROGRAM;
|