140
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
CCPU_ToBuf_ISR
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_ISR (unsigned short usIoNo, unsigned long ulOffset, unsigned long ulSize, unsigned short* pusDataBuf)
■
Argument
■
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.
• Do not execute this function in a routine other than the one registered in the interrupt.
• When data is written to the same CPU buffer memory (host CPU) from a routine other than an interrupt
routine, the output value may be overlapped, resulting in an invalid value. Manage the resource so that data
is not written to the same CPU buffer memory (host CPU).
■
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:
An address specified to the write data is a multiple of 2.
A non-existent CPU buffer memory (host CPU) is not specified.
A non-existent buffer memory is not specified.
■
Return value
■
Relevant function
Argument
Name
Description
IN/OUT
usIoNo
Module position
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)
IN
ulOffset
Offset
Specify the offset in word units.
IN
ulSize
Data size
Specify the write data size in word units.
IN
pusDataBuf
Data storage destination
Specify the storage destination of write data.
IN
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Содержание MELSEC iQ-R C
Страница 1: ...MELSEC iQ R C Controller Module Programming Manual ...
Страница 2: ......
Страница 201: ...I 199 MEMO ...
Страница 203: ...I 201 MEMO ...
Страница 207: ......