Mitsubishi Electric MELSEC iQ-R C Programming Manual page 110

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

Advertisement

CCPU_ToBuf
This function writes data to the CPU buffer memory of the CPU module (host CPU) and the buffer memory of the intelligent
function module which are mounted on the specified module position. (TO instruction)
■Format
short CCPU_ToBuf (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 writes data in the data storage destination (pusDataBuf) for the size specified to the data size (ulSize) to the
CPU buffer memory of a CPU module (host CPU) and the buffer memory of an intelligent function module which are
specified to the module position (usIoNo).
Data is written by specifying an offset address from the start of the CPU buffer memory of a CPU module (host CPU) and
the buffer memory of an intelligent function module.
• To access the CPU buffer memory (host CPU) of the module in a multiple CPU system (CPU No.1 to No.4), specify 3E0H
(CPU No.1) to 3E3H (CPU No.4) to the module position (usIoNo). However, the CPU buffer memory (host CPU) can be
accessed only when the multiple CPU setting is configured.
• When executing this function while the operating status of a CPU module is not RUN, the STOP/PAUSE error (-28640)
occurs.
■Return value
Return value
0 (0000H)
Other than 0
■Relevant function
• Page 67 CCPU_FromBuf
3 DETAILS OF FUNCTION
108
3.1 C Controller Module Dedicated Functions
Description
Specify the module position as follows.
For the CPU buffer memory, only the host CPU can be accessed.
Start I/O number divided by 16 (0H to FFH, 3E0H to 3E3H)
Specify the offset in word units.
Specify the write data size in word units.
Specify the storage destination of write data.
Specify '0'.
Description
Normal
Error
For details on the error, refer to the following chapter.
Page 174 ERROR CODE LIST
IN/OUT
IN
IN
IN
IN
IN

Advertisement

Table of Contents
loading

Table of Contents