Data Source: CC Link

The CC Link Data Source allows efficient batch reading and writing to and from Mitsubishi PLCs through a CC-Link IE Field Network board.

Prerequisites

The CC Link Data Source requires MDFUNC32.DLL and a CC-Link IE Field Network board installed on the PC that is running Sym3. Installing the MELSEC software that came with your CC Link interface board should install MDFUNC32.DLL system wide.

Create a new Data Source

A Data Source can be defined in Sym3, right click on Project Explorer > Data Sources then select ‘CC Link’ from the ‘New Source’ menu.

Note: Browsing is not supported for CC Link Data Sources.

Setting Up The Data Source

The property panel of the data source contains a few parameters that need to be set up for both reading and writing:

  • Channel Number: Identifies the CC Link interface board. One of 181, 182, 183, or 184.
  • Network Number: The network number to use when sending and receiving.
  • Station Number: The station number to use when sending and receiving.
  • Rate: How often (in milliseconds) this data source should send and receive. Please note that a tag’s individual update rate is ignored by the CC Link data source. See the section entitled “Multiple CC Link Data Sources” for more information on how multiple data sources behave with regards to this rate property.
  • Always use 32 bit MDFUNC DLL: Even in 64 bit versions of Sym3, use the 32 bit DLL. Defaults to false. See the section below for more details.

In addition there are two identical sections the set up the read and write buffer of this data source:

  • Device Type: The device type number that the buffer is reading or writing to. See the table below for details.
  • Device Number: The number to start reading or writing from. For a bit device this should be a multiple of 8: (0, 8, 16, etc).
  • Size: The number of bytes to read or write at a time. This should be an even number.

Always use 32 bit MDFUNC DLL

If one of the CC Link Data Sources has this option set, and Sym3 is running as a 64 bit app, this option will take effect. Sym3 will launch a 32 bit helper process that will make the calls to MDFUNC32.DLL instead of Sym3 doing it directly. This is slower, and should only be used if needed.

According to Mitsubishi, the 64 bit version of MDFUNC32.DLL can only communicate with QCPU or MELSEC iQ-R CPU modules; any other modules need to use a 32 bit user application. This option is here to enable that. Do not use it unless you are communicating with modules that require it.

Please note: If a project has multiple CC Link data sources, and only one has this option enabled, all data sources will use the helper process to communicate.

Devices

Name Size Device Type Notes
X Bit 1 Use this device for accessing RX of own station.
Y Bit 2 Use this device for accessing RY of own station.
L Bit 3
M Bit 4
SM Bit 5
F Bit 6
TT Bit 7
TC Bit 8
CT Bit 9
CC Bit 10
TN Word 11
CN Word 12
D Word 13
SD Word 14
TM Word 15
TS Word 16
TS2 Word 16002
TS3 Word 16003
CM Word 17
CS Word 18
CS2 Word 18002
CS3 Word 18003
A Word 19
Z Word 20
V Bit 21 Some Mitsubishi documentation and software lists this as a Word device. Sym3 treats it as a Bit device.
R Word 22
ER0,ER1,…ER256 Word 22000,22001,…22256
ZR Word 220
B Bit 23
W Word 24
Ww Word 36 Use this device for accessing the RWw of own station.
Wr Word 37 Use this device for accessing the RWr of own station.
QSB Bit 25 Writes to the ‘SB’ device.
STT Bit 26
STC Bit 27
QSW Word 28 Writes to the ‘SW’ device.
QV Bit 30
STN Word 35
LZ Double word 38
RD Word 39
LTT Bit 41
LTC Bit 42
LTN Double word 43
LCT Bit 44
LCC Bit 45
LCN Double word 46
LSTT Bit 47
LSTC Bit 48
LSTN Double word 49
LX1,LX2,…LX255 Bit 1001,1002,…1255
LY1,LY2,…LY255 Bit 2001,2002,…2255
LB1,LB2,…LB255 Bit 23001,23002,…23255
LW1,LW2,…LW255 Word 24001,24002,…24255
LSB1,LSB2,…LSB255 Bit 25001,25002,…25255
LSW1,LSW2,…LSW255 Word 28001,28002,…28255
SPG0,SPG1,…SPG255 Word 29000,29001,…29255
MAIL Word 101
MAILNC Word 102
SPB Word 50
MRB Word 33

Specifying Tag Addresses

Addresses are similar to the Mitsubishi format – “X0”, “YF”, and so on. There a few things to note:

  • Please note that the address number is always hexadecimal, regardless of the device being accessed. “DA” is a valid address for Sym3, and corresponds to “D10” in GX Works and other Mitsubishi software.
  • Whitespace can occur between the letter and number. “x 10” is the same as “X10”. This allows disambiguation for devices that end in numbers – “TS22” is the same as “TS2 2”, not “TS 22”.

The address must fall into the range mapped with the above settings. For example, “X10” would be an invalid address for an output tag if the Write Device Number was 32. “X20” would be the first valid device in that case.

Types

Three basic types of devices are supported: bit, word (two byte), and dword (four byte).

Check Mitsubishi’s documentation for details on which devices are supported on your PLC, and which can be read from and written to.

Write Behavior

Here are the rules Sym3 follows when writing from a tag to the CC Link data source:

Sym3 Type CC Link Type Remarks
Boolean Bit, Word, Double word True sets device to 1, false sets device to 0.
Char, Byte, Short, Long, Dword Bit Device is set to bit 0 (LSB) of the value.
Char, Byte, Short, Word Word, Double word The value is copied to the device. If the device’s data type is larger than the tag’s data type, the unused bits are filled with zero.
Long, Dword Word The upper two bits are discarded, and the value is copied to the device.
Long, Dword Double word The value is copied to the device.
Float, Double, String, Date Bit, Word, Double word Unsupported. An error is generated, nothing is written.

Read Behavior

Here are the rules Sym3 follows when reading to a tag from the CC Link data source:

CC Link Type Sym3 Type Remarks
Bit, Word, Double word Boolean If the device is 0, false is read. Otherwise, true is read.
Bit Char, Byte, Short, Word, Long, Dword If the device is 0, 0 is read. If the device is 1, 1 is read.
Word, Double word Char, Byte, Short, Word, Long, Dword The device is read. If the tag is smaller than the device, then the upper bits are discarded.
Bit, Word, Double word Float, Double, String, Date Unsupported. An error is generated, nothing is read.

Multiple CC Link data sources can be defined. If all data sources are set to a rate of 0 ms, then every data source in turn will send and receive data as fast as it can. This can be significantly faster than if they were set to 1 ms, as timing has an overhead.

However, if you have a data source with a rate of 0 ms, and one or more other data sources with a rate of 1 ms or more, those data sources with rates of 0ms will be treated as though they had a rate of 1 ms.

If there is one data source with a rate of 500ms, and another data source with a rate of 1000ms, then the first data source will send and receive approximately twice for every time the second data source updates.

Logs

The logs for the CC Link data source can be found in the “Sym3.CCLink.log” file in the log directory (Integrator), or the “Server\CCLink\Sym3.CCLink.log” file in the log directory (Operator).

Accessing Own Station

To access the ‘own station’ of a CC-Link IE Field Network board (to read and write from RX/RY on the CC-Link card, for example), set the Network Number to 0, and the Station Number to 255. For more details, refer to Mitsubishi’s documentation.