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

Controller module
Table of Contents

Advertisement

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
Argument
Name
sSwitch
Switch interrupt event type
ulTimeout
Timeout
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)
• 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
Return value
0 (0000H)
Other than 0
3 DETAILS OF FUNCTION
148
3.1 C Controller Module Dedicated Functions
Description
Specify the switch interrupt event type.
• 0: RUN switch interrupt event
• 1: STOP switch interrupt event
• 2: SELECT switch interrupt event
Specify the timeout value in milliseconds (0H to FFFFFFFFH).
(When FFFFFFFFH is specified, the function waits for an event infinitely.)
Description
Normal
Error
For details on the error, refer to the following:
Page 225 ERROR CODE LIST
IN/OUT
IN
IN

Advertisement

Table of Contents
loading

Table of Contents