3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
133
3
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
■
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
■
Relevant function
• Page 142 CCPU_WriteDevice_ISR
Argument
Name
Description
IN/OUT
sDevType
Device type
Specify the device type.
IN
ulDevNo
Start device number
Specify the start device number.
(Only multiples of 16 can be specified for bit devices.)
IN
ulSize
Data size
Specify the read data size in word units.
IN
pusDataBuf
Data storage destination
Specify the storage destination of read data.
OUT
Return value
Description
0 (0000H)
Normal
Summary of Contents for MELSEC iQ-R C
Page 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Page 2: ......
Page 201: ...I 199 MEMO ...
Page 203: ...I 201 MEMO ...
Page 207: ......