Mitsubishi Electric MELSEC iQ-R Series Manual page 31

Intelligent function module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

CITL_EntryWDTInt
This function registers a routine to be called when a user WDT error interrupt occurs.
■ Format
short CITL_EntryWDTInt (short sType, CITL_FUNCPTR pFuncPtr)
■ Argument
Argument
Name
sType
WDT type
pFuncPtr
Registered routine
The data type of the registered routine (pFuncPtr) is defined as void type in the header file (CITLFunc.h).
■ Description
• This function registers a routine to be called when a user WDT error interrupt of a C intelligent function module occurs.
• Specify the routine to be registered to the registered routine (pFuncPtr).
• When CITL_EntryWDTInt function is executed several times, the last registered routine will be in effect.
• The routine registered with CITL_EntryWDTInt function is executed as an interrupt service routine (ISR) when a user WDT
error occurs. (If the CITL_ResetWDT function is not executed within the time interval specified in the CITL_StartWDT
function, the WDT error interrupt will occur.)
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.)
WARNING
When a routine that does not observe the considerations on interrupt service routine (ISR) is registered, the operating system
may be runaway.
Make sure to use the routine after carefully verifying the operation and performance.
■ Return value
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
■ Relevant function
Page 46 CITL_ResetWDT
Page 53 CITL_StartWDT
Page 55 CITL_StopWDT
Description
Specify the WDT type.
(When 'Reserved' is specified, an error is returned.)
• 0: User WDT
• Others: Reserved
Specify the routine to be registered.
(The routine is deregistered by specifying NULL.)
3.1 C Intelligent Function Module Dedicated Functions
IN/OUT
IN
IN
3 DETAILS OF FUNCTION
3
29

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-r c

Table of Contents