3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
113
3
CCPU_WaitSwitchEvent
This function waits for a switch interrupt event of C Controller module to occur.
■
Format
short CCPU_WaitSwitchEvent(short sSwitch, unsigned long ulTimeout)
■
Argument
■
Description
• This function waits for a switch interrupt event specified to the switch interrupt event type (sSwitch).
• If an interrupt event has already been notified at a time when this function is called, this function immediately ends normally.
• If the same switch interrupt event has been notified several times at a time when this function is called, the user program
executes processing as a single switch interrupt event notification.
• The specified timeout value is rounded to the tick unit. Specify a timeout value of one tick or more.
Precautions
• To issue the switch interrupt event by holding the MODE/SELECT switch in the SELECT position, selecting "EVENT" in the
operation selection mode is required. (
MELSEC iQ-R C Controller Module User's Manual (Startup))
• For the SELECT switch interrupt event, an event issuance status cannot be judged from the appearance. To check the
issued status of SELECT switch interrupt event, implement the processing such as receiving a switch interrupt event using
this function and making the USER LED turn ON.
■
Return value
■
Relevant function
• None
Argument
Name
Description
IN/OUT
sSwitch
Switch interrupt event type
Specify the switch interrupt event type.
• 0: RUN switch interrupt event
• 1: STOP switch interrupt event
• 2: SELECT switch interrupt event
IN
ulTimeout
Timeout
Specify the timeout value in milliseconds (0H to FFFFFFFFH).
(When FFFFFFFFH is specified, the function waits for an event infinitely.)
IN
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
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: ......