Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 1791

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

Advertisement

Processing details
• The request data stored in the device specified by (s2) and later is handed over to the C intelligent function module
specified by (U), and the response data is stored in the device specified by (d1) and later. However, if the received
response data is larger than the allowed number of response data specified in (s1), only the allowed number of response
data will be stored and the remaining will be discarded.However, if the received response data is larger than the allowed
number of response data specified in (s1), only the allowed number of response data will be stored and the remaining will
be discarded. (Dedicated instruction will be completed successfully.) In this case, the response data length (d1) will be the
number of data actually stored.
CPU module
...
b15
b0
(s2)+0
Request data length
(s2)+1
Request data
(d1)+0
Response data length
(d1)+1
Response data
The user program runs in the following tasks settings.
• Task priority: 100
• Stack size: 40000 bytes
• Task option: VX_FP_TASK
• The completion status of the G(P).CEXECUTE instruction can be checked with the completion device (d2) and the
completion status indication device (d2)+1.
• Completion device (d2)
This device turns on during END processing of the scan where the G(P).CEXECUTE instruction completes, and turns off during the next END processing.
• Completion status indication device (d2)+1
When completed successfully: The device remains off.
When completed with an error: The device turns on during END processing of the scan where the G(P).CEXECUTE instruction completes, and turns off during
the next END processing.
• The following figure shows how the G(P).CEXECUTE instruction operates during execution.
0
END
Sequence scan
Execution of
the instruction
G(P).CEXECUTE instruction
Completion device (d2)
OFF
Completion status
OFF
indication device (d2)+1
C intelligent function module
Registering user function
(CITL_EntryDedicatedInstFunc)
Executing user function
(G(P).CEXECUTE)
Completion status
0
END
0
END
Completion of
the instruction
void USERFunc(
*ReqData,
/* Request data */
*ReqSize,
/* Request data length */
*AnsData,
/* Response data*/
/* Response data length */
*AnsSize
)
{
xxxxx
xxxxx
xxxxx
xxxxx
return;
}
0
END
0
END
ON
OFF
Completed
ON
with an error
OFF
Completed
successfully
1 scan
24 C INTELLIGENT FUNCTION MODULE INSTRUCTIONS
24.1 User Function Execution Instruction
24
1789

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents