3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
115
3
CCPU_WaitUnitEvent
This function waits for an interrupt event notification from modules.
■
Format
short CCPU_WaitUnitEvent (short* psEvent, unsigned long ulTimeout, short* psSetEventNo)
■
Argument
• The specification method of the event setting (psEvent) is as follows:
■
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.
Argument
Name
Description
IN/OUT
psEvent
Event setting
Specify the interrupt event.
IN
ulTimeout
Timeout value
Specify the timeout value in milliseconds (0H to FFFFFFFFH).
(When FFFFFFFFH is specified, the function waits for an event infinitely.)
IN
psSetEventNo
Occurred event
Stores the occurred event.
Stores the event number (interrupt pointer number) of the notified interrupt event.
OUT
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)
Summary of Contents for MELSEC iQ-R C
Page 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Page 2: ......
Page 201: ...I 199 MEMO ...
Page 203: ...I 201 MEMO ...
Page 207: ......