Mitsubishi Electric MELSEC iQ-R C Programming Manual page 117

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

Advertisement

CCPU_WaitUnitEvent
This function waits for an interrupt event notification from modules.
■Format
short CCPU_WaitUnitEvent (short* psEvent, unsigned long ulTimeout, short* psSetEventNo)
■Argument
Argument
Name
psEvent
Event setting
ulTimeout
Timeout value
psSetEventNo
Occurred event
• The specification method of the event setting (psEvent) is as follows:
psEvent
Description
psEvent[0]
Number of interrupt event settings (1 to 64)
psEvent[1]
Interrupt pointer number of the first interrupt event (0 to 15, 50 to 1023)
psEvent[2]
Interrupt pointer number of the second interrupt event (0 to 15, 50 to 1023)
psEvent[3]
Interrupt pointer number of the third interrupt event (0 to 15, 50 to 1023)
■Description
• This function waits for an interrupt event specified to the event setting (psEvent) for the time specified to the timeout value
(ulTimeout).
• When multiple interrupt events occur, the interrupt events are notified in ascending order of the event number.
• If an interrupt event has already been notified at the time when this function is called, this function immediately ends
normally. 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 event number (interrupt pointer number) at a time when this
function is called, it is notified as a single interrupt event.
• Set the event number (interrupt pointer number) without duplication. Otherwise, an error will be returned.
• The specified timeout value is rounded to 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 (interrupt pointer
number) from multiple tasks. Otherwise, the execution of the interrupt event notified task is unpredictable.
• When an interrupt event is notified (return value of this function is normal), the event number of the notified interrupt event
is returned to the occurred event (psSetEventNo).
• An interrupt event is not notified while a stop error is occurring in a C Controller module.
Description
Specify the interrupt event.
Specify the timeout value in milliseconds (0H to FFFFFFFFH).
(When FFFFFFFFH is specified, the function waits for an event infinitely.)
Stores the occurred event.
Stores the event number (interrupt pointer number) of the notified interrupt event.
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
IN/OUT
3
IN
IN
OUT
115

Advertisement

Table of Contents
loading

Table of Contents