Mitsubishi Electric MELSEC iQ-R C Series Programming Manual page 96

Controller module
Table of Contents

Advertisement

CCPU_FromBuf
This function reads data from the CPU buffer memory of the CPU module and the buffer memory of the intelligent function
module which are mounted on the specified module position. (FROM instruction)
Format
short CCPU_FromBuf (unsigned short usIoNo, unsigned long ulOffset, unsigned long ulSize, unsigned short* pusDataBuf,
unsigned long ulBufSize)
Argument
Argument
Name
usIoNo
Module position
ulOffset
Offset
ulSize
Data size
pusDataBuf
Data storage destination
ulBufSize
Data storage destination size
Description
• This function reads data for the size specified to the data size (ulSize) from the CPU buffer memory of a CPU module and
the buffer memory of an intelligent function module which are specified to the module position (usIoNo), and stores it in the
data storage destination (pusDataBuf).
Data is read by specifying an offset address from the start of the CPU buffer memory of a CPU module and the buffer
memory of an intelligent function module to the offset (ulOffset).
• To access the CPU buffer memory of the module in a multiple CPU system (CPU No.1 to No.4), specify 3E0H to 3E3H
(CPU No.1 to No.4) to the module position (usIoNo). However, the CPU buffer memory can be accessed only when the
multiple CPU setting is configured.
Precautions
Note that the size of data storage destination (ulBufSize) should be equal to or bigger than the data size (ulSize).
Return value
Return value
0 (0000H)
Other than 0
Relevant function
• Page 142 CCPU_ToBuf
3 DETAILS OF FUNCTION
94
3.1 C Controller Module Dedicated Functions
Description
Specify the module position.
Start I/O number divided by 16 (0H to FFH, 3E0H to 3E3H)
Specify the offset in word units.
Specify the read data size in word units.
Specify the storage destination of read data.
Specify the data storage destination size in word units.
Description
Normal
Error
For details on the error, refer to the following:
Page 225 ERROR CODE LIST
IN/OUT
IN
IN
IN
OUT
IN

Advertisement

Table of Contents
loading

Table of Contents