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

Controller module
Table of Contents

Advertisement

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
Argument
Name
psEvent
Interrupt event setting
ulTimeout
Timeout value
psSetEventNo
Occurred event
• The specification method for the interrupt event setting (psEvent) is as follows:
psEvent
psEvent[0]
psEvent[1]
psEvent[2]
psEvent[3]
psEvent[4]
psEvent[5]
psEvent[6]
• The following value is stored in the occurred event (psSetEventNo).
psSetEventNo
psSetEventNo[0]
psSetEventNo[1]
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.
3 DETAILS OF FUNCTION
146
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 CPU number and event number (interrupt pointer number) of the notified
interrupt event.
Description
Number of interrupt event settings (1 to 64)
CPU number of the first interrupt event (1 to 4)
Event number (interrupt pointer number) of the first interrupt event (0 to 15)
CPU number of the second interrupt event (1 to 4)
Event number (interrupt pointer number) of the second interrupt event (0 to 15)
CPU number of the third interrupt event (1 to 4)
Event number (interrupt pointer number) of the third interrupt event (0 to 15)
Description
CPU number of the notified interrupt event
Event number (interrupt pointer number) of the notified interrupt event
IN/OUT
IN
IN
OUT
First event setting
Second event setting
Third event setting

Advertisement

Table of Contents
loading

Table of Contents