Mitsubishi Electric MELSEC iQ-R C Programming Manual page 143

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

Advertisement

CCPU_ToBufHG_ISR
This function writes data to the fixed cycle communication area of the CPU module mounted on the specified module position.
■Format
short CCPU_ToBufHG_ISR (unsigned short usIoNo, unsigned long ulOffset, unsigned long ulSize, unsigned short*
pusDataBuf)
■Argument
Argument
Name
usIoNo
Module position
ulOffset
Offset
ulSize
Data size
pusDataBuf
Data storage destination
■Description
• This function writes data in the data storage destination (pusDataBuf) for the size specified to the data size (ulSize) to the
fixed cycle communication area of a CPU module specified to the module position (usIoNo). Data is written by specifying an
offset address from the start of the fixed cycle communication area.
• The fixed cycle communication area can be accessed only when the fixed cycle communication area setting under the
multiple CPU setting is configured.
• When executing this function while the operating status of a CPU module specified to the module position (usIoNo) is not
RUN, the STOP/PAUSE error (-28640) occurs.
• Do not execute this function in a routine other than an interrupt routine.
• When data is written to the same fixed cycle communication area 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 fixed cycle communication area.
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 fixed cycle communication area is not specified.
■Return value
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following chapter.
Page 174 ERROR CODE LIST
■Relevant functions
• Page 127 CCPU_FromBuf_ISR
• Page 140 CCPU_ToBuf_ISR
• Page 128 CCPU_FromBufHG_ISR
Description
Specify the module position as follows.
Start I/O number divided by 16 (3E0H to 3E3H)
Specify the offset in word units.
Specify the write data size in word units.
Specify the storage destination of write data.
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
IN
IN
IN
141

Advertisement

Table of Contents
loading

Table of Contents