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

Controller module
Table of Contents

Advertisement

CCPU_ReadLinkDevice
This function reads data from the own station link devices of 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_ReadLinkDevice (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 reads data of subsequent devices after the device, which is specified in the device type (sDevType) and the start
device number (ulDevNo), from 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 reads the device data for the size specified in the
data size (ulSize) and stores it in the data storage destination (pusDataBuf).
Precautions
• Note that the size of data storage destination (ulBufSize) should be equal to or bigger than the data size (ulSize).
• 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 function
• Page 153 CCPU_WriteLinkDevice
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 read data size in word units.
Specify the storage destination of read data.
Specify the data storage destination size in word units.
3 DETAILS OF FUNCTION
3.1 C Controller Module Dedicated Functions
3
IN/OUT
IN
IN
IN
IN
OUT
IN
121

Advertisement

Table of Contents
loading

Table of Contents