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

Controller module
Table of Contents

Advertisement

CCPU_WriteDevice_ISR
This function writes data to internal user devices and internal system devices of C Controller module.
Format
short CCPU_WriteDevice_ISR (short sDevType, unsigned long ulDevNo, unsigned long ulSize, unsigned short* pusDataBuf)
Argument
Argument
Name
sDevType
Device type
ulDevNo
Start device number
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 a
device after the one specified to the device type (sDevType) and the start device number (ulDevNo).
• Do not execute this function in a routine other than an interrupt routine.
• When data is written to the same device 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
device.
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 device which is out of the range is not specified.
Return value
Return value
Description
0 (0000H)
Normal
Relevant functions
• Page 173 CCPU_ReadDevice_ISR
Description
Specify the device type.
Page 13 Argument specification
Specify the start device number.
(Only multiples of 16 can be specified for bit devices.)
Specify the write data size in word units.
Specify the storage destination of write data.
3 DETAILS OF FUNCTION
3.2 C Controller module dedicated functions for ISR
3
IN/OUT
IN
IN
IN
IN
183

Advertisement

Table of Contents
loading

Table of Contents