3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
111
3
CCPU_WaitEvent
This function waits for an interrupt event notification from other CPUs.
■
Format
short CCPU_WaitEvent (short* psEvent, unsigned long ulTimeout, short* psSetEventNo)
■
Argument
• The specification method of the interrupt event setting (psEvent) is as follows:
• The following value is stored in the occurred event (psSetEventNo).
■
Description
• This function waits for an interrupt event specified to the interrupt 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 the tick unit. Specify a timeout value of one tick or more.
• Specify the programmable controller CPU or C Controller module to the CPU number. Otherwise, an error will be returned.
• Design a program so that this function is not called simultaneously by specifying the same event number (interrupt pointer
number) from multiple tasks. Otherwise, the execution of the interrupt event notified task is unpredictable.
Argument
Name
Description
IN/OUT
psEvent
Interrupt 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 CPU number and 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]
CPU number of the first interrupt event (1 to 4)
First event setting
psEvent[2]
Event number (interrupt pointer number) of the first interrupt event (0 to 15)
psEvent[3]
CPU number of the second interrupt event (1 to 4)
Second event setting
psEvent[4]
Event number (interrupt pointer number) of the second interrupt event (0 to 15)
psEvent[5]
CPU number of the third interrupt event (1 to 4)
Third event setting
psEvent[6]
Event number (interrupt pointer number) of the third interrupt event (0 to 15)
psSetEventNo
Description
psSetEventNo[0]
CPU number of the notified interrupt event
psSetEventNo[1]
Event number (interrupt pointer number) of the notified interrupt event
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: ......