Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 152

Controller module
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 for the event setting (psEvent) is as follows:
psEvent
psEvent[0]
psEvent[1]
psEvent[2]
psEvent[3]
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.
3 DETAILS OF FUNCTION
150
3.1 C Controller Module Dedicated Functions
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.
Description
Number of interrupt event settings (1 to 64)
Interrupt pointer number of the first interrupt event (0 to 15, 50 to 1023)
Interrupt pointer number of the second interrupt event (0 to 15, 50 to 1023)
Interrupt pointer number of the third interrupt event (0 to 15, 50 to 1023)
IN/OUT
IN
IN
OUT

Advertisement

Table of Contents
loading

Table of Contents