INCLUDE rtcu.inc PROGRAM test; VAR wk : DINT; END_VAR; // Open Motion Sensor interface msOpen(); // Enable wake on vibration with high sensitivity msVibrationSetWakeup(sensitivity := 80, enable := ON); // Sleep 600 seconds or wake on vibration detection wk := pmSuspend(time:=600, mode := 0); ... // Close Motion Sensor interface msClose(); BEGIN ... END; END_PROGRAM;