26
3 DETAILS OF FUNCTION
3.1 C Intelligent Function Module Dedicated Functions
CITL_EntryDedicatedInstFunc
This function registers a routine to be executed with the dedicated instruction (G(P).CEXECUTE).
■ Format
short CITL_EntryDedicatedInstFunc (CITL_CEXECUTEFUNCPTR pCEXECUTEFuncPtr)
■ Argument
The data type of registered routine (pCEXECUTEFuncPtr) is defined by the header file (CITLFunc.h) as follows:
• void (*CITL_CEXECUTEFUNCPTR) (unsigned short* pusReqData, unsigned short* pusReqSize, unsigned short*
pusAnsData, unsigned short* pusAnsSize)
■ Description
• This function registers a routine to be executed in a C intelligent function module when executing the dedicated instruction
(G(P).CEXECUTE).
• The registered routine is operated on a task with the following settings.
Task priority: 100
Stack size: 40000 byte
Task option: VX_FP_TASK
• When NULL is specified to the registered routine (pCEXECUTEFuncPtr), the routine is deregistered.
• When CITL_EntryDedicatedInstFunc function is executed several times, the last registered routine will be in effect.
■ Return value
Argument Name Description IN/OUT
pCEXECUTEFuncPtr Registered routine Specify the routine to be registered.
(The routine is deregistered by specifying NULL.)
IN
Argument Name Description IN/OUT
pusReqData Request data Receives the requested data specified by the dedicated instruction. IN
pusReqSize Request data size Receives the size of the requested data specified by the dedicated
instruction.
IN
pusAnsData Response data Returns the response data to the dedicated instruction. OUT
pusAnsSize Response data size Returns the size of the response data to the dedicated instruction. OUT
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