Closes the Motion Sensor interface, switching off the various sensors and clearing the possible wake-up sources.
Returns: INT
1
|
- Success.
|
0
|
- This function is not supported.
|
-1
|
- Interface is not open. Call msOpen first.
|
-2
|
- Generic error.
|
Declaration:
FUNCTION msClose : INT;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
wk : DINT;
END_VAR;
msOpen();
msVibrationSetWakeup(sensitivity := 80, enable := ON);
wk := pmSuspend(time:=600, mode := 0);
...
msClose();
BEGIN
...
END;
END_PROGRAM;
|