Mitsubishi Electric MELSEC iQ-R Series Manual page 66

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

Advertisement

CITL_WaitYEvent
This function waits for the output signal (Y) interrupt event notification.
■ Format
short CITL_WaitYEvent (short* psYNo, unsigned long ulTimeout, unsigned short* pusSetEventNo)
■ Argument
Argument
psYNo
ulTimeout
pusSetEventNo
• The specification method of the output signal (Y) number is as follows:
Storage position
psYNo[0]
psYNo[1]
psYNo[2]
psYNo[8]
• The occurred output signal (Y) event (pusSetEventNo) is stored as follows:
Storage position
pusSetEventNo[0]
■ Description
• This function waits for an interrupt event specified to the output signal (Y) number (psYNo) for the time specified to the
timeout value (ulTimeout).
• When multiple interrupt events occur, the interrupt events are notified in ascending order of the output signal (Y) number.
• If an interrupt event has already been notified at the time when this function is called, this function returns immediately.
When a reset operation is performed, any interrupt event that occurred prior to reset is discarded.
• If multiple interrupt events have been notified for the same interrupt event number (the output signal (Y) number) at the time
of calling the CITL_WaitYEvent function, it is treated as a single interrupt event notification.
• Set the output signal (Y) number without duplication. Otherwise, an error will be returned.
• The specified timeout value is rounded to the tick unit. Specify a timeout value of one tick or more.
• Design a program so that this function is not called simultaneously by specifying the same interrupt event (output signal (Y)
number) from multiple tasks. Otherwise, the execution of the interrupt event notified task is unpredictable.
• The output signal (Y) interrupt event notification wait function (CITL_WaitYEvent function)and the function executing
interrupt routine when output signal (Y) interrupts (Defined by CITL_EntryYInt/CITL_EnableYInt/CITL_DisableYInt function)
operate independently. These functions operate independently even if interrupt occurs by the same output signals (Y).
■ Return value
Return value
0 (0000H)
Other than 0 (0000H)
3 DETAILS OF FUNCTION
64
3.1 C Intelligent Function Module Dedicated Functions
Name
Output signal (Y) number
Timeout value
Occurred output signal (Y) event
Description
Number of interrupt event settings (1 to 16)
Output signal (Y) number of the first interrupt event (0x10 to 0x1F)
Output signal (Y) number of the second interrupt event (0x10 to 0x1F)
Output signal (Y) number of the 8th interrupt event (0x10 to 0x1F)
Description
Output signal (Y) number of the notified interrupt event
Description
Normal
Error
For details on the error, refer to the following chapter.
Page 108 ERROR CODE LIST
Description
Specify the output signal (Y) number.
Specify the timeout value in ms units (0H to FFFFFFFFH).
(When FFFFFFFFH is specified, the function waits for an event infinitely.)
Stores the occurred event.
(Stores the output signal (Y) number of the notified interrupt event.)
IN/OUT
IN
IN
OUT

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-r c

Table of Contents