114
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
CCPU_WaitTimerEvent
This function waits for a timer event to occur.
■
Format
short CCPU_WaitTimerEvent (long lEventNo)
■
Argument
■
Description
• This function waits for a timer event specified to the timer event number (lEventNo) to occur.
• The occurrence cycle of the timer every 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 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 operation of waiting for event (function completion) using this function will vary. This operation variation depends on
the specified value of synchronization type of the timer event number with the CCPU_EntryTimerEvent function.
• When the synchronization type is batch synchronization, the wait state of all tasks that are waiting for an event is canceled.
However, if there is no task in the wait state at event occurrence, the wait state will not be canceled even if the
CCPU_WaitTimerEvent function is called.
• When the synchronization type is individual synchronization, the wait state of one task in the tasks that are waiting for an
event is canceled. If multiple tasks are waiting for the same event, the wait state will be canceled in order of priority of a task
(in order of execution of wait when the priority is same). However, if there is no task in the wait state at the time of event
occurrence, the wait state will not be canceled even if the CCPU_WaitTimerEvent function is called later.
■
Return value
■
Relevant function
• Page 65 CCPU_EntryTimerEvent
Argument
Name
Description
IN/OUT
lEventNo
Timer event number
Specify a timer event number that waits for a timer event to occur. (1 to 16)
IN
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......