
Series 30i/ 31i/ 32i-A
C executor library for conversion
Programming manual
01 04.05.06
S. Hasegawa
New registration
B-64183EN/01
EDIT
DATE
DESIG.
DESCRIPTION
35/226
DRAW.NO.
3.2.3
Wait for the Timer Value
[Name]
os_sync_tim
[Syntax]
#include <oscall.h>
unsigned short os_sync_tim(unsigned long wakeup_time);
[Arguments]
Input
wakeup_time: Timer value
Output
---
[Return]
EC_TIMOUT: (0x011a) Normal termination.
[Description]
This function makes the task wait until specified time comes.
No other tasks can be held in wait state.
This instruction does not return the error value 0. When specified time
has come, the error value "EC_TIMOUT" is returned.
Actually, the task is held for the period ("wakeup_time" - current time).
If the "wakeup_time" is less than the current time (that is, if a past point
time is specified), the task is not held in wait state.
Before this function can be executed, the current time must be read using
os_show_tim().
In wakeup_time, a value not greater than 7FFFFFFFh (198 days, 20
hours, 11 minutes, 9 seconds, and 180 msec) may be set. The unit of a
time value to be specified in "wakeup_time" is the tick (= 8 msec).