Mitsubishi Electric MELIPC MI5000 Series Programming Manual page 79

Vxworks
Hide thumbs Also See for MELIPC MI5000 Series:
Table of Contents

Advertisement

CCPU_WaitTimerEvent
Waits for a timer event to occur.
Format
short CCPU_WaitTimerEvent(long lEventNo)
Argument
Argument
Name
lEventNo
Timer event number
Description
• This function waits for a timer event specified to the timer event number (lEventNo) to occur.
• The occurrence cycle of the timer event number (1 to 16) can be set, changed, or cleared by the CCPU_EntryTimerEvent
function.
• When reset operation is performed, any event that has occurred prior to reset is discarded.
• Using this function enables a cycle timer task. However, even though an event occurs, the waiting task may not be
operated immediately due to the system status (such as the occurrence of an interrupt).
• If waiting for an event with this function to a cleared timer event, the wait status will not be cleared until an event occurs
after the registration of the event (and the specified cycle has elapsed) with CCPU_EntryTimerEvent function.
Precautions
Note that event waiting (function return) operation depends on the synchronization type value of the timer event number
specified by the CCPU_EntryTimerEvent function.
• When the synchronization type is '0' (batch synchronization), the waiting status of all tasks waiting for events is cleared.
When there are no tasks waiting for an event to occur, the waiting status is not cleared even when this function is executed
afterwards.
• When the synchronization type is '1' (individual synchronization), the waiting status of one task waiting for an event is
cleared. When multiple tasks are waiting for the same event, the waiting status is cleared based on the priority order of
tasks (or the waiting execution order when the priority is the same).
When there are no tasks waiting for an event to occur, the waiting status is cleared immediately when this function is
executed afterwards.
Return value
Return value
0(0000H)
-225(FF1FH)
-234(FF16H)
For details on error codes, refer to the following section.
Page 116 Function error codes
Relevant function
Page 33 CCPU_EntryTimerEvent
Description
Specify a timer event number that waits for a timer event to occur. (1 to 16)
Description
Normal
Event number specification error
Event wait error
3 DETAILS OF FUNCTIONS
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
77

Advertisement

Table of Contents
loading

Table of Contents