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

Controller module
Table of Contents

Advertisement

CCPU_WriteLinkDevice
This function writes data to the own station link devices of the following modules: CC-Link IE Controller Network module, CC-
Link IE Field Network module, Ethernet module (when CC-Link IE Field Network is selected), MELSECNET/H network
module, and CC-Link IE TSN module which are controlled by a C Controller module.
Format
short CCPU_WriteLinkDevice (unsigned short usIoNo, short sDevType, unsigned long ulDevNo, unsigned long ulSize,
unsigned short* pusDataBuf, unsigned long ulBufSize)
Argument
Argument
Name
usIoNo
Module position
sDevType
Device type
ulDevNo
Start device number
ulSize
Data size
pusDataBuf
Data storage destination
ulBufSize
Data storage destination size
Description
• This function writes data to subsequent devices after the device, which is specified in the device type (sDevType) and the
start device number (ulDevNo) of the following modules specified in the module position (usIoNo): a CC-Link IE Controller
Network module, CC-Link IE Field Network module, Ethernet module (when CC-Link IE Field Network is selected),
MELSECNET/H network module, and CC-Link IE TSN module. The function writes data in the data storage destination
(pusDataBuf) for the size specified in the data size (ulSize).
Precautions
• To access a motion module using CC-Link IE TSN, specify link devices (SB and SW). Specifying link devices other than SB
and SW will cause an error.
• To access link devices of a network module controlled by another CPU, access to another CPU via bus interface using the
MELSEC data link function.
Return value
Return value
Description
0 (0000H)
Normal
Other than 0
Error
For details on the error, refer to the following:
Page 225 ERROR CODE LIST
Relevant functions
• Page 121 CCPU_ReadLinkDevice
Description
Specify the module position as follows.
Start I/O number divided by 16 (0H to FFH)
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.
Specify '0'.
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
IN
IN
IN
IN
IN
153

Advertisement

Table of Contents
loading

Table of Contents