Mitsubishi Electric MELSEC iQ-R C Programming Manual page 66

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

CCPU_EntryInt
This function registers a routine to be called when an interrupt occurs.
■Format
short CCPU_EntryInt (short sSINo, CCPU_FUNCPTR pFuncPtr)
■Argument
Argument
Name
sSINo
Interrupt pointer number
pFuncPtr
Registered routine
• The data type of the registered routine (pFuncPtr) is defined as void type in the header file, "CCPUFunc.h".
The specification method of the interrupt pointer number (sSINo) is as follows:
sSINo
0 to 15
44
45
50 to 1023
■Description
• This function registers the routine specified to the registered routine (pFuncPtr) in the interrupt specified with interrupt
pointer number (sSINo).
• When NULL is specified to the registered routine (pFuncPtr), the routine is deregistered.
• Use the CCPU_EnableInt function to enable the routine registered with the CCPU_EntryInt function.
Otherwise, the routine will not be called.
Precautions
• The registered routine is not executed while the operating system is in the interrupt-disabled state.
• For processing a routine to be registered in the registered routine (pFuncPtr), note the following:
A routine to be registered must not have an argument. (Do not pass an argument from an interrupt.)
When registering a routine, observe the considerations on the interrupt service routine (ISR).
Register minimal processing of a routine so that the processing time is as short as possible.
Only the C Controller module dedicated function for ISR can be used for a routine to be registered. Do not use any other
function. (An error of a function to be registered is not checked.)
• When the CCPU_EntryInt function is executed multiple times by specifying the same interrupt pointer number (sSINo), the
routine specified to the registered routine (pFuncPtr) last is registered. (Multiple routines cannot be registered.)
• The routine is disabled after the registration is done by this function.
• Calling an interrupt from other CPUs, a multiple CPU synchronization interrupt, and a WDT error interrupt is delayed while
the routine registered with the CCPU_EntryInt function is in operation.
■Return value
Return value
0 (0000H)
Other than 0
■Relevant functions
• Page 61 CCPU_EnableInt
• Page 60 CCPU_DisableInt
3 DETAILS OF FUNCTION
64
3.1 C Controller Module Dedicated Functions
Description
Specify the interrupt pointer number.
Specify a routine to be registered.
(The routine is deregistered by specifying NULL.)
Description
Interrupt by module
Inter-module synchronization interrupt
Multiple CPU synchronization interrupt
Interrupt by module
Description
Normal
Error
For details on the error, refer to the following chapter.
Page 174 ERROR CODE LIST
IN/OUT
IN
IN

Advertisement

Table of Contents
loading

Table of Contents