EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Page 32

Mitsubishi Electric MELSEC iQ-R Series
126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
30
3 DETAILS OF FUNCTION
3.1 C Intelligent Function Module Dedicated Functions
CITL_EntryYInt
This function registers a routine to be called when an output signal (Y) interrupt occurs.
Format
short CITL_EntryYInt (short sYNo, CITL_FUNCPTR pFuncPtr)
Argument
The data type of the registered routine (pFuncPtr) is defined as void type in the header file (CITLFunc.h).
Specify the output signal (Y) number in the following format.
Output signal (Y) number: 0x10 to 0x1F
Description
This function registers a routine specified to the registered routine (pFuncPtr) in the interrupt specified with the output signal
(Y) number (sYNo).
When NULL is specified to the registered routine (pFuncPtr), the routine is deregistered.
Use the CITL_EnableYInt function to enable the routine registered with the CITL_EntryYInt function.
Otherwise, the routine will not be called.
Precautions
When the operating system is in an interrupt disabled state, the registered routine is not executed.
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 intelligent function 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 CITL_EntryYInt function is executed more than once with the same output signal (Y) number (sYNo) specified,
the routine, which was specified by the registered routine (pFuncPtr) at last, will be registered. (Multiple routines cannot be
registered.)
The routine is disabled after the registration is done by the CITL_EntryYInt function.
When the routine registered by the CITL_EntryYInt function is running, calling the routine registered in WDT error interrupt
is delayed.
The output signal (Y) interrupt event notification wait function (CITL_WaitYEvent function)and the function executing
interrupt routine when output signal (Y) interrupts (Defined by CITL_EntryYInt/CITL_EnableYInt/CITL_DisableYInt function)
operate independently. These functions operate independently even if interrupt occurs by the same output signals (Y).
Return value
Relevant function
Page 24 CITL_DisableYInt
Page 25 CITL_EnableYInt
Argument Name Description IN/OUT
sYNo Output signal (Y) number Specify the output signal (Y) number. IN
pFuncPtr Registered routine Specify the routine to be registered.
(The routine is deregistered by specifying NULL.)
IN
Return value Description
0 (0000H) Normal
Other than 0 (0000H) Error
For details on the error, refer to the following chapter.
Page 108 ERROR CODE LIST

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals