Mitsubishi Electric MELSEC iQ-R C Programming Manual page 116

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

CCPU_WaitTimerEvent
This function 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 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
Return value
0 (0000H)
Other than 0
■Relevant function
• Page 65 CCPU_EntryTimerEvent
3 DETAILS OF FUNCTION
114
3.1 C Controller Module Dedicated Functions
Description
Specify a timer event number that waits for a timer event to occur. (1 to 16)
Description
Normal
Error
For details on the error, refer to the following chapter.
Page 174 ERROR CODE LIST
IN/OUT
IN

Advertisement

Table of Contents
loading

Table of Contents