Mitsubishi Electric MELSEC iQ-R C Programming Manual page 135

Melsec iq-r series programmable controller
Hide thumbs Also See for MELSEC iQ-R C:
Table of Contents

Advertisement

CCPU_ReadDevice_ISR
This function reads data from internal user devices and internal system devices of C Controller module.
■Format
short CCPU_ReadDevice_ISR (short sDevType, unsigned long ulDevNo, unsigned long ulSize, unsigned short* pusDataBuf)
■Argument
Argument
Name
sDevType
Device type
ulDevNo
Start device number
ulSize
Data size
pusDataBuf
Data storage destination
■Description
This function reads data in a device after one specified to the device type (sDevType) and the start device number (ulDevNo)
for the size specified to the data size (ulSize), and stores it in the data storage destination (pusDataBuf).
Do not execute this function in a routine other than an interrupt routine.
WARNING
• If any function in which an invalid argument is specified is executed, an error such as hardware failure (3C02H) may occur
on C Controller module.
• This function does not check the specified argument.
When creating a program, note the following:
A data area for the size (words) of the read data is reserved.
A device which is out of the range is not specified.
■Return value
Return value
Description
0 (0000H)
Normal
■Relevant function
• Page 142 CCPU_WriteDevice_ISR
Description
Specify the device type.
Page 9 Argument specification
Specify the start device number.
(Only multiples of 16 can be specified for bit devices.)
Specify the read data size in word units.
Specify the storage destination of read data.
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
IN/OUT
3
IN
IN
IN
OUT
133

Advertisement

Table of Contents
loading

Table of Contents