Mitsubishi Electric MELSEC iQ-R Series Manual page 65

Intelligent function module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

CITL_WaitTimerEvent
This function waits for a timer event to occur.
■ Format
short CITL_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 CITL_EntryTimerEvent
function.
• When reset operation is performed, any event that has occurred prior to reset is discarded.
• Using the CITL_WaitTimerEvent 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 the CITL_WaitTimerEvent 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 CITL_EntryTimerEvent
function.
Precautions
Note that operation of waiting for event (function return) using this function will vary. This operation variation depends on the
specified value of synchronization type of the timer event number with the CITL_EntryTimerEvent function.
• If the synchronization type is batch synchronization, this function is called later, cancel the waiting status of all the tasks
waiting for an event. However, if there is no task in the waiting status at the time of event occurrence, the waiting status is
not canceled even if the CITL_WaitTimerEvent function is called later.
• 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 CITL_WaitTimerEvent function is called later.
■ Return value
Return value
Description
0 (0000H)
Normal
Other than 0 (0000H)
Error
For details on the error, refer to the following chapter.
Page 108 ERROR CODE LIST
■ Relevant function
Page 27 CITL_EntryTimerEvent
Description
Specify a timer event number that waits for a timer event to occur. (1 to 16)
3.1 C Intelligent Function Module Dedicated Functions
IN/OUT
IN
3 DETAILS OF FUNCTION
3
63

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-r c

Table of Contents