64
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
CCPU_EntryInt
This function registers a routine to be called when an interrupt occurs.
■
Format
short CCPU_EntryInt (short sSINo, CCPU_FUNCPTR pFuncPtr)
■
Argument
• 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:
■
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
■
Relevant functions
• Page 61 CCPU_EnableInt
• Page 60 CCPU_DisableInt
Argument
Name
Description
IN/OUT
sSINo
Interrupt pointer number
Specify the interrupt pointer number.
IN
pFuncPtr
Registered routine
Specify a routine to be registered.
(The routine is deregistered by specifying NULL.)
IN
sSINo
Description
0 to 15
Interrupt by module
44
Inter-module synchronization interrupt
45
Multiple CPU synchronization interrupt
50 to 1023
Interrupt by module
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......