0% found this document useful (0 votes)
28 views140 pages

SH 082520 Enga

The document is a training manual for the C Controller Basic Course, emphasizing safety precautions and proper handling during exercises. It includes detailed chapters on system configuration, operation of the demonstration machine, and intelligent function modules, along with relevant warnings and cautions. The manual also outlines the structure of exercises and device access for effective learning and application.

Uploaded by

vifego9514
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views140 pages

SH 082520 Enga

The document is a training manual for the C Controller Basic Course, emphasizing safety precautions and proper handling during exercises. It includes detailed chapters on system configuration, operation of the demonstration machine, and intelligent function modules, along with relevant warnings and cautions. The manual also outlines the structure of exercises and device access for effective learning and application.

Uploaded by

vifego9514
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 140

Programmable Controllers

Training Manual
C Controller Basic Course
SAFETY PRECAUTIONS
(Read these precautions before exercise.)
When designing the system, always read the relevant manuals and give sufficient consideration to safety.
During the exercise, pay full attention to the following points and handle the product correctly.

[EXERCISE PRECAUTIONS]
WARNING
● Do not touch the terminals while the power is on to prevent electric shock.
● Before opening the safety cover, turn off the power or ensure the safety.

CAUTION
● Follow the instructor's direction during the exercise.
● Do not remove the module of the demonstration machine or change wirings without permission.
Doing so may cause failures, malfunctions, personal injuries and/or a fire.
● Turn off the power before mounting or removing the module.
Failure to do so may result in malfunctions of the module or electric shock.
● When the demonstration machine emits abnormal odor/sound, press the "Power switch" or
"Emergency switch" to turn off.
● When a problem occurs, notify the instructor as soon as possible.

1
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
March 2022 SH(NA)-082520ENG-A First edition

This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot
be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.

 2022 MITSUBISHI ELECTRIC CORPORATION

2
TRADEMARKS
Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or
other countries.
Unicode is either a registered trademark or a trademark of Unicode, Inc. in the United States and other countries.
The company names, system names and product names mentioned in this manual are either registered trademarks or
trademarks of their respective companies.
In some cases, trademark symbols such as '' or '' are not specified in this manual.

3
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6

CHAPTER 1 OVERVIEW 8
1.1 Features of the C Controller Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 C Controller System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Overall System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Peripheral configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Applicable Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
SD Memory Card. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 External I/O Signals and I/O Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

CHAPTER 2 STARTING UP THE DEMONSTRATION MACHINE 15


2.1 Demonstration Machine System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Wiring the Demonstration Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3 Procedures Before Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Executing initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Executing hardware diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4 TCP/IP setting on the personal computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

CHAPTER 3 OPERATING CW CONFIGURATOR 31


3.1 Main functions of CW Configurator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 CW Configurator Screen Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Main frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Navigation window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Connection Destination window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Element Selection window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3 Parameter Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Starting up CW Configurator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Parameter setting procedure with CW Configurator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Specifying the connection destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Writing parameters to the C Controller module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

CHAPTER 4 DEVICE ACCESS 47


4.1 Device List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.2 C Controller module dedicated functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.3 Exercise 1 Device Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Creating a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Exercise 1.1 Switch input and lamp output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Exercise 1.2 Input device and display device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Exercise 1.3 Executing two programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

4
CHAPTER 5 OPERATING INTELLIGENT FUNCTION MODULES 91
5.1 Intelligent Function Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.2 Exchange of Information between Intelligent Function Modules and the C Controller Module . . . . . . . . 92
I/O signals for the C Controller module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Data communication with an intelligent function module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.3 Methods of Communication with Intelligent Function Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Types of methods of communication with intelligent function modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
5.4 Exercise Structure for Intelligent Function Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
5.5 Analog-Digital Converter Module R60AD4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

CONTENTS
Part names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
A/D conversion characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
List of I/O signals and buffer memory area assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Setting intelligent function module data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
5.6 Digital-Analog Converter Module R60DA4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Part names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
D/A conversion characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
List of I/O signals and buffer memory area assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Setting intelligent function module data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.7 Exercise 2 A/D conversion, D/A conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Exercise 2.1 Checking the operation of the analog-digital converter module and digital-analog converter module
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Exercise 2.2 Loading an A/D conversion output value into the HMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Exercise 2.3 Outputting a value in the HMI through D/A conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

APPENDICES 131
Appendix 1 Security Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Individual identification information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
File access restriction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Setting a service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Lockout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Appendix 2 Modules for Realizing Higher-Speed Analog I/O Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
High-speed analog input module R60ADH4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
High-speed analog output module R60DAH4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Appendix 3 CW Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Creating a new user program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

5
INTRODUCTION
To help users acquire the knowledge required for configuring a data collection system using the MES interface module, this
manual describes the functions and specifications of hardware and software used to configure a system, explains the
databases, and provides troubleshooting information.

RELEVANT MANUALS
Manual name [manual number] Description Available
form
MELSEC iQ-R C Controller Module User's Manual (Startup) Performance specifications, procedures before operation, and troubleshooting e-Manual
[SH-081366] of the C Controller module PDF
MELSEC iQ-R C Controller Module User's Manual Functions, devices, and parameters of the C Controller module e-Manual
(Application) PDF
[SH-081368]
MELSEC iQ-R C Controller Module Programming Manual Programming specifications and dedicated function library of the C Controller e-Manual
[SH-081370] module PDF
MELSEC iQ-R C Controller/C Intelligent Function Module Programming specifications and dedicated function library relating to data e-Manual
Programming Manual (Data Analysis) analysis of the C Controller module/C Intelligent Function Module PDF
[SH-081755]
CW Workbench/CW-Sim Operating Manual System configuration, specifications, functions, and troubleshooting of CW e-Manual
[SH-081372] Workbench/CW-Sim PDF
CW Configurator Operating Manual System configuration, parameter settings, and online operations of CW e-Manual
[SH-081381] Configurator PDF

e-Manual refers to the Mitsubishi Electric FA electronic book manuals that can be browsed using a dedicated
tool.
e-Manual has the following features:
• Required information can be cross-searched in multiple manuals.
• Other manuals can be accessed from the links in the manual.
• The hardware specifications of each part can be found from the product figures.
• Pages that users often browse can be bookmarked.

6
MEMO

7
1 OVERVIEW
The C Controller module is a CPU module developed based on the multi-core ARM and capable of executing multiple
programs simultaneously. Featuring both robustness and timing accuracy, the C Controller module can serve as an alternative
platform to personal computers or MCUs. Moreover, the fanless design adopted by the C Controller module, which prevents
the spread of dust, is most suitable for use in a clean environment such as a microchip factory. Taking advantage of the
excellent features of the MELSEC iQ-R series, such as high performance, flexibility, and robustness, the C Controller module
realizes automation systems for a variety of industrial uses.

1.1 Features of the C Controller Module

Easy access to programmable controller devices with dedicated functions


Applications for handling programmable controllers, such as access to the C Controller module, I/O module, intelligent
function module, network module, programmable controller CPU, and Motion CPU, can be created by using dedicated
functions.
There are four types of dedicated functions: the CCPU/CITL functions, QBF functions, ISR (Interrupt Service Routine) QBF
functions, and MD functions.

High-speed calculation realized by using function libraries


Processing that is difficult to achieve with a ladder program, such as FFT operations and digital filter operations used for
vibration analysis and other processes, can be used as a function library.
Using this data analysis library, data analysis and judgment processing can be realized easily.
In addition, calculation can be performed at speeds higher than when the programmable controller CPU is used.

Easy connection with peripherals


Compatible with SLMP (MC protocol), which is a predefined protocol for programmable controllers, the C Controller module
can read from/write to devices via the Ethernet ports.
Regardless of the communication destination device, data communications can be performed by the same communication
method from an external device. In addition, the R12CCPU-V is compatible with CC-Link IE Field Network Basic as well.
CC-Link IE Field Network Basic is a network that can realize cyclic transmission by just implementing software, which allows
various peripherals to be connected easily.

Checking made easy with LED indications


Without a personal computer, debugging, machine operating status check, and primary diagnostics when an error occurs can
be performed easily by checking LED indications.
The dot matrix LED can display letters and symbols as well.

Easy maintenance without the need for battery replacement


Battery replacement is not required because MRAM (magnetoresistive random access memory) is adopted. Time and efforts
associated with battery replacement can be saved, such as the recording of replacement dates, maintenance plan
management, and the checking of ERR LED notifying a battery voltage drop.

Unauthorized access prevention by limiting access and setting account lockout


The C Controller Setting and Monitor Tool, FTP, login user for connection using telnet, and account lockout can be configured.
In addition, by setting access rights (read/write/execute) to each login user, a role such as the administrator and field operator
can be set on a login user basis to prevent unauthorized access.

1 OVERVIEW
8 1.1 Features of the C Controller Module
Security improved by stopping connection services
The states of services operating in the C Controller module can be set.
1
Whether to enable/disable services can be set with the C Controller Setting and Monitor Tool parameter setting to improve
security.

Polling processing for waiting for processing completion not required


Event driven programming, which is common for MCUs/personal computers, is available.
CPU load reduction and high-speed response processing are realized because there is no need to wait for a processing
completion signal from a module.

Load distribution realized by executing two tasks simultaneously


Two tasks can be executed simultaneously because a dual-core CPU is installed.
Since an interrupt service routine and a task can be executed simultaneously as well, CPU load distribution can be realized.

1 OVERVIEW
1.1 Features of the C Controller Module 9
1.2 C Controller System Configuration
Select the C Controller module and modules with various functions according to the application, and mount them on the base
unit, which operates as a backplane, to flexibly build a system.
For a C Controller system, a system can be flexibly and easily built, just by selecting necessary modules according to the
application and mounting them on a base unit.

Overall System Configuration


The following shows the overall C Controller system configuration.

(1) (2)

(3)

(5)

(4)

(6)

(1) C Controller module


(2) Programmable controller CPU, process CPU, Motion CPU, and C Controller module
(3) Main base unit
(4) Power supply module, I/O module, and intelligent function module
(5) Extension base unit and RQ extension base unit

1 OVERVIEW
10 1.2 C Controller System Configuration
Peripheral configuration
The following figure shows a configuration with peripherals. 1
(1) (2) (3)

(4) (5)

(6)

(8)

(7)

(9)

(1) Maintenance personal computer (Telnet function and FTP function)


(2) User program development environment (CW Workbench and CW-Sim)
(3) SNTP server
(4) USB Mass Storage Class compatible device
(5) SD memory card
(6) Connection via built-in Ethernet (HMI (Human Machine Interface) (GOT), SLMP-compatible device)
(7) CW Configurator
(8) Networks via network module (CC-Link IE Controller Network, CC-Link IE Field Network, MELSECNET/H Network, and CC-Link)
(9) Connection via built-in Ethernet (CC-Link IE Field Network Basic compatible device)

1 OVERVIEW
1.2 C Controller System Configuration 11
• USB devices can be used for a firmware version of the C Controller module "03" or later.
• To install and connect a peripheral to the C Controller module, comply with the specifications of both the C
Controller module and the peripheral.
• For details on access via each network module and access using Ethernet communication, refer to the
following.
 MELSEC iQ-R C Controller Module User's Manual (Application)

Applicable Software
The following table lists software that can be used for the MELSEC iQ-R C Controller module system. (Manual for each
software used)
Software package Version
CW Configurator SW1DND-RCCPU-J Version 1.00A or later
SW1DND-RCCPU-E
CW Workbench SW1DND-CWWR-E/EZ/EVZ Version 1.00A or later
CW-Sim SW1DND-CWWSIMR-EZ Version 1.00A or later
CW-Sim Standalone SW1DND-CWWSIMSAR-E Version 1.00A or later
Wind River Workbench  Version 3.3
GX Works3 SW1DND-GXW3-J Version 1.007H or later
SW1DND-GXW3-E
GT Designer3 SW1DNC-GTWK3-J Version 1.126G or later
SW1DNC-GTWK3-E
MT Works2 SW1DNC-MTW2-J Version 1.110Q or later
SW1DNC-MTW2-E

SD Memory Card
One SD memory card can be inserted in the C Controller module.

SD memory cards that can be used


The following table lists the SD memory cards manufactured by Mitsubishi Electric that can be used.
Model Description
NZ1MEM-2GBSD SD memory card 2GB
NZ1MEM-4GBSD SD memory card 4GB
NZ1MEM-8GBSD SD memory card 8GB
NZ1MEM-16GBSD SD memory card 16GB

For commercially available SD memory cards, refer to the Mitsubishi Electric FA global website. Before using a commercially
available SD memory card, check that the card does not affect the control of the target system.
TECHNICAL BULLETIN No.FA-A-0023

Precautions
• Execute formatting for the SD memory card using the formatting function of CW Configurator.
• If an SD memory card other than those listed above is used, a problem, such as damage to data in the SD memory card
and system operation stop, may occur.
• Data in the SD memory card may corrupt if any of the following operations is performed while the SD memory card is being
accessed: powering off the system, resetting the C Controller module, or removing the SD memory card. Always power off
or reset the C Controller module, or remove the SD memory card after access to the SD memory card stops.

1 OVERVIEW
12 1.2 C Controller System Configuration
1.3 External I/O Signals and I/O Numbers
1
Understand the rules for giving I/O numbers for the iQ-R series.

Wiring of I/O devices


Signals from an external input device are handled in a program by being replaced with input numbers determined by the
mounting position of the connected input module and terminal numbers. In addition, output numbers determined by the
mounting position of the output module to which the external output device is connected and terminal numbers are used for
outputs of a program's calculation results (coils).
0 1 2 3 4 Slot number

(Power
(CPU)
supply)
(RY)
Base unit
(RX)
Input number Output number

Y10
PB1 SV1
X0
CS1 Y11
X1 SV2
CS2
X2 I/O numbers are hexadecimal and start from 0.
Y12
SV3 The number for each input and output is common,
PB2
X3 and the inputs have "X" and the outputs have "Y"
PB3 Y13 RD before their numbers.
X4 The maximum number of the I/O numbers for a CPU
LS1 module is 4096 points.
X5 Y14 GN I/O numbers can be freely assigned beyond a boundary
LS2 between the MELSEC iQ-R series and the
X6 MELSEC-Q series, being free from the restriction of
Y15 MC1 assignment orders.
LS3
X7
LS4 Y16 MC2
X8
PB4
X9
Y17 MC3
PB5
XA
CS3 COM1
XB

XC
Y18
XD
Y1F
XE

XF COM2

COM

Output module
Input module

1 OVERVIEW
1.3 External I/O Signals and I/O Numbers 13
I/O numbers of the main base unit
The I/O numbers of the I/O module mounted on the main base unit are assigned as follows. The concept is the same for the I/
O module and the intelligent function module.
Main base (R35B, R38B, R312B)

0 1 2 3 4 5 6 7 8 9 10 11 Slot number
Power supply module

C 00 10 20 30 40 50 60 70 80 90 A0 B0 I/O number

P to to to to to to to to to to to to

U 0F 1F 2F 3F 4F 5F 6F 7F 8F 9F AF BF

For 5-slot base (R35B)

For 8-slot base (R38B)

For 12-slot base (R312B)

• I/O numbers for one slot (1 module) are assigned in units of 16 points (0 to FH), starting from the lowest number.
In other words, basically a 16 point module is mounted on every slot.
For example, the following figure shows I/O numbers when a 32 point module is mounted on slot 5.

Main base unit

0 1 2 3 4 5 6 7 Slot number
When a module is
Power supply module

C 00 10 20 30 40 50 70 80
replaced with a 32 to
point module, the 5F
numbers for the next P to to to to to to to
module are changed. 60
to
(The numbers are U 0F 1F 2F 3F 4F 6F 7F 8F
advanced.)

• I/O numbers are assigned to an empty slot (where an I/O module is not mounted) as well.
For example, the following figure shows I/O numbers when slot 3 is empty. (Initial setting)
The number of points to be assigned can be changed by the setting.
Main base unit

0 1 2 3 4 5 6 7 Slot number
Power supply module

Empty (

C 00 10 20 40 50 60 70

P to to to 30 to to to to
to
U 0F 1F 2F 3F 4F 5F 6F 7F
)

1 OVERVIEW
14 1.3 External I/O Signals and I/O Numbers
2 STARTING UP THE DEMONSTRATION
MACHINE
2.1 Demonstration Machine System Configuration 2
The following describes the system configuration of the demonstration machine.
(1)

Ethernet CH2 Ethernet CH1


(192.168.4.4) (192.168.3.3)

Ethernet
(192.168.3.100)

(2) (3)

Device/software Product model/description


(1) PLC system Main base unit R35B
Power supply module R61P
C Controller module R12CCPU-V
A/D converter module R60AD4
D/A converter module R60DA4
(2) GOT2000 GT2708-STBA
(3) Personal computer Personal computer running Windows
Engineering tool CW Configurator SW1DND-RCCPU-J
CW Workbench SW1DND-CWWR-E

2 STARTING UP THE DEMONSTRATION MACHINE


2.1 Demonstration Machine System Configuration 15
GOT screen display

Initial display device D0 Initial display device D1 Initial display device D10 (32 bits)

Initial input device D20 Initial input device D21 Initial input device D30 (32 bits)

Display 1 Display 2

Upper row: The display device is changeable

Lower row: Displays data

Upper row: The input device is changeable

Lower row: Sets/ displays input data

• Touch to switch screens.


• Touch the [Initialize input/display device] button to initialize the device number at top.

2 STARTING UP THE DEMONSTRATION MACHINE


16 2.1 Demonstration Machine System Configuration
2.2 Wiring the Demonstration Machine
This section describes the procedure for wiring the demonstration machine.

1. Connect the C Controller module (CH1) and the personal computer using an Ethernet cable.

CH1

C Controller module

Ethernet cable

Personal computer

2. Connect the C Controller module (CH2) and the GOT using an Ethernet cable.

CH2

C Controller module

Ethernet cable

GOT2000

2 STARTING UP THE DEMONSTRATION MACHINE


2.2 Wiring the Demonstration Machine 17
2.3 Procedures Before Operation
This section describes the procedure from startup of the C Controller module to program execution.
When operating the C Controller module for the first time, perform hardware diagnostics to check that the module has no
problem before starting up the system.

Executing hardware diagnostics


Operating procedure
1. Mounting the C Controller module
Mount the power supply module and C Controller module on the base unit. ( MELSEC iQ-R Module Configuration Manual)

2. Powering on the system


Check that the wiring of the power supply and the power supply voltage are correct, and turn the power on.

3. Initializing the C Controller module


Initialize the C Controller module. ( Page 19 Executing initialization)

4. Executing hardware diagnostics


Check the hardware status of the C Controller module. ( Page 22 Executing hardware diagnostics)

Starting up the C Controller system


Operating procedure
1. Inserting the SD memory card
Insert the SD memory card to the C Controller module as necessary. ( MELSEC iQ-R C Controller Module User's Manual
(Startup))

2. Mounting modules and connecting cables


Mount modules on the base unit and connect cables. ( MELSEC iQ-R Module Configuration Manual)

3. Powering on the system


Check the following items before powering on the system.
• The wiring of the power supply and the power supply voltage are correct.
• The C Controller module is in the STOP state.

4. Creating a project
On the personal computer with CW Configurator installed, create a project for the C Controller module to be used.
( Page 37 Parameter Settings)

5. Connecting the personal computer and the C Controller module


Connect the personal computer with CW Configurator installed and the C Controller module. ( Page 44 Specifying the
connection destination)

6. Setting parameters
Set system parameters, CPU parameters, and module parameters. ( Page 37 Parameter Settings)
Parameters other than the above need to be set to use the SD memory card function or to mount an intelligent function
module. ( User's Manual (Application) for the module used)

7. Writing to the C Controller module


Write the parameters set with CW Configurator to the C Controller module. ( Page 46 Writing parameters to the C
Controller module)

8. Resetting the C Controller system


Reset the system in either of the following ways.
• Power off and on the system.
• Reset the C Controller module (Page 21 Reset operation procedure).

2 STARTING UP THE DEMONSTRATION MACHINE


18 2.3 Procedures Before Operation
9. Checking for errors
Check the status of the READY LED and ERROR LED of the C Controller module. If an error has occurred, perform
troubleshooting. If an error has occurred in a module other than the C Controller module, refer to the manual for each module.

10. Creating a user program


Create a user program.
• Create a user program and perform debugging. ( Page 137 Creating a new user program) 2
• Create a script file. ( Page 82 Creating and storing a script file)
• Register the user program and script file into the C Controller module. ( Page 82 Creating and storing a script file)

11. Resetting the C Controller system


Reset the system in either of the following ways.
• Power off and on the system.
• Reset the C Controller module (Page 21 Reset operation procedure).

12. Executing the program


Run the C Controller module and check that the BUS RUN LED turns on.

Executing initialization
Initialize the C Controller module in any of the following cases.
• The system operates for the first time.
• The C Controller module does not start up by executing the script file registered in the program memory.
• The user name/password set to the C Controller module is forgotten.

When initialization is executed, the program memory, device/label memory, and data memory data are
deleted. Backup necessary data before initialization.

Initialization execution procedure


Before switch operation, check that the RESET/STOP/RUN switch is in the middle position.

Operating procedure
1. Hold the MODE/SELECT switch in the MODE position.

2. Power on the C Controller module. The BUS RUN LED


turns on and "M-00" is displayed on the dot matrix LED.

2. ON!

2 STARTING UP THE DEMONSTRATION MACHINE


2.3 Procedures Before Operation 19
3. Release the MODE/SELECT switch and put it back to
the center position.

4. Set the MODE/SELECT switch to the SELECT position.


Every time the switch is set to the SELECT position, the
value of mode displayed on the dot matrix LED is
changed. Repeat the action until "0011" is displayed.

5. Set the RESET/STOP/RUN switch to the RUN position


to execute the selected mode.

6. The BUS RUN LED flashes during initialization.

5. RUN!
6. Flashing!

7. Check that the BUS RUN LED turns on and "0000" is


displayed on the dot matrix LED, then reset the C
Controller module.

7. ON!

8. Initialization is executed after the module is reset.


During initialization, the READY LED turns on and the
BUS RUN LED and USER LED flash.

9. When initialization is completed successfully, the BUS


RUN LED and USER LED turn off and the READY LED
flashes.

10. Reset the C Controller module.


Page 21 Reset operation procedure
■Modes that can be selected
Mode Dot matrix LED indication Description
10 0010 Default IP setting
11 0011 Module initialization setting

2 STARTING UP THE DEMONSTRATION MACHINE


20 2.3 Procedures Before Operation
If initialization ends abnormally
If the initialization of the C Controller module ends abnormally, the ERROR LED flashes and the READY LED and USER LED
turn on. If the initialization ends abnormally, initialize the C Controller module again.

Do not reset the C Controller module while it is being initialized. 2


If the C Controller module is reset mistakenly, initialize it again.

Module state after initialization


When initialization is executed, the C Controller module is in the following state.

■Default IP setting
• The execution of the registered script file is stopped.*1
• The initial value is set for the IP address of the C Controller module.
*1 The script file is renamed as "STARTUP.BAK" and its registration is cleared.

■Module initialization setting


• The default parameters are set for the data memory.
• The program memory, device/label memory, and data memory data are formatted.
• The security password is initialized. (Default password: password)

Reset operation procedure


Operate the switch according to the following procedure to reset the C Controller module.
1. Hold the RESET/STOP/RUN switch (1) in the RESET
position.
(2)
2. Check that the ERROR LED (2) flashes several times
and all the LEDs turn off.

3. Set the RESET/STOP/RUN switch (1) back to the STOP


position.

(1)

Do not reset the C Controller module while it is being initialized.


If the C Controller module is reset mistakenly, initialize it again.

2 STARTING UP THE DEMONSTRATION MACHINE


2.3 Procedures Before Operation 21
Executing hardware diagnostics
Diagnose the hardware in the C Controller module.

Timing of hardware diagnostics


Use hardware diagnostics in the following cases.
• The system operates for the first time.
• Troubleshooting

During hardware diagnostics, do not power off or reset the C Controller module. Otherwise, the C Controller
module cannot start up correctly. In such a case, perform initialization.

Diagnostics types
The following table shows the modes of hardware diagnostics.
Mode Dot matrix LED Item Description
0 M-00 Mode 1 to 6 diagnostics tests Execute a diagnostics test for each mode in the order of mode
numbers, starting from 1 to 6.
1 M-01 Program memory and data memory Read data from the program memory and data memory, and
diagnostics test perform error detection.
Device/label memory diagnostics test Check the device/label memory by reading/writing/verifying test
data.
2 M-02 Ethernet diagnostics test Diagnose the condition of the Ethernet ports (CH1 and CH2).
3 M-03 SD memory card interface Diagnose the condition of the SD memory card slot.
diagnostics test
4 M-04 RS-232 diagnostics test Execute a self-loopback test for the RS-232 connector. Prepare
wiring for self-loop back operation.
5 M-05 USB diagnostics test Diagnose the condition of the USB connector.
6 M-06 Bus diagnostics test Check the internal bus memory and registers by reading/writing/
verifying test data.
7 M-07 Dot matrix LED test Test the display condition of the dot matrix LED.

2 STARTING UP THE DEMONSTRATION MACHINE


22 2.3 Procedures Before Operation
Executing diagnostics
This section describes the execution procedure for hardware diagnostics.

■Preparation
Execute the following before hardware diagnostics.

1. Mount the module. 2


Mount the power supply module and C Controller module on the base unit.

Hardware diagnostics can be executed even when the C Controller module is not mounted on the CPU slot.
To execute hardware diagnostics by mounting the C Controller module on a slot other than the CPU slot,
mount another CPU module on the CPU slot. An error may be detected in the mounted CPU module, but
hardware diagnostics can be executed.

2. Check the wiring.


• Check that the wiring for the power supply is correct.
• Use only cables for power supply wiring.

3. Make preparations required for each type of diagnostics.

4. Turn the power on.


• Check that the power supply voltage is within the range of the specifications.
• Check that the RESET/STOP/RUN switch is in the STOP position.

■Preparations required for each type of diagnostics


Execute the following before executing each mode (0 to 7) of hardware diagnostics.
Mode Description
0 Make all the preparations required for executing modes 1 to 6.
1 Back up the data of the program memory, data memory, and device/label memory.
2 Check that a cable is not connected to the Ethernet ports.
3 Check that an SD memory card is not inserted.
4 Connect a cable to the RS-232 connector.
The connector pin-outs and cable connections are as follows.

(1) (2) (3) (4)


1 CD(DCD)
2 RD(RXD)
1 3 SD(TXD)
6
2 4 ER(DTR)
7
3 5 SG
8 6 DR(DSR)
4
9 7 RS(RTS)
5
8 CS(CTS)
9 CI(RI)

(1) Connector
(2) Pin number
(3) Signal abbreviation
(4) Cable connection
5 Check that a cable is not connected to the USB connector.
6 Preparations for this mode are not required.

2 STARTING UP THE DEMONSTRATION MACHINE


2.3 Procedures Before Operation 23
■Selecting a mode
The following describes how to select a mode.

1. Set the RESET/STOP/RUN switch to the RESET position and hold it in that position until step 4. Check that all the LEDs
turn off.

2. Set the MODE/SELECT switch to the MODE position and hold it in that position until step 6.

3. Set the RESET/STOP/RUN switch back to the STOP position.

4. The BUS RUN LED turns on and "M-00" is displayed on the dot matrix LED.

5. Release the MODE/SELECT switch and put it back to the center position.

6. Set the MODE/SELECT switch to the SELECT position and select a diagnostics mode.
Every time the switch is set to the SELECT position, the displayed value of diagnostics mode is changed.
Repeat the action until the value of the target diagnostics mode is displayed on the dot matrix LED.

■Executing the mode


The following describes how to execute the selected mode.
●Executing modes 0 to 6

1. Set the RESET/STOP/RUN switch to the RUN position.


• While modes 0 to 1 are executed, the BUS RUN LED flashes, and the mode in progress and its progress ratio are
displayed in turn on the dot matrix LED.
Example: "M-01" (diagnostics mode)  displayed in turn  "0050" (progress rate: %)
• While modes 2 to 6 are executed, the BUS RUN LED flashes, and the mode in progress is displayed on the dot matrix LED.

2. Check that the BUS RUN LED turns on.


When the test is completed successfully, "0000" is displayed on the dot matrix LED.

3. Turn the power off.

When the RESET/STOP/RUN switch is in the RUN position before taking the procedure for mode execution,
set the switch back to the STOP position.

2 STARTING UP THE DEMONSTRATION MACHINE


24 2.3 Procedures Before Operation
●Executing mode 7

1. Set the RESET/STOP/RUN switch to the RUN position.

2. Set the MODE/SELECT switch to the SELECT position.


Every time the switch is set to the SELECT position, the status of the dot matrix LED is changed.

Step.1
2
Step.7

Step.2

Step.8

Step.3

Step.9

Step.4

Step.10

Step.5

Step.11

Step.6

Step.12

Step.7

Step.1

: On
: Off

3. Turn the power off.

2 STARTING UP THE DEMONSTRATION MACHINE


2.3 Procedures Before Operation 25
Visually check that all the dots on the dot matrix LED turn on.
If some dot does not turn on, the possible cause is a hardware failure of the C Controller module. Please
consult your local Mitsubishi Electric System & Service Co., Ltd. representative.

Operation upon error detection


This section describes the error content displayed when an error is detected.

■When "0000" is not displayed on the dot matrix LED


When an error is detected during diagnostics and setting operation, the ERROR LED flashes, and the value corresponding to
the type of diagnostics in which an error occurred is displayed on the dot matrix LED. If nothing is displayed on the dot matrix
LED and only the ERROR LED flashes, it is a system error.
Mode Dot matrix LED Type of diagnostics in which an error occurred
1 E010 Program memory and data memory diagnostics test
Device/label memory diagnostics test
E020
E030
E040
2 E050 Ethernet diagnostics test (CH1)
E060 Ethernet diagnostics test (CH2)
3 E070 SD memory card interface diagnostics test
4 E080 RS-232 diagnostics test*1
5 E090 USB diagnostics test
6 E0A0 Bus diagnostics test
E0B0
E0C0
E0D0
E0E0

*1 An error may occur if a cable for wiring is not connected correctly. Correctly connect the cable or do the wiring, and execute mode 4
diagnostics again.

If an abnormal end occurs, diagnostics or setting operation after that is not executed. Execute diagnostics and
setting operation again. If an error occurs again after an abnormal end, the possible cause is a hardware
failure of the C Controller module. Please consult your local Mitsubishi Electric System & Service Co., Ltd.
representative.

2 STARTING UP THE DEMONSTRATION MACHINE


26 2.3 Procedures Before Operation
2.4 TCP/IP setting on the personal computer
Configure the TCP/IP setting on the personal computer.
This manual describes the procedure using a personal computer running Microsoft Windows 7 Operating System.

Operating procedure 2
1. From the Start menu of Windows, click
[Windows System]  [Control Panel].

1. Click!

2. The Control Panel dialog box appears. Click


"Network and Internet".

2. Click!

2 STARTING UP THE DEMONSTRATION MACHINE


2.4 TCP/IP setting on the personal computer 27
3. Click "Network and Sharing Centre".

3. Click!

4. Click "Ethernet".

4. Click!

5. Click the [Properties] button.

5. Click!

2 STARTING UP THE DEMONSTRATION MACHINE


28 2.4 TCP/IP setting on the personal computer
6. Select "Internet Protocol Version 4 (TCP/
IPv4)".

7. Click the [Properties] button.


2

6. Click and select!

7. Click!

8. Select "Use the following IP address" and


configure the settings as follows.
[Setting details]
IP address: 192.168.3.100
Subnet mask: 255.255.255.0
8. Set!
9. Click the [OK] button.

9. Click!

2 STARTING UP THE DEMONSTRATION MACHINE


2.4 TCP/IP setting on the personal computer 29
10. Click the [OK] button.

10. Click!

11. Click the [Close] button.

11. Click!

2 STARTING UP THE DEMONSTRATION MACHINE


30 2.4 TCP/IP setting on the personal computer
3 OPERATING CW CONFIGURATOR
CW Configurator is a dedicated software package for setting and monitoring the parameters of the C Controller module.

3.1 Main functions of CW Configurator


CW Configurator manages module configuration data and parameters for each C Controller module on a project basis.
The main functions of CW Configurator are as follows. 3
Parameter setting function
This function allows parameters of C Controller modules, I/O modules, and intelligent function modules to be set.

Programmable controller read/write function


With the "Read from PLC"/"Write to PLC" functions, a set parameter can be read/written from/to the C Controller module.

Write

Read

3 OPERATING CW CONFIGURATOR
3.1 Main functions of CW Configurator 31
Module operation check function
With a personal computer connected to the C Controller module, device contents of the C Controller module and intelligent
function modules can be monitored to check their actions.

Diagnostic function
This function provides diagnostics for the current error status and error history of the module and network. The diagnostic
function helps to shorten the recovery time.
Detailed information of intelligent function modules can also be checked via system monitoring. This feature further shortens
the recovery time when an error occurs.

Module diagnostics (module diagnostics window)

Diagnose the
module status

3 OPERATING CW CONFIGURATOR
32 3.1 Main functions of CW Configurator
3.2 CW Configurator Screen Layout
This section describes the screen layout when starting CW Configurator.

Main frame
The following figure shows the entire main frame layout.
In this screen, a work window and each docking window are displayed.

Title bar
3
Menu bar

Toolbar

Work window

Main window for


performing such
operations as
parameter setting and
monitoring

Status bar

Navigation window Watch window etc. Element Selection window

Docked window

Name Description Reference


(1) Title bar Information such as the project name is displayed. 
(2) Menu bar Menu items for executing each function are displayed. 
(3) Toolbar Tool buttons for executing each function are displayed. 
(4) Work window The main window for such operations as parameter setting 
and monitoring
(5) Docking Navigation window The project contents are displayed in tree form. Page 35 Navigation window
window (Project view)
Watch window The current values of the registered devices are displayed. CW Configurator Operating
Manual
Element Selection window Elements for the Module Configuration window are displayed Page 36 Element Selection
in list form. window
(6) Status bar Information of the project being edited is displayed. 

3 OPERATING CW CONFIGURATOR
3.2 CW Configurator Screen Layout 33
Window operation
■Displaying docking windows
[View]  [Docking Window]  [(target item)]

■Switching docking windows and work windows


Press + to switch windows or files.
Select with +///.

■Arranging work windows


A list of currently opened windows can be displayed.
In addition, the specified window can be opened or arranged.
When multiple windows are opened, the target window can be displayed efficiently.

Window
[Window]  [Window]

■Switching between docking and floating for docking windows


• Docked display: Drag and drop the title bar of a floating docking window into the guidance in the main frame to dock that
window into the main frame.

Drag and drop

Fit the title bar into the guidance. The title bar is docked.

• Floating display: Drag the title bar of a docked window to any location to display that window separately from the main
frame.

■Switching between docking and floating for work windows


• Docked display: Select a floating work window, and select [Window]  [Docking].
• Floating: Select a docked work window, and select [Window]  [Floating].

For a window docked once, the docked display and the floating display can be switched by double-clicking its
title bar.

3 OPERATING CW CONFIGURATOR
34 3.2 CW Configurator Screen Layout
Customizing/resetting toolbars
Set the types of tool buttons to be displayed on each toolbar.
The selected items in the list are displayed as tool buttons.

Operating procedure
■Customizing
1. Click in the toolbar, and select [Show/Hide Buttons]  [(toolbar name)].

2. Select a tool button to be displayed from the list.


3
■Resetting
Click in the toolbar, and select [Show/Hide Buttons]  [Reset].

Navigation window
The navigation window displays the contents of a project in tree form.
Data can be newly created and the edit window can be displayed via the tree.

Window
[View]  [Docking Window]  [Navigation] ( )

Toolbar

Status icons

Project view

Displayed items
Name Description Reference
Status display icon The icon representing the status of a project is displayed. Page 35 Status display icon

Simple display
Click on the toolbar to hide the folders that are not used.

Status display icon


The following table shows the icons representing project statuses.
Icon Status Display timing Item Description
Mismatch between Offline Module folder Displayed when a mismatch occurs between the system parameters
parameters and the module properties.
Unconfirmed required Module parameter Displayed when the [Apply] button has never been pressed in the
setting setting window for the setting-required module parameter (network).

3 OPERATING CW CONFIGURATOR
3.2 CW Configurator Screen Layout 35
Connection Destination window
The Connection Destination window displays the connection destinations set for the C Controller module in list form.

Window
[View]  [Docking Window]  [Connection Destination] ( )

For details on how to set a connection destination, refer to the following.


Page 44 Specifying the connection destination

Element Selection window


The Element Selection window displays elements for the Module Configuration window in list form.

Window
[View]  [Docking Window]  [Element Selection] ( )

Toolbar

Enter a search string (an element name or a keyword included in the description of an element) into the toolbar, and the focus
moves to the matched element.
From the display targets, only the elements included in the selected category can be displayed.

Pasting elements
■Pasting into the Module Configuration window
When the Module Configuration window is displayed, elements that can be pasted are displayed in the Element Selection
window.
Paste an element by dragging and dropping it into the Module Configuration window from the list.

3 OPERATING CW CONFIGURATOR
36 3.2 CW Configurator Screen Layout
3.3 Parameter Settings
This section describes the procedure for setting parameters with CW Configurator and writing them to the C Controller
module.

Starting up CW Configurator
To set parameters, start up CW Configurator.

Operating procedure
3
1. On the Windows Start screen  click
[MELSOFT]  [CW Configurator].

2. Click on the toolbar or [Project]  [New]


menu (Ctrl + N).

2. Click!

3. Click the [OK] button.

3. Click!

3 OPERATING CW CONFIGURATOR
3.3 Parameter Settings 37
Parameter setting procedure with CW Configurator

Adding module data


Add a module onto the Module Configuration window, and module parameters can be set.

Operating procedure
1. Double-click "Module Configuration Diagram"
in the Navigation window.
When the dialog box about parameter
information appears, click the [OK] button.

1. Double-click!

2. When the module configuration diagram dialog


box appears, select "R35B" from the "Main
Base" section on the Element Selection
window, and drag and drop it to the Module
Configuration window.

2. Drag and drop!

3. "R35B" is added to the Module Configuration


window.

3. Add!

3 OPERATING CW CONFIGURATOR
38 3.3 Parameter Settings
4. Select "R61P" from the "Power Supply"
section on the Element Selection window, and
drag and drop it to the power supply slot of the
R35B that was added to the Module
Configuration window.
While the R61P is being dragged and
dropped, locations where it can be placed are
4. Drag and drop! highlighted.
3

5. Add the R12CCPU-V already placed on the


Module Configuration window to the CPU slot
of the R35B.

5. Drag and drop!

6. In the same way as when adding a power


supply, select "R60AD4" from the "Analog
Input" section on the Element Selection
window, and add it to slot number 1 of the
R35B.

6. Add!

3 OPERATING CW CONFIGURATOR
3.3 Parameter Settings 39
7. Right-click the added R60AD4  click
[Parameter]  [Input Detailed Configuration
Information Window] menu, and when the
input detailed configuration information
window appears, set as follows.
[Setting details]
start XY: 0000
7. Set!

8. In the same way, select "R60DA4" from the


"Analog output" section on the Element
Selection window, and add it to slot number 2
of the R35B.

8. Add!

9. In the same way as procedure 7. , set as


follows.
[Setting details]
start XY: 0010

9. Set!

10. After the setting, right-click  click [Parameter]


 [Fix] menu to apply the parameters.
(Click the [OK] button when the confirmation
window for adding module labels appears.)

10. Click!

3 OPERATING CW CONFIGURATOR
40 3.3 Parameter Settings
11. The data of the specified modules are added
to the Navigation window.

11. Add! 3

3 OPERATING CW CONFIGURATOR
3.3 Parameter Settings 41
Own node settings
The own node settings refer to the settings necessary for the C Controller module to communicate with an external device.

Window

Displayed items
: there is no setting
Item Description Setting range Default
IP address Use of  Set whether to use the Ethernet Port (CH1). • Not Use Use
setting CH1 • Use
IP address Set the IP address so that the external device to be communicated • 0.0.0.1 to 192.168.3.3
with has an address of the same class and subnet. Set the IP 223.255.255.254
address so that it belongs to a network different from the network
for CH2.
Subnet mask When the IP address of the default gateway is set and when • 128.0.0.0 to 255.255.255.0
communicating with an external device in a different network via 255.255.255.252
routers, set the subnet mask pattern of the default gateway. All the
devices on the same subnetwork must have the common subnet
mask. This setting is not required when communications are
performed in a single network.
Default gateway Set the IP address of the device through which to access an • (empty) 
external device in a different network (default gateway). Set a • 0.0.0.1 to
value for the default gateway IP address that satisfies the following 223.255.255.254
conditions.
• The IP address class must be Class A, B, or C.
• The subnet address of the default gateway is the same as the
subnet address of the C Controller module in the own station.
• The host address is neither all "0" nor all "1".
Use of  Set whether to use the Ethernet Port (CH2). • Not Use Not Use
CH2 • Use
IP address Same as CH1 • 0.0.0.1 to 
223.255.255.254
Subnet mask • 128.0.0.0 to
255.255.255.252
Default gateway • (empty)
• 0.0.0.1 to
223.255.255.254

When using both CH1 and CH2, set different values for the IP address and subnet mask.

3 OPERATING CW CONFIGURATOR
42 3.3 Parameter Settings
Operating procedure
1. Double-click "Module Parameter" of the
R12CCPU-V in the Navigation window.

1. Double-click!

2. Select "Basic Settings" from the list of setting


items.

3. Set "Basic Settings" as follows.


[Setting details]
Use of CH2: Use
IP address: 192.168.4.4
Subnet mask: 255.255.255.0
2. Click!
4. Click! 4. Click the [Apply] button.

3. Set! 5. Save the created and set data.


Project name: school_ccpu.cp5

3 OPERATING CW CONFIGURATOR
3.3 Parameter Settings 43
Specifying the connection destination
Specify the connection destination.

Operating procedure
1. Select [Online]  [Current Connection
Destination] on the menu bar of the
engineering tool.

1. Click!

2. Click the [CPU Module Direct Coupled Setting]


button on the "Specify Connection Destination
Connection" window.
The CPU Module Direct Coupled Setting
dialog box appears.
2. Click!

3. Select a method of connection with the CPU


module and click the [Yes] button.

3. Click!

4. Click "No Specification" for the other station


setting.

4. Click!

3 OPERATING CW CONFIGURATOR
44 3.3 Parameter Settings
5. Click the [Connection Test] button.

5. Click!

6. Check that the CPU module is connected


successfully.
3

7. Click the [OK] button.

7. Click!

3 OPERATING CW CONFIGURATOR
3.3 Parameter Settings 45
Writing parameters to the C Controller module
Write the parameters set with CW Configurator to the C Controller module.
1. Select [Online]  [Write to PLC] from the
menu of the engineering tool.

1. Click!

2. Select "System Parameter/CPU Parameter"


and "Module Parameter".

3. Click the [Execute] button.

2. Click and select!

3. Click!

4. In the window for choosing whether to


overwrite parameters or not, click the [Yes to
all] button.

5. When the writing completion message


appears as the writing completes, click
[Close].

6. Reset the C Controller after writing the


parameters. For details on the reset
procedure, refer to the following.
Page 21 Reset operation procedure

5. Click!

3 OPERATING CW CONFIGURATOR
46 3.3 Parameter Settings
4 DEVICE ACCESS

4.1 Device List


This section describes the devices that can be used in the C Controller module. The devices are used to access peripherals
(such as an I/O module and intelligent function module) of the C Controller system.

Device list
The following table lists the device names that can be used and the ranges of use.
Classification Type Device name Default value Number
of
Setting range
4
Number of Range of use
points points
setting
User device Bit device Input 4096 points X0 to FFF Hexadecimal Not 
allowed
Output 4096 points Y0 to FFF Hexadecimal
Bit device Internal relay 61440 points M0 to 61439 Decimal Not 
allowed
Link relay 655360 points B0 to 9FFFF Hexadecimal
Word device Data register 4184064 points D0 to 4184063 Decimal
Link register 1048576 points W0 to FFFFF Hexadecimal
System device Bit device Special relay 4096 points SM0 to 4095 Decimal Not 
allowed
Word device Special register 4096 points SM0 to 4095 Decimal
Link direct device*1 Bit device Link input 16384 points Jn\X0 to 3FFF Hexadecimal
Link output 16384 points Jn\Y0 to 3FFF Hexadecimal
Link relay 32768 points Jn\B0 to 7FFF Hexadecimal
Link special relay 512 points Jn\SB0 to 1FF Hexadecimal
Word device Link register 131072 points Jn\W0 to 1FFFF Hexadecimal
Link special register 512 points Jn\SW0 to 1FF Hexadecimal
Module access Word device Module access device 268435456 Un\G0 to 268435455 Decimal Not 
device points allowed
CPU buffer memory Word device CPU buffer memory 268435456 U3En\G0 to Decimal Not 
access device access device points 268435455 allowed
Word device Fixed scan communication 0 points  Decimal Allowed U3En\HG0 to
area access device 12287
File register Word device File register 1835008 points ZR0 to 1835007 Decimal Not 
allowed
Pointer  Interrupt pointer 1024 points I0 to I15, I50 to I1023 Decimal Not 
allowed

*1 The number of points and range of use for a link direct device differ depending on the network module. For details on the number of
points and range of use for link direct devices, refer to the manual for the network module used.

Use only devices in the list.

4 DEVICE ACCESS
4.1 Device List 47
Device description
The following table shows an overview of devices that can be used.
For details on devices, refer to the following.
 MELSEC iQ-R CPU Module User's Manual (Application)
Device name Description
User device Input X This device provides the CPU module with commands and/or data using an external device,
such as a pushbutton, transfer switch, limit switch, and device switch.
Output Y This device outputs the control results of the program to various devices, such as an
external signal light/digital HMI/electromagnetic switch (electromagnetic contactor)/
solenoid.
Internal relay M This device is used as an auxiliary relay within the CPU module.
Data register D This device can store numerical values.
Link relay B This device is used on the C Controller module side when data is refreshed between the
network module and the C Controller module.
Link register W
System device Special relay SM This is the internal relay or internal register for which the specification is defined in the C
Controller module, where the status of the C Controller module is stored.
Special register SD
Link direct device Link input Jn\X This device directly accesses link relays and/or link registers of the network module in the
CC-Link IE Controller Network and/or CC-Link IE Field Network.
Link output Jn\Y
Link relay Jn\B
Link special relay Jn\SB
Link register Jn\W
Link special register Jn\SW
Module access Module access device Un\G This device directly accesses from the CPU module to the buffer memory of the intelligent
device function module mounted on the main base unit and extension base unit.
CPU buffer memory CPU buffer memory access U3En\G This device accesses memory used by the built-in function of the CPU module, such as
access device device data writing/reading between CPU modules on the multiple CPU system and Ethernet
Fixed scan communication U3En\HG function.
area access device
File register File register ZR This device holds data while the power is turned off. It exists in the file storage area of the
device/label memory.
Pointer Interrupt pointer I When the interrupt function is used, this device executes the corresponding routine.

Device access function


By using the dedicated function library, data can be read from/written to the devices and buffer memory of the intelligent
function module managed by the CPU module or C Controller module.

By using a peripheral (such as CW Configurator), data can be read from/written to the devices and buffer
memory of the C Controller module as well.

4 DEVICE ACCESS
48 4.1 Device List
4.2 C Controller module dedicated functions
C Controller module dedicated functions are one of the C Controller module "dedicated function libraries". When they are
used for user programs, each module in the MELSEC iQ-R series can be controlled easily.

Function list
This section introduces the most basic C Controller module dedicated functions.
Besides those listed below, C Controller module dedicated functions useful for controlling each module and MELSEC
communication functions also exist. For each function, refer to the following.
 C Controller Module Programming Manual

■Device access 4
The following table lists the functions used for device access.
Function name Description Reference
CCPU_X_In_BitEx Reads the input signal (X) in units of bits (one point). Page 50 CCPU_X_In_BitEx
CCPU_X_In_WordEx Reads the input signal (X) in units of words (16 points). Page 51 CCPU_X_In_WordEx
CCPU_Y_Out_BitEx Outputs the output signal (Y) in units of bits (one point). Page 52 CCPU_Y_Out_BitEx
CCPU_Y_Out_WordEx Outputs the output signal (Y) in units of words (16 points). Page 53 CCPU_Y_Out_WordEx
CCPU_ReadDevice Reads data from the internal user device and internal system device of Page 54 CCPU_ReadDevice
the C Controller module.
CCPU_WriteDevice Writes data to the internal user device and internal system device of the Page 55 CCPU_WriteDevice
C Controller module.

■User LED control


User LED control includes the dot matrix LED control of the C Controller module.
Function name Description Reference
CCPU_SetDotMatrixLED Sets a value to be displayed in the dot matrix LED control of the C Page 56 CCPU_SetDotMatrixLED
Controller module.

4 DEVICE ACCESS
4.2 C Controller module dedicated functions 49
CCPU_X_In_BitEx
This function reads the input signal (X) in units of bits (one point).

■Format
short CCPU_X_In_BitEx (short sFlg, unsigned short usXNo, unsigned short* pusData)

■Argument
Argument Name Description IN/OUT
sFlg Access flag Specifies the access flag. IN
• 0: Normal access
• Others: Reserved
usXNo Input signal Specifies the input signal (X). IN
pusData Data storage location Specifies the storage location of read data. OUT
One of the following values is stored according to the value of the input signal (X).
• 0: OFF
• 1: ON

■Description
• This function reads the input signal (X) specified by the input signal (usXNo) in units of bits (one point).
• The value of the read input signal (X) is stored in the data storage location (pusData).
• The CCPU_X_In_BitEx function operates for the mounted module corresponding to the specification by the input signal
(usXNo) regardless of the type in the parameter settings (I/O assignment). When the specified area is "Empty", it ends
normally with non-processing (read data is 0). When it is "Output module", an I/O assign error occurs.

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

4 DEVICE ACCESS
50 4.2 C Controller module dedicated functions
CCPU_X_In_WordEx
This function reads the input signal (X) in units of words (16 points).

■Format
short CCPU_X_In_WordEx (short sFlg, unsigned short usXNo, unsigned short usSize, unsigned short* pusDataBuf,
unsigned short usBufSize)

■Argument
Argument Name Description IN/OUT
sFlg Access flag Specifies the access flag. IN
• 0: Normal access
• Others: Reserved
usXNo Start input signal Specifies the start input signal (X). IN 4
(Specify a multiple of 16.)
usSize Read size Specifies the read size in units of words. IN
pusData Data storage location Specifies the storage location of read data. OUT
usBufSize Data storage location size Specifies the data storage location size in units of words. IN

■Description
• This function reads input signals (X) amounting to the size specified by the read size (usSize), starting from the start input
signal (X) specified by the start input signal (usXNo), and stores them in the data storage location (pusDataBuf).
• For the data storage location size (usBufSize), specify the area size of the data storage location (pusDataBuf).
• The CCPU_X_In_WordEx function operates for the mounted module corresponding to the specification by the input signal
(usXNo) regardless of the type in the parameter settings (I/O assignment). When the specified area is "Empty", it ends
normally with non-processing (read data is 0). When it is "Output module", an I/O assign error occurs.
• As shown below, read data is stored in the data storage location (pusDataBuf) in the order from the earliest to the oldest,
starting from the lower bits.
pusDataBuf Description
pusDataBuf[0] Data in usXNo+FH to usXNo
pusDataBuf[1] Data in usXNo+1FH to usXNo+10H
 
pusDataBuf[usSize-1] Data in usXNo+(usSize–1)16+FH to usXNo+(usSize–1)16

Precautions
For the data storage location size (usBufSize), set a value larger than the value of the read size (usSize).

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

4 DEVICE ACCESS
4.2 C Controller module dedicated functions 51
CCPU_Y_Out_BitEx
This function outputs the output signal (Y) in units of bits (one point).

■Format
short CCPU_Y_Out_BitEx (short sFlg, unsigned short usYNo, unsigned short usData)

■Argument
Argument Name Description IN/OUT
sFlg Access flag Specifies the access flag. IN
• 0: Normal access
• Others: Reserved
usYNo Output signal Specifies the output signal (Y). IN
usData Data storage location Specifies the storage location of output data. IN
(Specify a value for bit 0.)
• 0: Off
• 1: On

■Description
• This function outputs (ON/OFF) the output signal (Y) specified by the output signal (usYNo) in units of bits (one point).
• It turns OFF/ON according to the specified value for bit 0 of the data storage location (usData). (The values of bits 1 to 7 are
ignored.)
• When the function is executed while the operating status of the CPU module is not RUN, an error in the STOP/PAUSE state
occurs.
• When the function is executed for "Input module", an I/O assign error occurs.
• Do not specify an output module managed by another CPU module for the output signal (usYNo).
Otherwise, operation for the output module is treated as non-processing.

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

4 DEVICE ACCESS
52 4.2 C Controller module dedicated functions
CCPU_Y_Out_WordEx
This function outputs the output signal (Y) in units of words (16 points).

■Format
short CCPU_Y_Out_WordEx (short sFlg, unsigned short usYNo, unsigned short usSize, unsigned short* pusDataBuf,
unsigned short usBufSize)

■Argument
Argument Name Description IN/OUT
sFlg Access flag Specifies the access flag. IN
• 0: Normal access
• Others: Reserved
usYNo Start output signal Specifies the start output signal (Y). IN 4
(Specify a multiple of 16.)
usSize Output size Specifies the output size in units of words. IN
pusDataBuf Data storage location Specifies the storage location of output data. IN
usBufSize Data storage location size Specifies 0. IN

■Description
• This function outputs (ON/OFF) data in the data storage location (pusDataBuf) to output signals (Y) amounting to the size
specified by the data size (usSize), starting from the start output signal (Y) specified by the start output signal (usYNo).
• When the function is executed while the operating status of the CPU module is not RUN, an error in the STOP/PAUSE state
occurs.
• When the function is executed for "Input module", an I/O assign error occurs.
• Do not specify an output module managed by another CPU module for the output signal (usYNo).
Otherwise, operation for the output module is treated as non-processing.
• As shown below, store output data in the data storage location (pusDataBuf) in the order from the earliest to the oldest,
starting from the lower bits.
pusDataBuf Description
pusDataBuf[0] Normally finished
pusDataBuf[1] Failed
 
pusDataBuf[usSize-1] Data in usYNo+(usSize–1)16+FH to usYNo+(usSize–1)16

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

4 DEVICE ACCESS
4.2 C Controller module dedicated functions 53
CCPU_ReadDevice
This function reads data from the internal user device and internal system device of the C Controller module.

■Format
short CCPU_ReadDevice (short sDevType, unsigned long ulDevNo, unsigned long ulSize, unsigned short* pusDataBuf,
unsigned long ulBufSize)

■Argument
Argument Name Description IN/OUT
sDevType Device type Specifies the device type. IN
Page 55 Device type
ulDevNo Start device No. Specifies the start device number. IN
(For bit devices, only a multiple of 16 can be specified.)
ulSize Data size Specifies the read data size in units of words. IN
pusDataBuf Data storage location Specifies the storage location of read data. OUT
ulBufSize Data storage location size Specifies the data storage location size in units of words. IN

■Description
This function reads data of devices amounting to the size specified by the data size (ulSize), starting from the device specified
by the device type (sDevType) and start device number (ulDevNo), and stores it in the data storage location (pusDataBuf).

Precautions
For the data storage location size (ulBufSize), set a value larger than the value of the data size (ulSize).

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

4 DEVICE ACCESS
54 4.2 C Controller module dedicated functions
CCPU_WriteDevice
This function writes data to the internal user device and internal system device of the C Controller module.

■Format
short CCPU_WriteDevice (short sDevType, unsigned long ulDevNo, unsigned long ulSize, unsigned short* pusDataBuf,
unsigned long ulBufSize)

■Argument
Argument Name Description IN/OUT
sDevType Device type Specifies the device type. IN
Page 55 Device type
ulDevNo Start device No. Specifies the start device number. IN
(For bit devices, only a multiple of 16 can be specified.) 4
ulSize Data size Specifies the write data size in units of words. IN
pusDataBuf Data storage location Specifies the storage location of write data. IN
ulBufSize Data storage location size Specifies 0. IN

■Description
This function writes data in the data storage location (pusDataBuf) amounting to the size specified by the data size (ulSize) to
devices starting from the device specified by the device type (sDevType) and start device number (ulDevNo).

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

Device type
Device type refers to the device type to be specified for C Controller module dedicated functions.
Devices are defined in the header file "CCPUFunc.h".

A device type can be specified either by a code or device name.

Device (Device name) Device type


Code Device name
Decimal Hexadecimal
Internal relay (M) 4 4H Dev_CCPU_M
Special relay (SM) 5 5H Dev_CCPU_SM
Data register (D) 13 DH Dev_CCPU_D
Special register (SD) 14 EH Dev_CCPU_SD
Link relay (B) 23 17H Dev_CCPU_B
Link register (W) 24 18H Dev_CCPU_W
File register (ZR) 200 DCH Dev_CCPU_ZR

4 DEVICE ACCESS
4.2 C Controller module dedicated functions 55
CCPU_SetDotMatrixLED
This function sets a value to be displayed in the dot matrix LED control of the C Controller module.

■Format
short CCPU_SetDotMatrixLED(unsigned short usLedMode, char* pcData)

■Argument
Argument Name Description IN/OUT
usLedMode Output mode Specifies the output mode for the dot matrix LED. IN
(If reserved is specified, the function finishes normally with non-processing.)
• 0: Dot mode
• 1: ASCII mode
• Others: Reserved
pcData LED data Specifies the LED data. IN

• Specifies the LED data (pcData) as follows.


 Mode 0: In dot mode
Dot matrix LED

pcData[0] to pcData[19]: Dot matrix LED data (720)


Data specified by the following format is displayed in each column.
Data format for each column: Bit pattern of 0 for upper one bit, 1 for lower 7 bits when LED is turned on, and 0 when LED is
turned off

Ex.
When the following bit patterns are output to the dot matrix LED
1st column
2nd column

5th column

1st column: 0000 0111b=07HpcData[0]=0x07


2nd column: 0000 1100b=0cHpcData[1]=0x0c
3rd column: 0001 0100b=14HpcData[2]=0x14
4th column: 0010 0100b=24HpcData[3]=0x24
5th column: 0111 1111b=7fHpcData[4]=0x7f
6 to 20th column: 0000 0000b=00HpcData[5] to pcData[19]=0x00

4 DEVICE ACCESS
56 4.2 C Controller module dedicated functions
 Mode 1: In ASCII mode
The specified string is displayed in pcData[0] to pcData[3].
The following table lists the characters that can be specified (ASCII code).
: Character specification not allowed
Bit Upper 4 bits
0 1 2 3 4 5 6 7 8 9 A B C D E F
Lower 4 bits 0   SP 0  P          
1    1 A Q          
2    2 B R          
3    3 C S          
4    4 D T          
           
5
6  
%

5
6
E
F
U
V          
4
7    7 G W          
8    8 H X          
9    9 I Y          
A     J Z          
B     K           
C     L           
D   -  M           
E   .  N           
F   /  O           

If a character other than the above is specified, an error is returned.


If NULL is in the middle of a string, data after that is not displayed and treated as empty. (Displayed as left-aligned)

■Description
In accordance with the method specified by the output mode (usLedMode), values specified for LED data (pcData) are
displayed on the dot matrix LED.

Precautions
• To display data on the dot matrix LED, "USER" must be selected for the operation selection mode.
 (MELSEC iQ-R C Controller Module User's Manual (Startup))
• When the MODE/SELECT switch is operated, if the operation is being checked or the selected operation is being checked,
even with "USER" selected for the operation selection mode, an error occurs when the CCPU_SetDotMatrixLED function is
executed.

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

4 DEVICE ACCESS
4.2 C Controller module dedicated functions 57
4.3 Exercise 1 Device Control
Check the operation using a program that performs control for inputting and outputting device values of the C Controller
module.
The engineering tool CW Workbench is used for the exercise. For details on CW Workbench, refer to the following.
Page 137 CW Workbench

Creating a project
Make preparations in advance of the exercise.
In this manual, CW Workbench is assumed to have already been installed.
In addition, as a workspace, create "C:\CCPU_CWW_Prj\enshu" on a personal computer.

Starting up CW Workbench
Operating procedure
1. Select [Start]  [All Apps]  [Wind River]  [CW
Workbench 3.3]  [CW Workbench 3.3].

2. After CW Workbench starts up, enter the workspace


save destination folder.
[Setting details]
C:\CCPU_CWW_Prj\enshu

3. Click the [OK] button.

3. Click!

• The size of each window and the icon layout in the initialized state of CW Workbench differ depending on
the personal computer used. When the actual screen is different from the screen described in this manual,
adjust the size of each window.
• To enlarge, delete, or restore the initial state of each window, select [Window] on the menu  [New
Window].

4 DEVICE ACCESS
58 4.3 Exercise 1 Device Control
Creating a new project
Operating procedure
1. Click [File] on the menu  [New]  [Wind River
Workbench Project].

1. Click!

4
2. Select "Wind River VxWorks6.9".

3. Click the [Next] button.

2. Select!

3. Click!

4. Select "Downloadable Kernel Module".

5. Click the [Next] button.

4. Select!

5. Click!

6. Enter "enshu1" and click the [Finish] button.

To create a project in Page 119 Exercise


2 A/D conversion, D/A conversion, enter
"enshu2".

6. Click!

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 59
Setting properties for the project
Configure settings for converting (building) the created project into a module that can be executed by the C Controller module.

Build: Compile source code according to the processor and establish linkage with the include files.

■Setting the processor to be used

Operating procedure
1. In the Project Explorer window, select the created
project and click [Project] on the menu  [Properties].

1. Click!

2. Select "Build Properties" from the tree on the left of the


window.

2. Select!

3. Click the [Build Support and Specs] tab.

3. Double-click!

4 DEVICE ACCESS
60 4.3 Exercise 1 Device Control
4. In "Available and enabled build specs", select only the
checkbox for "ARMARCH7gnu_SMP".

5. Select the checkbox for "Debug mode".

Clear the checkbox for "Debug mode" when


4. Check!
actually commissioning and operating the
system.

5. Check!

6. Select the [Tools] tab and enter "-mlong-calls" for "Tool


Flags".

6. Enter!

7. In the same way, enter "-fsigned-char" for [Debug mode]


and [Non Debug mode] of "Debug mode flags".

7. Enter!

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 61
■Setting include files
Create in advance an include folder for storing include files in the following location.
C:\CCPU_CWW_Prj\Include

Operating procedure
1. Select the [Paths] tab and click the [Add] button.

1. Click!

2. Click the [Browse] button.

2. Click!

3. Select the include folder "C:\CCPU_CWW_Prj\Include"


created in advance.

4. Click the [OK] button.

3. Click!

4. Click!

4 DEVICE ACCESS
62 4.3 Exercise 1 Device Control
5. In the "Add include search path to selected build spec"
window, check that the selected folder is specified.
5. Check!
6. Click the [OK] button.

6. Click!

7. In "Include paths", check that the added include path is


displayed.
4
8. Click the [OK] button.

7. Check!

8. Click!

9. When the following message appears after the [OK]


button is clicked, click the [Yes] button.

When setting a project for "enshu2", because


the include files are already added to the
include folder, the subsequent steps do not
9. Click!
need to be followed.

10. Add include files to the created include folder


10. Enter! "C:\CCPU_CWW_Prj\Include".
To acquire include files stored in the C Controller
module, start up Explorer and enter the following in the
address field.
ftp://192.168.3.3/SYSTEMROM/INCLUDE/

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 63
11. In the "Log on as" window, enter the following user
name and password.
[Setting details]
User name: target
Password: password
11. Enter!

12. Click the [Log On] button.

12. Click!

13. Copy the include files stored in the C Controller module


to "C:\CCPU_CWW_Prj\Include".

13. Copy!

4 DEVICE ACCESS
64 4.3 Exercise 1 Device Control
Exercise 1.1 Switch input and lamp output
Acquire ON/OFF information of switches M0 to M15 of the demonstration machine, and among lamps Y170 to Y17F of the
demonstration machine, turn on the lamps with the same bit numbers as the bit numbers of switches turned on. In addition,
display the number of switch operations on the dot matrix LED, and when the number of operations exceeds 25, stop the
processing and reset the lamp output and dot matrix LED display.
For operation check, the following shows an overview of the procedure.

Operating procedure
1. Copy the program enshu1_1.c to the project folder C:\CCPU_CWW_Prj\enshu\enshu1 created this time to add it to the
project. ( Page 66 Procedure for adding a program)

2. Rebuild enshu1_1.c in debug mode. ( Page 67 Generating a module for execution) 4


3. Connect the C Controller module and CW Workbench. ( Page 69 Connecting the C Controller module and CW
Workbench)

4. Debug the created program to check if it operates correctly. ( Page 73 Debugging the user program)

5. Rebuild the program enshu1_1.c that underwent debugging by canceling the debug mode, and store the created user
program on the C Controller module. ( Page 80 Registering a module for execution)

6. Create a script and store it in the C Controller module. ( Page 82 Registering a module for execution)

7. Reset the C Controller module and set the switch on the front to the RUN position.

8. Turn on/off switches M0 to M15 of the demonstration machine, check the lamp outputs from Y170 to Y17F, and check
that the number of switch operations is displayed on the dot matrix LED of the C Controller module. ( Page 83
Checking the operation)

9. After the operation is checked completely, disconnect CW Workbench from the C Controller module ( Page 72
Connecting and disconnecting) once, delete the user program and script stored in the C Controller module, and reset the
C Controller module.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 65
Procedure for adding a program
Operating procedure
1. Copy the already programmed enshu1_1.c to
C:\CCPU_CWW_Prj\enshu\enshu1.

• To add the program in Page 119


Exercise 2 A/D conversion, D/A
conversion, copy the program to
C:\CCPU_CWW_Prj\enshu\enshu2.
• The file name of the program to be copied
1. Copy! differs depending on the exercise. For the
settings in Exercise 2.2, copy enshu2_2.c.

2. In the "Project Explorer" window, select a project to


which a program is to be added, and right-click the
mouse  select [Refresh].

2. Select!

3. The program copied in 1. is added to the project.

In this exercise, a user program is assumed to have already been created. For details on how to create a new
user program, refer to the following.
Page 137 Creating a new user program

4 DEVICE ACCESS
66 4.3 Exercise 1 Device Control
Generating a module for execution
Convert (build) the created program into a module that can be executed by the C Controller module.

Operating procedure
1. In the "Project Explorer" window, select the created
project and right-click the mouse  select [Rebuild
Project].

1. Select!

2. When the message on the left appears, click the


[Continue] button.

2. Click!

3. Check that "Build Finished..." is displayed in the Build


Console window.

If "Build Finished..." is not displayed and an


error occurs, check the error description and
correct the program.
After correcting the program, start from step
3. Check! 1. again.

When the build process finishes normally, the folder in which a user program is generated is as follows.
• Debug mode
(Workspace folder)\(Project name folder)\ARMARCH7gnu_SMP\(Project name folder)\Debug
• Non Debug mode
(Workspace folder)\(Project name folder)\ARMARCH7gnu_SMP\(Project name folder)\NonDebug
When a user program is generated in an imported project, the above folders change depending on the
folder in which the imported project exists and the project structure.
For the folder in which a user program is generated, check with the imported project.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 67
Precautions
■If the build result is an error
Error information (source file names, line numbers, error descriptions) is displayed in red in the "Build Console" window.
Double-click a line where the source file name and line number are displayed in red to jump to where an error occurred in the
source file.
Repeat source code correction & building until error information (red) disappears from the build result.

■When the error "command not found" occurs


An unsupported compiler may be used.
In the [Build Support and Specs] tab of "Build Properties", check that the checkbox for "ARMARCH7gnu_SMP" is selected.
Select only the checkbox for "ARMARCH7gnu_SMP".

4 DEVICE ACCESS
68 4.3 Exercise 1 Device Control
Connecting the C Controller module and CW Workbench
Connect the Ethernet port (CH1) of the C Controller module and CW Workbench to perform debugging with CW Workbench.

Operating procedure
1. Using Explorer, connect to ftp://192.168.3.3/
SYSTEMROM/OS_IMAGEFILE/.

To communicate with the C Controller


module using a personal computer, the same
VxWorks image file must be specified on
both sides. 4

2. In the "Log on as" window, enter the following user


name and password.
[Setting details]
User name: target
Password: password
2. Enter!
3. Click the [Log On] button.

3. Click!

4. Create the "C:\CCPU_CWW_Prj\R12CCPU-


V\CCPUTool" folder and copy the VxWorks image file*1
stored in the C Controller module to
"C:\CCPU_CWW_Prj\R12CCPU-V\CCPUTool".
*1 The file name is "R12CCPU-V_XX". "XX" at the end of the file

4. Copy! name is the upper two digits of the serial number.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 69
5. Click in the Remote Systems window.
5. Click!

6. Select "Wind River VxWorks 6.x Target Server


Connection" in the "New Connection" window.
7. Click the [Next] button.

6. Select!

7. Click!

8. For the setting items in "Backend settings", set the


following.
[Setting details]
Processor: ARM9 (Click the [Select] button to select
from the tree.)
Backend: wdbrpc
8. Set! IP Address: 192.168.3.3 (Default)
Port: Blank

4 DEVICE ACCESS
70 4.3 Exercise 1 Device Control
9. Select "File" for "Kernel image".
10. Click the [Browse] button.

9. Select!
10. Click!
4

11. Select the VxWorks image file


(C:\CCPU_CWW_Prj\R12CCPU-V\CCPUTool) copied
in step 4. from the tree, and click the [Open] button.

11. Click!

12. Click the [Finish] button.

12. Click!

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 71
13. When "connected - target server running" is displayed at
the bottom of the Remote Systems window, the
connection is completed.

If "connected - target server running" is not


displayed, check that the C Controller
13. Check! module is powered on correctly, and try again
from  Page 69 Connecting the C
Controller module and CW Workbench.

■Connecting and disconnecting


1. To connect or disconnect the created connection
destination, click the applicable button in the Remote
Systems window.
: Connect
: Disconnect
1. Click!

4 DEVICE ACCESS
72 4.3 Exercise 1 Device Control
Debugging the user program
Check that the created program operates correctly.

■Downloading the user program into the C Controller module


For debugging, download the module for execution into the memory of the C Controller module.
When the module for execution is downloaded, the program can be executed without a script file.

Script file: A file in which information such as the load destination of the user program to be activated when the
C Controller module starts up and the order of startup is described

Operating procedure 4
1. In the Project Explorer window, select the created
module file "enshu1.out", and right-click the mouse 
select [Download]  [VxWorks Kernel Task].

• To debug a program in Page 119


Exercise 2 A/D conversion, D/A
conversion, enter "enshu2.out".
• When operating in Non Debug mode, two
files with enshu.out in the file name are
displayed. For the file for debug mode, "-
1. Click!
debug" is displayed at the end.

2. In the [Launch Context] tab, select only the checkbox for


"VxWorks6x_192.168.3.3(Wind River VxWorks 6.9)",
and click the [Download] button.

2. Check!

2. Click!

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 73
When performing the operation in 2 for the second time or later, the "Launch Configuration Selection" window
is displayed.
Select "Launch the selected launch configuration" and click the [OK] button.

Select!

Click!

4 DEVICE ACCESS
74 4.3 Exercise 1 Device Control
■Debugging the user program
Check that the debug mode is applied to the project before operating the project.
Page 60 Setting properties for the project

Operating procedure
1. In the Project Explorer window, select the created
1. Click! project and click the [] button on the right of the
toolbar .

2. Click [Debug Configurations] on the menu.

2. Click!

3. Click the module "enshu1.out" downloaded from


"VxWorks Kernel Task".

To debug a program in Page 119


Exercise 2 A/D conversion, D/A conversion,
enter "enshu2.out".

4. Select the checkbox for the target server indicating


4. Check!
connection with the C Controller module.
3. Click!

5. Click the [Browse] button.

5. Click!

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 75
6. Select the debug start function "enshu1_1" and click the
[OK] button.

For the debug start function, name it


according to the program name used for
each exercise.
Example: For exercise 2.2, select
6. Select! "enshu2_2".

6. Click!

7. Check that the function name selected in step 6. is set


for "Entry Point", and click the [Debug] button.

7. Check!

7. Click!

8. Debugging starts and program execution stops at the


head of the function specified for "Entry Point".

4 DEVICE ACCESS
76 4.3 Exercise 1 Device Control
9. Use the [1 step execution] button in the Debug window
to perform debugging one step at a time.
9. Click!

4
10. Click the Variables window tab at the lower right of the
window to check or change the value of each variable.
Here, check that the return value for the CCPU function
"sRet" is 0 (normal value).
 Using step execution in step 9. , debug up to the line
"" points to.
 In the [Variables] tab, check that the value of sRet is 0
(normal value).
10. Execute! 11. Repeat steps 9. and 10., and debug the created
program entirely.

10. Check!

If the return value for the C Controller module dedicated function is not 0, perform troubleshooting by referring
to the following.
 C Controller Module Programming Manual

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 77
■Debug procedure using Breakpoint
Instead of debugging one step at a time, debugging can be performed by specifying Breakpoint at any point in the program.

Operating procedure
1. Double-click the left end of the source file to insert
Breakpoint.

1. Double-click!

2. Click .
The program is executed up to the point specified by
Breakpoint.

2. Click!

3. Click in the Debug window.

3. Click!

4 DEVICE ACCESS
78 4.3 Exercise 1 Device Control
To start debugging again, click the [] button on the right of the toolbar , and select the already generated
debug structure at the top of the popup window displayed.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 79
Registering a module for execution
Build the created program into a program for operation, and store it in the C Controller module.

■Building a user program

Operating procedure
1. In the Project Explorer window, select the created
project and click [Project] on the menu  [Properties].

1. Click!

2. Select "Build Properties" from the tree on the left of the


window, clear the checkbox for "Debug mode", and click
the [OK] button.

2. Click!
2. Clear!

3. When the following message appears after the [OK]


3. Click! button is clicked, click the [Yes] button.

4. Build according to Page 67 Generating a module


for execution.

4 DEVICE ACCESS
80 4.3 Exercise 1 Device Control
■Storing the user program

Operating procedure
1. Start up Explorer and enter the following for the address
field of the C Controller module.
ftp://192.168.3.3/0

1. Enter!

2. Drag and drop the created user program "enshu1.out"


to the program memory "0" in the C Controller module to
copy it.
The created user program "enshu1.out" is stored under
the following.
C:\CCPU_CWW_Prj\enshu\enshu1\ARMARCH7gnu_S
MP\enshu1\NonDebug
2. Copy!
To copy a program in Page 119 Exercise
2 A/D conversion, D/A conversion, enter
"enshu2.out".

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 81
■Creating and storing a script file

Operating procedure
1. Open a text file and write the content of a script file for
loading a user program and generating a task as shown
in the window.
Load the file
"enshu1.out" from 2. Save the file with the file name "STARTUP.CMD".
program memory "0".

Generate the function


enshu1_1 with
the default task name (t1).

3. Copy the created script file to the following program


memory in the C Controller module.
ftp://192.168.3.3/0

A user program and script file can be stored not only in the program memory, but also in the SD memory card.
If a script file is stored in both areas, the script file in the SD memory card starts up first.

4 DEVICE ACCESS
82 4.3 Exercise 1 Device Control
Checking the operation
Execute the program registered in the C Controller module to check its operation.
For operation, use the RESET/STOP/RUN switch on the front of the C Controller module.
The applications of the RUN/STOP/RESET switch are as follows.
• RUN: Output (Y) from the user program, allowed to be written to the buffer memory
• STOP: Output (Y) from the user program, not allowed to be written to the buffer memory
• RESET: Reset the module

• Program operation in the C Controller module is executed regardless of whether the status of the switch is
RUN or STOP.
• For details on the RUN/STOP/RESET switch, refer to the following. 4
 (MELSEC iQ-R C Controller Module User's Manual (Startup))

Operating procedure
1. Reset the C Controller module and set the switch on the
front to the RUN position.
For details on the reset procedure, refer to the following.
Page 21 Reset operation procedure

2. When switches M0 to M15 of the demonstration


machine are turned on/off, lamps Y170 to Y17F with the
same bit numbers as those switches turn on/off.

3. The number of times a switch is turned on/off is


displayed on the dot matrix LED of the C Controller
module.

4. In addition, the processing is finished when the number


of switch operations exceeds 25, and the lamp output
and dot matrix LED display are reset.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 83
Source code
The following shows the source code of the program enshu1_1.

4 DEVICE ACCESS
84 4.3 Exercise 1 Device Control
4

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 85
Exercise 1.2 Input device and display device
Add the input values of the input devices D20 and D21 of the demonstration machine, and display the result in the display
device D0.

Operating procedure
1. Copy the program enshu1_2.c to the project folder C:\CCPU_CWW_Prj\enshu\enshu1 to add it to the project. (
Page 66 Procedure for adding a program)

2. Rebuild enshu1_2.c in debug mode. ( Page 67 Generating a module for execution)

3. Connect the C Controller module and CW Workbench. ( Page 72 Connecting and disconnecting)

4. Debug the created program to check if it operates correctly. ( Page 73 Debugging the user program)

5. Rebuild the program enshu1_2.c that underwent debugging by canceling the debug mode, and store the created user
program on the C Controller module. ( Page 80 Registering a module for execution)

6. Create a script and store it in the C Controller module. ( Page 82 Registering a module for execution)
[Script details]
Load a program: ld (1, 0, "/0/enshu1.out")
Generate a task: sp (enshu1_2)

7. Reset the C Controller module and set the switch on the front to the RUN position.

8. Change the values of the input devices D20 and D21 of the demonstration machine, and check the change of the value
of the display device D0. ( Page 86 Checking the operation)

9. After the operation is checked completely, disconnect CW Workbench from the C Controller module ( Page 72
Connecting and disconnecting) once, and delete the user program and script stored in the C Controller module.

Checking the operation


Operating procedure
1. Reset the C Controller module and set the switch on the
front to the RUN position.

2. Input values to the input devices D20 and D21 of the


demonstration machine, and the addition result is
displayed in the display device D0.

4 DEVICE ACCESS
86 4.3 Exercise 1 Device Control
Source code
The following shows the source code of the program enshu1_2.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 87
4 DEVICE ACCESS
88 4.3 Exercise 1 Device Control
Exercise 1.3 Executing two programs
Start up a task for executing enshu1_1() and a task for executing enshu1_2() at the same time.
In exercise 1.3, check that two tasks can operate at the same time. Generate two tasks, tEnshu1_1 and tEnshu1_2, with the
API function of VxWorks taskSpawn(), so that tEnshu1_1 executes enshu1_1() and tEnshu1_2 executes enshu1_2().

Operating procedure
1. Copy the program enshu1_3.c to the project folder C:\CCPU_CWW_Prj\enshu\enshu1 to add it to the project. (
Page 66 Procedure for adding a program)

2. Rebuild enshu1_3.c in debug mode. ( Page 67 Generating a module for execution)

3. Connect the C Controller module and CW Workbench. ( Page 72 Connecting and disconnecting)
4
4. Debug the created program to check if it operates correctly. ( Page 73 Debugging the user program)

5. Rebuild the program enshu1_3.c that underwent debugging by canceling the debug mode, and store the created user
program on the C Controller module. ( Page 80 Registering a module for execution)

6. Create a script and store it in the C Controller module. ( Page 81 Storing the user program)
[Script details]
Load a program: ld (1, 0, "/0/enshu1.out")
Generate a task: sp (enshu1_3)

7. Reset the C Controller module and set the switch on the front to the RUN position.

8. Check that the operations in exercises 1.1 and 1.2 can be executed at the same time. ( Page 83 Checking the
operation)

9. After the operation is checked completely, disconnect CW Workbench from the C Controller module ( Page 72
Connecting and disconnecting) once, and delete the user program and script stored in the C Controller module.

Checking the operation


Operating procedure
1. Reset the C Controller module and set the switch on the
front to the RUN position.
2. The operations in exercises 1.1 and 1.2 can be
executed at the same time.

4 DEVICE ACCESS
4.3 Exercise 1 Device Control 89
Source code
The following shows the source code of the program enshu1_3.

4 DEVICE ACCESS
90 4.3 Exercise 1 Device Control
5 OPERATING INTELLIGENT FUNCTION
MODULES
5.1 Intelligent Function Modules

Types of intelligent function modules


An intelligent function module is a module that can realize functions that cannot be provided by or whose applications are
limited in use for the C Controller module.
Therefore, intelligent function modules with functions required for specific purposes can be selected for use.
The C Controller module can use MELSEC iQ-R series intelligent function modules.
The following table lists examples of modules.
Name Number of occupied I/O points Function Internal current 5
consumption (5VDC)
Analog-digital converter module 16 points (I/O assignment: intelligent 16 0 to 20mADC  0 to 32000 0.22A
(R60AD4) points) 0 to 10V  0 to 32000
Input module for the above
conversions
Digital-analog converter module 16 points (I/O assignment: intelligent 16 0 to 32000  0 to 20mADC 0.16A
(R60DA4) points) 32000  0 to 10V
Output module for the above
conversions

Combination with the C Controller module


An intelligent function module is used while mounted on any I/O slot of the main base unit and extension base unit.
I/O slot number
0 1 2

Power supply Intelligent function module


[Numbers used] X/Y00 to 0F, 10 to 1F, 16 points each
C Controller module

5 OPERATING INTELLIGENT FUNCTION MODULES


5.1 Intelligent Function Modules 91
5.2 Exchange of Information between Intelligent
Function Modules and the C Controller Module
Roughly speaking, two types of information is exchanged.
Information in units of bits--Signals using input and output X, Y
Information in units of words--16-bit or 32-bit data
C Controller module Intelligent function module internal structure

R12CCPU-V

External I/F
X/Y
X/Y/M/D
Device memory such as

Function
Input X
CPU
Output Y (Bit data)
Program

Buffer memory
Read data

Write data (Word data)

5 OPERATING INTELLIGENT FUNCTION MODULES


92 5.2 Exchange of Information between Intelligent Function Modules and the C Controller Module
I/O signals for the C Controller module
Of signals sent/received between the C Controller module and intelligent function modules, those in units of bits use input and
output X, Y.
X, Y here are different from external input and output, and used for sequence programs as signals specific to the intelligent
function module. Note that for I/O numbers, numbers assigned according to the mounting position of the intelligent function
module are used.

Input signal X from the intelligent function module


X used in a program refers to a signal to be input from the intelligent function module to the C Controller module and
originates from the intelligent function module side. In a program, as bit information for checking the module status, this signal
is read by calling the bus interface function (CCPU_X_In_BitEx() or CCPU_X_In_WordEx()).
Intelligent function
C Controller module module
X
Ready signal 5
X Operating condition
setting completion
X
A/D conversion
completion
X
Error occurrence

For example, input signals from an analog-digital converter module are as follows.
• Ready signal
This signal inputs the information that the intelligent function module operates normally and is ready to the CPU when the
power is turned on.
• A/D conversion completion flag
This signal is turned on when conversion is completed at all the conversion enabled channels. When reading a digital
output value, this signal is used as an interlock.

Output signal Y to the intelligent function module


This signal is output to the intelligent function module by calling the bus interface function (CCPU_Y_Out_BitEx() or
CCPU_Y_Out_WordEx()) and originates from the C Controller module side.
Intelligent function
C Controller module module

Output enable/ Y
disable
Y
User range write
Y
Channel change
Y
Synchronized output

For example, an output signal to an analog-digital converter module is as follows.


• CH Output enable/disable flag
This signal specifies whether to output an analog value converted through D/A conversion or offset value, per channel.

5 OPERATING INTELLIGENT FUNCTION MODULES


5.2 Exchange of Information between Intelligent Function Modules and the C Controller Module 93
Data communication with an intelligent function module
Data is sent/received in units of 16 bits or 32 bits. The intelligent function module has buffer memory to store data.

Intelligent function module Buffer memory address


0 Latest error code
1 Latest address of error history
C Controller
2 Latest alarm code
module Read Data
Buffer 3 Latest address of alarm history
memory 4 to 19 Interrupt factor detection flag [n]
20 to 35 System area (not available) Can be read from
36 Alert output upper limit flag and written to the
Write C Controller module

Memory map example: Digital-analog converter module R60DA4

• Data can be read from/written to the buffer memory by calling the C Controller module dedicated function
(CCPU_FromBuf() or CCPU_ToBuf()).
• The buffer memory has an address specific to each intelligent function module for each word (short type (16 bits)).
The addresses of the buffer memory start from 0, and data is read/written by specifying them. The minimum unit of
measurement is 1 word. 17 to 32-bit data is handled by using 2 words (32 bits).
The following figure shows an example of 16 bits for the digital-analog converter module; the digital quantity is written from
the CPU. In the contents, a digital value of -32000 to 32000 is set using 16-bit signed binary data.
B15 B14 B13 B12 B11 B10 B9 B8 B7 B6 B5 B4 B3 B2 B1 B0

0 0 0 0 1 0 0 0 1 0 1 0 0

Data section
Sign bit
1: Negative The case of +276 is shown.
0: Positive (A negative digital value is expressed in two's
complement.)

RAM is used for the buffer memory.

5 OPERATING INTELLIGENT FUNCTION MODULES


94 5.2 Exchange of Information between Intelligent Function Modules and the C Controller Module
5.3 Methods of Communication with Intelligent
Function Modules
Types of methods of communication with intelligent function
modules
The C Controller can perform communications with intelligent function modules by the following methods.
Communication method Function
CW Configurator Intelligent function module Monitors I/O signals of the intelligent function module and the buffer memory, and writes data.
monitor
Intelligent function module Writes the initial settings for the parameters of the intelligent function module to the C Controller
parameter module, and automatically reflects them in the buffer memory of each intelligent function module
when the C Controller module starts up.
C Controller module CCPU_X_In_BitEx Reads input signals X of the intelligent function module in units of bits.
dedicated functions Page 50 CCPU_X_In_BitEx 5
CCPU_X_In_WordEx Reads input signals X of the intelligent function module in units of 16 bits.
Page 51 CCPU_X_In_WordEx
CCPU_Y_In_BitEx Reads output signals Y of the intelligent function module in units of bits.
 MELSEC iQ-R C Controller Module Programming Manual
CCPU_Y_In_WordEx Reads output signals Y of the intelligent function module in units of 16 bits.
 MELSEC iQ-R C Controller Module Programming Manual
CCPU_Y_Out_BitEx Outputs data to output signals Y of the intelligent function module in units of bits.
Page 52 CCPU_Y_Out_BitEx
CCPU_Y_Out_WordEx Outputs data to output signals Y of the intelligent function module in units of 16 bits.
Page 53 CCPU_Y_Out_WordEx
CCPU_FromBuf Reads values stored in the buffer memory of the intelligent function module in units of 16 bits.
For details, refer to the following.
Page 96 CCPU_FromBuf
CCPU_ToBuf Writes values to the buffer memory of the intelligent function module in units of 16 bits.
For details, refer to the following.
Page 97 CCPU_ToBuf

5 OPERATING INTELLIGENT FUNCTION MODULES


5.3 Methods of Communication with Intelligent Function Modules 95
CCPU_FromBuf
This function reads data from the CPU buffer memory of the CPU module installed in the specified module position and the
buffer memory of the intelligent function module installed in the specified module position. (FROM instruction)

■Format
short CCPU_FromBuf (unsigned short usIoNo, unsigned long ulOffset, unsigned long ulSize, unsigned short* pusDataBuf,
unsigned long ulBufSize)

■Argument
Argument Name Description IN/OUT
usIoNo Module position Specify the module position. IN
Start I/O No.  16 (0H to FFH, 3E0H to 3E3H)
ulOffset Offset Specify the offset in units of words. IN
ulSize Data size Specify the read data size in units of words. IN
pusDataBuf Data storage location Specify the storage location of read data. OUT
ulBufSize Data storage size Specify the data storage location size in units of words. IN

■Description
• This communication method reads data amounting to the size specified by the data size (ulSize) from the CPU buffer
memory of the CPU module specified by the module position (usIoNo) and the buffer memory of the intelligent function
module specified by the module position (usIoNo), and stores that data in the data storage location (pusDataBuf).
• Read data by specifying the offset address from the start of the CPU buffer memory of the CPU module and the buffer
memory of the intelligent function module each for the offset (ulOffset).
• To access the CPU buffer memory of the multi-CPU (CPU No.1 to CPU No.4), specify 3E0H to 3E3H (CPU No.1 to CPU
No.4) for the module position (usloNo). However, the CPU buffer memory can be accessed only when the multiple CPU
settings are configured.

Precautions
For the data storage location size (ulBufSize), set a value larger than the value of the data size (ulSize).

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details on when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

5 OPERATING INTELLIGENT FUNCTION MODULES


96 5.3 Methods of Communication with Intelligent Function Modules
CCPU_ToBuf
This function writes data to the CPU buffer memory of the CPU module (host CPU module) installed in the specified module
position and the buffer memory of the intelligent function module installed in the specified module position. (TO instruction)

■Format
short CCPU_ToBuf (unsigned short usIoNo, unsigned long ulOffset, unsigned long ulSize, unsigned short* pusDataBuf,
unsigned long ulBufSize)

■Argument
Argument Name Description IN/OUT
usIoNo Module position Specify the module position as follows. IN
For the CPU buffer memory, access can be made to the host CPU module only.
Start I/O No.  16 (0H to FFH, 3E0H to 3E3H)
ulOffset Offset Specify the offset in units of words. IN
ulSize Data size Specify the write data size in units of words. IN
pusDataBuf Data storage location Specify the storage location of write data. IN 5
ulBufSize Data storage size Specify 0. IN

■Description
• This communication method writes data in the data storage location (pusDataBuf) amounting to the data size (ulSize) to the
CPU buffer memory of the CPU module (host CPU module) specified by the module position (usIoNo) and the buffer
memory of the intelligent function module specified by module position (usIoNo).
Write data by specifying the offset address from the start of the CPU buffer memory of the CPU module (host CPU module)
and the buffer memory of the intelligent function module each for the offset (ulOffset).
• To access the CPU buffer memory (host CPU module) of the multi-CPU (CPU No.1 to CPU No.4), specify 3E0H to 3E3H
(CPU No.1 to CPU No.4) for the module position (usloNo). However, the CPU buffer memory (host CPU module) can be
accessed only when the multiple CPU settings are configured.
• When the operating status of the CPU module is not RUN, an error in the STOP/PAUSE state (-28640) occurs if the
CCPU_ToBuf function is executed.

■Return value
Return value Description
0 (0000H) Normally finished
Other than 0 Failed
For details on when the function fails, refer to the following.
 MELSEC iQ-R C Controller Module Programming Manual

5 OPERATING INTELLIGENT FUNCTION MODULES


5.3 Methods of Communication with Intelligent Function Modules 97
5.4 Exercise Structure for Intelligent Function
Modules
Convert analog signals/digital data input by the input volume tab or digital switch of the demonstration machine using the
analog-digital converter module/digital-analog converter module.

D/A converter module


A/D converter module

R60 R60
R61P R12C AD4 DA4
CPU-V (16 (16
points) points)

X/Y00 X/Y10
to to
X/Y0F X/Y1F

CH1 CH1
V V

Input voltmeter (GOT) Output voltmeter (GOT)


Input volume

5 OPERATING INTELLIGENT FUNCTION MODULES


98 5.4 Exercise Structure for Intelligent Function Modules
5.5 Analog-Digital Converter Module R60AD4
Part names
This section describes the part names of the R60AD4.
For details, refer to the user's manual.
(1) (2)
(3)

(4)

(5)

(6)

No. Name Description


(1) RUN LED Indicates the operating status of the module.
On: Normal operation
Flashing (every 1s): In offset/gain setting mode
Flashing (every 400ms): Selecting a module for online module change
Off: 5V power supply turned off or watchdog timer error, ready to change modules during online module change
(2) ERR LED Indicates the module error occurrence status.*1
On: Error
Off: Normal operation
(3) ALM LED Indicates the module alarm status.*1
On: Warning (process alarm or rate alarm)
Flashing: Input signal error detected
Off: Normal operation
(4) Terminal block 18-point screw terminal block. Connect input signal wires of a device such as an external device.
(5) Terminal block cover Cover for preventing electric shocks when the power is turned on
(6) Production information Shows the production information (16 digits) of the module.
marking

*1 For details, refer to the following.


 MELSEC iQ-R Analog-Digital Converter Module User's Manual (Application)

5 OPERATING INTELLIGENT FUNCTION MODULES


5.5 Analog-Digital Converter Module R60AD4 99
A/D conversion characteristics

A/D conversion characteristics for voltage input


(When the input range setting is -10 to 10V.)
32000
16004

16003
Digital output value

16002

Digital output
0 16001

16000
312.5μV

5.0000000V

5.0003125V
-32000
-10V 0 10V
Analog input voltage
Input voltage

The analog-digital converter module converts analog inputs from outside into digital quantities to make arithmetic operation by
the CPU possible. For voltage input, when -10V is input, a digital quantity of -32000 is output, and when 10V is input, 32000 is
output. Therefore, an input of 312.5V is equivalent to a digital quantity of 1, and a value smaller than 312.5V, which cannot
be converted, is discarded.

A/D conversion characteristics for current input


(When the input range setting is 0 to 20mA.)
32000
16005
16004
Digital output value

16003
Digital output

16002
16001
0 16000
625nA
10.000000mA

10.000625mA

-32000
-20 mA 0 20mA Input current
Analog input current
For current input, when 0mA is input, 0 is output, and when 20mA is input, 32000 is output. 625nA is equivalent to a digital
quantity of 1, and a value smaller than 625nA, which cannot be converted, is discarded.

A voltage/current value equivalent to the digital value 1 in A/D conversion (maximum resolution) differs
depending on the input range setting.

5 OPERATING INTELLIGENT FUNCTION MODULES


100 5.5 Analog-Digital Converter Module R60AD4
List of I/O signals and buffer memory area assignment

List of I/O signals


The following tables list the I/O signals of the analog-digital converter module.

• The I/O numbers (X/Y) below indicate numbers when the start I/O number of the A/D converter module is
set to 0.
• The use-prohibited signals below are used by the system, and cannot be used by the customer. If the
customer uses any of them (turns from off to on), the function as the A/D converter module cannot be
guaranteed.

■Input signal
Device No. Signal name
X0 Module READY
5
X1 to X7 Use prohibited
X8 Warning output signal
X9 Operating condition setting completion flag
XA Offset/gain setting mode status flag
XB Channel change completed flag
XC Input signal error detection signal
XD Maximum value/minimum value reset completed flag
XE A/D conversion completed flag
XF Error flag

■Output signal
Device No. Signal name
Y0 to Y8 Use prohibited
Y9 Operating condition setting request
YA User range write request
YB Channel change request
YC Use prohibited
YD Maximum value/minimum value reset request
YE Use prohibited
YF Error clear request

5 OPERATING INTELLIGENT FUNCTION MODULES


5.5 Analog-Digital Converter Module R60AD4 101
Buffer memory area assignment
Two types are available: R mode, in which the module operates according to the map of the buffer memory areas newly
assigned by the MELSEC iQ-R series, and Q compatible mode, in which the module operates by converting the buffer
memory map into an equivalent of the buffer memory map of the MELSEC-Q series.
Below are lists of buffer memory addresses when the R mode is used.
For details, refer to the following.
 MELSEC iQ-R Analog-Digital Converter Module User's Manual (Application)

Of all the buffer memory areas, do not write data to system areas and areas whose data type is monitor. If
data is written to them, malfunction may occur.

■Un\G0~Un\G399
Address Address Name Default value Data type Auto Necessity of
(decimal) (hexadecimal) refresh Y9*1
0 0H Latest error code 0 Monitor  
1 1H Latest address of error history 0 Monitor  
2 2H Latest alarm code 0 Monitor  
3 3H Latest address of alarm history 0 Monitor  
4 to 19 4H to 13H Interrupt factor detection flag [n]*2 0 Monitor  
20 to 35 14H to 23H System area    
36 24H Warning output flag (process alarm upper 0000H Monitor  
limit)
37 25H Warning output flag (process alarm lower 0000H Monitor  
limit)
38 26H Warning output flag (rate alarm upper limit) 0000H Monitor  
39 27H Warning output flag (rate alarm lower limit) 0000H Monitor  
40 28H Input signal error detection flag 0000H Monitor  
41 29H System area 0000H   
42 2AH A/D conversion completed flag 0000H Monitor  
43 to 89 2BH to 59H System area    
90 5AH Level data 0 0 Control  
91 5BH Level data 1 0 Control  
92 5CH Level data 2 0 Control  
93 5DH Level data 3 0 Control  
94 5EH Level data 4 0 Control  
95 5FH Level data 5 0 Control  
96 60H Level data 6 0 Control  
97 61H Level data 7 0 Control  
98 62H Level data 8 0 Control  
99 63H Level data 9 0 Control  
100 to 123 64H to 7BH System area    
124 to 139 7CH to 8BH Interrupt factor mask [n]*2 0 Control  
140 to 155 8CH to 9BH System area    
156 to 171 9CH to ABH Interrupt factor reset request [n]*2 0 Control  
172 to 199 ACH to C7H System area    
200 to 215 C8H to D7H Interrupt factor occurrence setting [n]*2 0 Setting  
216 to 231 D8H to E7H System area    
232 to 247 E8H to F7H Condition target setting [n]*2 0 Setting  
248 to 263 F8H to 107H System area    
264 to 279 108H to 117H Condition target channel setting [n]*2 0 Setting  
280 to 295 118H to 127H System area    
296, 297 128H, 129H Mode switching setting 0 Setting  
298 to 399 12AH to 18FH System area    

5 OPERATING INTELLIGENT FUNCTION MODULES


102 5.5 Analog-Digital Converter Module R60AD4
*1 Item enabled when 'Operating condition setting request' (Y9) turns on and off
*2 [n] in the table is an interrupt setting number. (n= 1 to 16)

5 OPERATING INTELLIGENT FUNCTION MODULES


5.5 Analog-Digital Converter Module R60AD4 103
■Un\G400~Un\G3599
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
400 600 800 1000 1200 1400 1600 1800 CH Digital output 0 Monitor  
(190H) (258H) (320H) (3E8H) (4B0H) (578H) (640H) (708H) value
401 601 801 1001 1201 1401 1601 1801 System area    
(191H) (259H) (321H) (3E9H) (4B1H) (579H) (641H) (709H)
402 602 802 1002 1202 1402 1602 1802 CH Digital operation 0 Monitor  
(192H) (25AH) (322H) (3EAH) (4B2H) (57AH) (642H) (70AH) value
403 603 803 1003 1203 1403 1603 1803 System area    
(193H) (25BH) (323H) (3EBH) (4B3H) (57BH) (643H) (70BH)
404 604 804 1004 1204 1404 1604 1804 CH Maximum value 0 Monitor  
(194H) (25CH) (324H) (3ECH) (4B4H) (57CH) (644H) (70CH)
405 605 805 1005 1205 1405 1605 1805 System area    
(195H) (25DH) (325H) (3EDH) (4B5H) (57DH) (645H) (70DH)
406 606 806 1006 1206 1406 1606 1806 CH Minimum value 0 Monitor  
(196H) (25EH) (326H) (3EEH) (4B6H) (57EH) (646H) (70EH)
407 607 807 1007 1207 1407 1607 1807 System area    
(197H) (25FH) (327H) (3EFH) (4B7H) (57FH) (647H) (70FH)
408 608 808 1008 1208 1408 1608 1808 CH Difference 0 Monitor  
(198H) (260H) (328H) (3F0H) (4B8H) (580H) (648H) (710H) conversion status flag
409 609 809 1009 1209 1409 1609 1809 CH Logging hold flag 0 Monitor  
(199H) (261H) (329H) (3F1H) (4B9H) (581H) (649H) (711H)
410 to 610 to 810 to 1010 to 1210 to 1410 to 1610 to 1810 to System area    
429 629 829 1029 1229 1429 1629 1829
(19AH (262H (32AH (3F2H (4BAH (582H (64AH (712H
to to to to to to to to
1ADH) 275H) 33DH) 405H) 4CDH) 595H) 65DH) 725H)
430 630 830 1030 1230 1430 1630 1830 CH Range setting 0000H Monitor  
(1AEH) (276H) (33EH) (406H) (4CEH) (596H) (65EH) (726H) monitor
431 631 831 1031 1231 1431 1631 1831 System area    
(1AFH) (277H) (33FH) (407H) (4CFH) (597H) (65FH) (727H)
432 632 832 1032 1232 1432 1632 1832 CH Difference 0000H Monitor  
(1B0H) (278H) (340H) (408H) (4D0H) (598H) (660H) (728H) conversion reference
value
433 633 833 1033 1233 1433 1633 1833 System area    
(1B1H) (279H) (341H) (409H) (4D1H) (599H) (661H) (729H)
434 634 834 1034 1234 1434 1634 1834 CH Head pointer 0 Monitor  
(1B2H) (27AH) (342H) (40AH) (4D2H) (59AH) (662H) (72AH)
435 635 835 1035 1235 1435 1635 1835 CH Latest pointer 0 Monitor  
(1B3H) (27BH) (343H) (40BH) (4D3H) (59BH) (663H) (72BH)
436 636 836 1036 1236 1436 1636 1836 CH Number of 0 Monitor  
(1B4H) (27CH) (344H) (40CH) (4D4H) (59CH) (664H) (72CH) logging data
437 637 837 1037 1237 1437 1637 1837 CH Trigger pointer 0 Monitor  
(1B5H) (27DH) (345H) (40DH) (4D5H) (59DH) (665H) (72DH)
438 638 838 1038 1238 1438 1638 1838 CH Current logging -1 Monitor  
(1B6H) (27EH) (346H) (40EH) (4D6H) (59EH) (666H) (72EH) read pointer
439 639 839 1039 1239 1439 1639 1839 CH Previous logging -1 Monitor  
(1B7H) (27FH) (347H) (40FH) (4D7H) (59FH) (667H) (72FH) read pointer
440 640 840 1040 1240 1440 1640 1840 CH Logging read 0 Monitor  
(1B8H) (280H) (348H) (410H) (4D8H) (5A0H) (668H) (730H) points monitor value
441 641 841 1041 1241 1441 1641 1841 CH Logging cycle 0 Monitor  
(1B9H) (281H) (349H) (411H) (4D9H) (5A1H) (669H) (731H) monitor value (s)
442 642 842 1042 1242 1442 1642 1842 CH Logging cycle 0 Monitor  
(1BAH) (282H) (34AH) (412H) (4DAH) (5A2H) (66AH) (732H) monitor value (ms)
443 643 843 1043 1243 1443 1643 1843 CH Logging cycle 0 Monitor  
(1BBH) (283H) (34BH) (413H) (4DBH) (5A3H) (66BH) (733H) monitor value (s)
444 644 844 1044 1244 1444 1644 1844 CH Trigger 0 Monitor  
(1BCH) (284H) (34CH) (414H) (4DCH) (5A4H) (66CH) (734H) occurrence time (first/
last two digits of the
year)

5 OPERATING INTELLIGENT FUNCTION MODULES


104 5.5 Analog-Digital Converter Module R60AD4
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
445 645 845 1045 1245 1445 1645 1845 CH Trigger 0 Monitor  
(1BDH) (285H) (34DH) (415H) (4DDH) (5A5H) (66DH) (735H) occurrence time
(month/day)
446 646 846 1046 1246 1446 1646 1846 CH Trigger 0 Monitor  
(1BEH) (286H) (34EH) (416H) (4DEH) (5A6H) (66EH) (736H) occurrence time (hour/
minute)
447 647 847 1047 1247 1447 1647 1847 CH Trigger 0 Monitor  
(1BFH) (287H) (34FH) (417H) (4DFH) (5A7H) (66FH) (737H) occurrence time
(second/day of week)
448 648 848 1048 1248 1448 1648 1848 CH Trigger 0 Monitor  
(1C0H) (288H) (350H) (418H) (4E0H) (5A8H) (670H) (738H) occurrence time
(millisecond)
449 to 649 to 849 to 1049 to 1249 to 1449 to 1649 to 1849 to System area    
469 669 869 1069 1269 1469 1669 1869
(1C1H
to
(289H
to
(351H
to
(419H
to
(4E1H
to
(5A9H
to
(671H
to
(739H
to 5
1D5H) 29DH) 365H) 42DH) 4F5H) 5BDH) 685H) 74DH)
470 670 870 1070 1270 1470 1670 1870 CH Difference 0 Control  
(1D6H) (29EH) (366H) (42EH) (4F6H) (5BEH) (686H) (74EH) conversion trigger
471 671 871 1071 1271 1471 1671 1871 CH Logging hold 0 Control  
(1D7H) (29FH) (367H) (42FH) (4F7H) (5BFH) (687H) (74FH) request
472 672 872 1072 1272 1472 1672 1872 CH Conversion value 0 Control  
(1D8H) (2A0H) (368H) (430H) (4F8H) (5C0H) (688H) (750H) shift amount
473 to 673 to 873 to 1073 to 1273 to 1473 to 1673 to 1873 to System area    
499 699 899 1099 1299 1499 1699 1899
(1D9H (2A1H (369H (431H (4F9H (5C1H (689H (751H
to to to to to to to to
1F3H) 2BBH) 383H) 44BH) 513H) 5DBH) 6A3H) 76BH)
500 700 900 1100 1300 1500 1700 1900 CH A/D conversion 0 Setting  
(1F4H) (2BCH) (384H) (44CH) (514H) (5DCH) (6A4H) (76CH) enable/disable setting
501 701 901 1101 1301 1501 1701 1901 CH Average process 0 Setting  
(1F5H) (2BDH) (385H) (44DH) (515H) (5DDH) (6A5H) (76DH) specification
502 702 902 1102 1302 1502 1702 1902 CH Time (for 0 Setting  
(1F6H) (2BEH) (386H) (44EH) (516H) (5DEH) (6A6H) (76EH) averaging)/count (for
averaging)/moving
average/primary delay
filter constant setting
503 703 903 1103 1303 1503 1703 1903 System area    
(1F7H) (2BFH) (387H) (44FH) (517H) (5DFH) (6A7H) (76FH)
504 704 904 1104 1304 1504 1704 1904 CH Scaling enable/ 1 Setting  
(1F8H) (2C0H) (388H) (450H) (518H) (5E0H) (6A8H) (770H) disable setting
505 705 905 1105 1305 1505 1705 1905 System area    
(1F9H) (2C1H) (389H) (451H) (519H) (5E1H) (6A9H) (771H)
506 706 906 1106 1306 1506 1706 1906 CH Scaling upper 0 Setting  
(1FAH) (2C2H) (38AH) (452H) (51AH) (5E2H) (6AAH) (772H) limit value
507 707 907 1107 1307 1507 1707 1907 System area    
(1FBH) (2C3H) (38BH) (453H) (51BH) (5E3H) (6ABH) (773H)
508 708 908 1108 1308 1508 1708 1908 CH Scaling lower 0 Setting  
(1FCH) (2C4H) (38CH) (454H) (51CH) (5E4H) (6ACH) (774H) limit value
509 709 909 1109 1309 1509 1709 1909 System area    
(1FDH) (2C5H) (38DH) (455H) (51DH) (5E5H) (6ADH) (775H)
510 710 910 1110 1310 1510 1710 1910 CH Digital clipping 1 Setting  
(1FEH) (2C6H) (38EH) (456H) (51EH) (5E6H) (6AEH) (776H) enable/disable setting
511 711 911 1111 1311 1511 1711 1911 System area    
(1FFH) (2C7H) (38FH) (457H) (51FH) (5E7H) (6AFH) (777H)
512 712 912 1112 1312 1512 1712 1912 CH Alert output 1 Setting  
(200H) (2C8H) (390H) (458H) (520H) (5E8H) (6B0H) (778H) setting (process alarm)
513 713 913 1113 1313 1513 1713 1913 CH Alert output 1 Setting  
(201H) (2C9H) (391H) (459H) (521H) (5E9H) (6B1H) (779H) setting (rate alarm)
514 714 914 1114 1314 1514 1714 1914 CH Process alarm 0 Setting  
(202H) (2CAH) (392H) (45AH) (522H) (5EAH) (6B2H) (77AH) upper upper limit value

5 OPERATING INTELLIGENT FUNCTION MODULES


5.5 Analog-Digital Converter Module R60AD4 105
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
515 715 915 1115 1315 1515 1715 1915 System area    
(203H) (2CBH) (393H) (45BH) (523H) (5EBH) (6B3H) (77BH)
516 716 916 1116 1316 1516 1716 1916 CH Process alarm 0 Setting  
(204H) (2CCH) (394H) (45CH) (524H) (5ECH) (6B4H) (77CH) upper lower limit value
517 717 917 1117 1317 1517 1717 1917 System area    
(205H) (2CDH) (395H) (45DH) (525H) (5EDH) (6B5H) (77DH)
518 718 918 1118 1318 1518 1718 1918 CH Process alarm 0 Setting  
(206H) (2CEH) (396H) (45EH) (526H) (5EEH) (6B6H) (77EH) lower upper limit value
519 719 919 1119 1319 1519 1719 1919 System area    
(207H) (2CFH) (397H) (45FH) (527H) (5EFH) (6B7H) (77FH)
520 720 920 1120 1320 1520 1720 1920 CH Process alarm 0 Setting  
(208H) (2D0H) (398H) (460H) (528H) (5F0H) (6B8H) (780H) lower lower limit value
521 721 921 1121 1321 1521 1721 1921 System area    
(209H) (2D1H) (399H) (461H) (529H) (5F1H) (6B9H) (781H)
522 722 922 1122 1322 1522 1722 1922 CH Rate alarm alert 0 Setting  
(20AH) (2D2H) (39AH) (462H) (52AH) (5F2H) (6BAH) (782H) detection cycle setting
523 723 923 1123 1323 1523 1723 1923 System area    
(20BH) (2D3H) (39BH) (463H) (52BH) (5F3H) (6BBH) (783H)
524 724 924 1124 1324 1524 1724 1924 CH Rate alarm upper 0 Setting  
(20CH) (2D4H) (39CH) (464H) (52CH) (5F4H) (6BCH) (784H) limit value
525 725 925 1125 1325 1525 1725 1925 System area    
(20DH) (2D5H) (39DH) (465H) (52DH) (5F5H) (6BDH) (785H)
526 726 926 1126 1326 1526 1726 1926 CH Rate alarm lower 0 Setting  
(20EH) (2D6H) (39EH) (466H) (52EH) (5F6H) (6BEH) (786H) limit value
527 727 927 1127 1327 1527 1727 1927 System area    
(20FH) (2D7H) (39FH) (467H) (52FH) (5F7H) (6BFH) (787H)
528 728 928 1128 1328 1528 1728 1928 CH Input signal error 0 Setting  
(210H) (2D8H) (3A0H) (468H) (530H) (5F8H) (6C0H) (788H) detection setting
529 729 929 1129 1329 1529 1729 1929 CH Input signal error 50 Setting  
(211H) (2D9H) (3A1H) (469H) (531H) (5F9H) (6C1H) (789H) detection setting value
530 to 730 to 930 to 1130 to 1330 to 1530 to 1730 to 1930 to System area    
534 734 934 1134 1334 1534 1734 1934
(212H (2DAH (3A2H (46AH (532H (5FAH (6C2H (78AH
to to to to to to to to
216H) 2DEH) 3A6H) 46EH) 536H) 5FEH) 6C6H) 78EH)
535 735 935 1135 1335 1535 1735 1935 CH Logging enable/ 1 Setting  
(217H) (2DFH) (3A7H) (46FH) (537H) (5FFH) (6C7H) (78FH) disable setting
536 736 936 1136 1336 1536 1736 1936 CH Logging data 1 Setting  
(218H) (2E0H) (3A8H) (470H) (538H) (600H) (6C8H) (790H) setting
537 737 937 1137 1337 1537 1737 1937 CH Logging cycle 4 Setting  
(219H) (2E1H) (3A9H) (471H) (539H) (601H) (6C9H) (791H) setting value
538 738 938 1138 1338 1538 1738 1938 CH Logging cycle 1 Setting  
(21AH) (2E2H) (3AAH) (472H) (53AH) (602H) (6CAH) (792H) unit specification
539 739 939 1139 1339 1539 1739 1939 CH Post-trigger 5000 Setting  
(21BH) (2E3H) (3ABH) (473H) (53BH) (603H) (6CBH) (793H) logging points
540 740 940 1140 1340 1540 1740 1940 CH Level trigger 0 Setting  
(21CH) (2E4H) (3ACH) (474H) (53CH) (604H) (6CCH) (794H) condition setting
*2
541 741 941 1141 1341 1541 1741 1941 CH Trigger data Setting  
(21DH) (2E5H) (3ADH) (475H) (53DH) (605H) (6CDH) (795H)
542 742 942 1142 1342 1542 1742 1942 CH Trigger setting 0 Setting  
(21EH) (2E6H) (3AEH) (476H) (53EH) (606H) (6CEH) (796H) value
543 743 943 1143 1343 1543 1743 1943 System area    
(21FH) (2E7H) (3AFH) (477H) (53FH) (607H) (6CFH) (797H)
544 744 944 1144 1344 1544 1744 1944 CH Read interrupt 1 Setting  
(220H) (2E8H) (3B0H) (478H) (540H) (608H) (6D0H) (798H) enable/disable setting
545 745 945 1145 1345 1545 1745 1945 CH Logging read 1000 Setting  
(221H) (2E9H) (3B1H) (479H) (541H) (609H) (6D1H) (799H) points setting value

5 OPERATING INTELLIGENT FUNCTION MODULES


106 5.5 Analog-Digital Converter Module R60AD4
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
546 to 746 to 946 to 1146 to 1346 to 1546 to 1746 to 1946 to System area    
597 797 997 1197 1397 1597 1797 1997
(222H (2EAH (3B2H (47AH (542H (60AH (6D2 to (79AH
to to to to to to 705H) to
255H) 31DH) 3E5H) 4ADH) 575H) 63DH) 7CDH)
598 798 998 1198 1398 1598 1798 1998 CH Range setting 0 Setting  
(256H) (31EH) (3E6H) (4AEH) (576H) (63EH) (706H) (7CEH)
599 799 999 1199 1399 1599 1799 1999 System area    
(257H) (31FH) (3E7H) (4AFH) (577H) (63FH) (707H) (7CFH)
2000 to 3599
(7D0H to E0FH)

*1 Item enabled when 'Operating condition setting request' (Y9) turns on and off
*2 The default values are as follows.
CH1: 402, CH2: 602, CH3: 802, CH4: 1002, CH5: 1202, CH6: 1402, CH7: 1602, CH8: 1802
5

5 OPERATING INTELLIGENT FUNCTION MODULES


5.5 Analog-Digital Converter Module R60AD4 107
Setting intelligent function module data
This section describes how to set data of intelligent function modules.
By adding an intelligent function module to a project, data of an intelligent function module (such as parameters and switch
settings) can be set.

Operating procedure
1. [Parameter] in the Navigation window  [Module
Information]  double-click [0000: R60AD4].

1. Double-click!

2. Select "Basic Settings" from the list of setting


items.

3. Set "Basic Settings" as follows.


[Setting details]
Input range setting (CH1): 0 to 10V
2. Select! A/D conversion enable/disable setting (CH2 to
3. Set! CH4): A/D conversion disable

4. [Project] on the menu  [Intelligent Function


Module]  click [Module Parameter List].

4. Click!

5 OPERATING INTELLIGENT FUNCTION MODULES


108 5.5 Analog-Digital Converter Module R60AD4
5. In the Module Parameter List window, check that
the checkbox for "Setting Exist" for the initial
setting for R60AD4 is selected.

6. Click the [Close] button.

5. Check!

6. Click!

5 OPERATING INTELLIGENT FUNCTION MODULES


5.5 Analog-Digital Converter Module R60AD4 109
5.6 Digital-Analog Converter Module R60DA4
Part names
This section describes the part names of the R60DA4.
For details, refer to the user's manual.
(1) (2)
(3)

(4)

(5)

(6)

No. Name Description


(1) RUN LED Indicates the operating status of the module.
On: Normal operation
Flashing (every 1s): In offset/gain setting mode
Flashing (every 400ms): Selecting a module for online module change
Off: 5V power supply turned off or watchdog timer error, ready to change modules during online module change
(2) ERR LED Indicate the module error occurrence status.*1
On: Error
Off: Normal operation
(3) ALM LED Indicate the module alarm status.*1
On: Warning output generated
Off: Normal operation
(4) Terminal block 18-point screw terminal block. Connect output signal wires of a device such as an external device.
(5) Terminal block cover Cover for preventing electric shocks when the power is turned on
(6) Production information Shows the production information (16 digits) of the module.
marking

*1 For details, refer to the following.


 MELSEC iQ-R Digital-Analog Converter Module User's Manual (Application)

5 OPERATING INTELLIGENT FUNCTION MODULES


110 5.6 Digital-Analog Converter Module R60DA4
D/A conversion characteristics

D/A conversion characteristics for voltage output


(When the output range setting is -10V to 10V.)
10V
Analog output voltage

Analog output voltage


0

5.0003125V
312.5μV
5.0000000V

-10V
5

16000

16001

16002

16003

16004
-32000 0 32000
Digital input value
Digital input
The digital-analog converter module converts digital quantities output from the CPU into analog values to output them
externally. When a digital quantity of -32000 is input, -10V is output, and when a digital quantity of 32000 is input, 10V is
output. Therefore, the digital input value 1 is equivalent to the analog amount 312.5V, and a digital input smaller than 1
cannot be converted.

D/A conversion characteristics for current output


(When the output range setting is 0 to 20mA.)
20mA
Analog output current

Analog output current

0
10.000625mA

625nA

10.000000mA
16000

16001

16002

16003

-20mA
-32000 0 32000
Digital input value
Input
For current output, 0 is converted to 0mA, and 32000 is converted to 20mA. The digital input value 1 is equivalent to the
analog amount 625nA, and a digital input smaller than 1 cannot be converted.

A voltage/current value equivalent to the digital value 1 in D/A conversion (maximum resolution) differs
depending on the input range setting.

5 OPERATING INTELLIGENT FUNCTION MODULES


5.6 Digital-Analog Converter Module R60DA4 111
List of I/O signals and buffer memory area assignment

List of I/O signals


The following tables list the I/O signals for the digital-analog converter module.

• The I/O signals (X/Y) below indicate signals when the start I/O number of the D/A converter module is set to
0.
• The use-prohibited signals below are used by the system, and cannot be used by the customer. If the
customer uses any of them (turns from off to on), the function as the D/A converter module cannot be
guaranteed.

■Input signal
Device No. Signal name
X0 Module READY
X1 to X6 Use prohibited
X7 External power supply READY flag
X8 Use prohibited
X9 Operating condition setting completion flag
XA Offset/gain setting mode status flag
XB Channel change completed flag
XC Set value change completed flag
XD Disconnection detection signal
XE Warning output signal
XF Error flag

■Output signal
Device No. Signal name
Y0 Use prohibited
Y1 CH1 Output enable/disable flag
Y2 CH2 Output enable/disable flag
Y3 CH3 Output enable/disable flag
Y4 CH4 Output enable/disable flag
Y5*1 CH5 Output enable/disable flag
Y6*1 CH6 Output enable/disable flag
Y7*1 CH7 Output enable/disable flag
Y8*1 CH8 Output enable/disable flag
Y9 Operating condition setting request
YA User range write request
YB Channel change request
YC Value change request
YD Use prohibited
YE Warning output clear request
YF Error clear request

*1 For the R60DA4, Y5 to Y8 are use prohibited.

5 OPERATING INTELLIGENT FUNCTION MODULES


112 5.6 Digital-Analog Converter Module R60DA4
Buffer memory area assignment
Two types are available: R mode, in which the module operates according to the map of the buffer memory areas newly
assigned by the MELSEC iQ-R series, and Q compatible mode, in which the module operates by converting the buffer
memory map into an equivalent of the buffer memory map of the MELSEC-Q series.
Below are lists of buffer memory addresses when the R mode is used.
For details, refer to the following.
 MELSEC iQ-R Digital-Analog Converter Module User's Manual (Application)

Of all the buffer memory areas, do not write data to system areas and areas whose data type is monitor. If
data is written to them, malfunction may occur.

■Un\G0~Un\G399
Address Address Name Default value Data type Auto Necessity of
(decimal) (hexadecimal) refresh Y9*1 5
0 0H Latest error code 0 Monitor  
1 1H Latest address of error history 0 Monitor  
2 2H Latest alarm code 0 Monitor  
3 3H Latest address of alarm history 0 Monitor  
4 to 19 4H to 13H Interrupt factor detection flag [n]*2 0 Monitor  
20 to 35 14H to 23H System area    
36 24H Alert output upper limit flag 0000H Monitor  
37 25H Alert output lower limit flag 0000H Monitor  
38 26H Disconnection detection flag 0000H Monitor  
39 to 59 27H to 3BH System area    
60 3CH Output mode 0000H Monitor  
61 to 123 3DH to 7BH System area    
124 to 139 7CH to 8BH Interrupt factor mask [n]*2 0 Control  
140 to 155 8CH to 9BH System area    
156 to 171 9CH to ABH Interrupt factor reset request [n]*2 0 Control  
172 to 187 ACH to BBH System area    
188 BCH Step action wave output request 0 Control  
189 to 199 BDH to C7H System area    
*2
200 to 215 C8H to D7H Interrupt factor generation setting [n] 0 Setting  
216 to 231 D8H to E7H System area    
232 to 247 E8H to F7H Condition target setting [n]*2 0 Setting  
248 to 263 F8H to 107H System area    
264 to 279 108H to 117H Condition target channel setting [n]*2 0 Setting  
280 to 295 118H to 127H System area    
296, 297 128H, 129H Mode switching setting 0 Setting  
298 to 399 12AH to 18FH System area    

*1 Item enabled when 'Operating condition setting request' (Y9) turns on and off
*2 [n] in the table is an interrupt setting number. (n= 1 to 16)

5 OPERATING INTELLIGENT FUNCTION MODULES


5.6 Digital-Analog Converter Module R60DA4 113
■Un\G400 to Un\G3599
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
400 600 800 1000 1200 1400 1600 1800 CH Setting value check 0 Monitor  
(190H) (258H) (320H) (3E8H) (4B0H) (578H) (640H) (708H) code
401 601 801 1001 1201 1401 1601 1801 CH Wave output status 0 Monitor  
(191H) (259H) (321H) (3E9H) (4B1H) (579H) (641H) (709H) monitor
402 to 602 to 802 to 1002 to 1202 to 1402 to 1602 to 1802 to System area    
429 629 829 1029 1229 1429 1629 1829
(192H (25AH (322H (3EAH (4B2H (57AH (642H (70AH
to to to to to to to to
1ADH) 275H) 33DH) 405H) 4CDH) 595H) 65DH) 725H)
430 630 830 1030 1230 1430 1630 1830 CH Range setting 0 Monitor  
(1AEH) (276H) (33EH) (406H) (4CEH) (596H) (65EH) (726H) monitor

431 631 831 1031 1231 1431 1631 1831 CH HOLD/CLEAR 0 Monitor  
(1AFH) (277H) (33FH) (407H) (4CFH) (597H) (65FH) (727H) function setting monitor
432 632 832 1032 1232 1432 1632 1832 CH Wave output 0 Monitor  
(1B0H) (278H) (340H) (408H) (4D0H) (598H) (660H) (728H) conversion cycle monitor
(L)
433 633 833 1033 1233 1433 1633 1833 CH Wave output Monitor  
(1B1H) (279H) (341H) (409H) (4D1H) (599H) (661H) (729H) conversion cycle monitor
(H)
434 634 834 1034 1234 1434 1634 1834 CH Wave pattern output 0 Monitor  
(1B2H) (27AH) (342H) (40AH) (4D2H) (59AH) (662H) (72AH) count monitor
435 635 835 1035 1235 1435 1635 1835 System area    
(1B3H) (27BH) (343H) (40BH) (4D3H) (59BH) (663H) (72BH)
436 636 836 1036 1236 1436 1636 1836 CH Wave output current 0 Monitor  
(1B4H) (27CH) (344H) (40CH) (4D4H) (59CH) (664H) (72CH) address monitor (L)
437 637 837 1037 1237 1437 1637 1837 CH Wave output current Monitor  
(1B5H) (27DH) (345H) (40DH) (4D5H) (59DH) (665H) (72DH) address monitor (H)
438 638 838 1038 1238 1438 1638 1838 CH Wave output current 0 Monitor  
(1B6H) (27EH) (346H) (40EH) (4D6H) (59EH) (666H) (72EH) digital value monitor
439 639 839 1039 1239 1439 1639 1839 System area    
(1B7H) (27FH) (347H) (40FH) (4D7H) (59FH) (667H) (72FH)
440 640 840 1040 1240 1440 1640 1840 CH Wave output digital 0 Monitor  
(1B8H) (280H) (348H) (410H) (4D8H) (5A0H) (668H) (730H) value out-of-range
address monitor (L)
441 641 841 1041 1241 1441 1641 1841 CH Wave output digital Monitor  
(1B9H) (281H) (349H) (411H) (4D9H) (5A1H) (669H) (731H) value out-of-range
address monitor (H)
442 642 842 1042 1242 1442 1642 1842 CH Wave output 0 Monitor  
(1BAH) (282H) (34AH) (412H) (4DAH) (5A2H) (66AH) (732H) warning address monitor
(L)
443 643 843 1043 1243 1443 1643 1843 CH Wave output Monitor  
(1BBH) (283H) (34BH) (413H) (4DBH) (5A3H) (66BH) (733H) warning address monitor
(H)
444 to 644 to 844 to 1044 to 1244 to 1444 to 1644 to 1844 to System area    
459 659 859 1059 1259 1459 1659 1859
(1BCH (284H (34CH (414H (4DCH (5A4H (66CH (734H
to to to to to to to to
1CBH) 293H) 35BH) 423H) 4EBH) 5B3H) 67BH) 743H)
460 660 860 1060 1260 1460 1660 1860 CH Digital value 0 Control  
(1CCH) (294H) (35CH) (424H) (4ECH) (5B4H) (67CH) (744H)
461 661 861 1061 1261 1461 1661 1861 System area    
(1CDH) (295H) (35DH) (425H) (4EDH) (5B5H) (67DH) (745H)
462 662 862 1062 1262 1462 1662 1862 CH Wave output start/ 0 Control  
(1CEH) (296H) (35EH) (426H) (4EEH) (5B6H) (67EH) (746H) stop request
463 to 663 to 863 to 1063 to 1263 to 1463 to 1663 to 1863 to System area    
479 679 879 1079 1279 1479 1679 1879
(1CFH (297H (35FH (427H (4EFH (5B7H (67FH (747H
to to to to to to to to
1DFH) 2A7H) 36FH) 437H) 4FFH) 5C7H) 68FH) 757H)

5 OPERATING INTELLIGENT FUNCTION MODULES


114 5.6 Digital-Analog Converter Module R60DA4
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
480 680 880 1080 1280 1480 1680 1880 CH Input value shift 0 Control  
(1E0H) (2A8H) (370H) (438H) (500H) (5C8H) (690H) (758H) amount
481 681 881 1081 1281 1481 1681 1881 System area    
(1E1H) (2A9H) (371H) (439H) (501H) (5C9H) (691H) (759H)
482 682 882 1082 1282 1482 1682 1882 CH Wave output step 0 Control  
(1E2H) (2AAH) (372H) (43AH) (502H) (5CAH) (692H) (75AH) action movement amount
483 to 683 to 883 to 1083 to 1283 to 1483 to 1683 to 1883 to System area    
499 699 899 1099 1299 1499 1699 1899
(1E3H (2ABH (373H (43BH (503H (5CBH (693H (75BH
to to to to to to to to
1F3H) 2BBH) 383H) 44BH) 513H) 5DBH) 6A3H) 76BH)
500 700 900 1100 1300 1500 1700 1900 CH D/A conversion 1 Setting  
(1F4H) (2BCH) (384H) (44CH) (514H) (5DCH) (6A4H) (76CH) enable/disable setting
501 701 901 1101 1301 1501 1701 1901 System area    
(1F5H) (2BDH) (385H) (44DH) (515H) (5DDH) (6A5H) (76DH)
5
502 702 902 1102 1302 1502 1702 1902 CH Scaling enable/ 1 Setting  
(1F6H) (2BEH) (386H) (44EH) (516H) (5DEH) (6A6H) (76EH) disable setting
503 703 903 1103 1303 1503 1703 1903 System area    
(1F7H) (2BFH) (387H) (44FH) (517H) (5DFH) (6A7H) (76FH)
504 704 904 1104 1304 1504 1704 1904 CH Scaling upper limit 0 Setting  
(1F8H) (2C0H) (388H) (450H) (518H) (5E0H) (6A8H) (770H) value
505 705 905 1105 1305 1505 1705 1905 System area    
(1F9H) (2C1H) (389H) (451H) (519H) (5E1H) (6A9H) (771H)
506 706 906 1106 1306 1506 1706 1906 CH Scaling lower limit 0 Setting  
(1FAH) (2C2H) (38AH) (452H) (51AH) (5E2H) (6AAH) (772H) value
507 707 907 1107 1307 1507 1707 1907 System area    
(1FBH) (2C3H) (38BH) (453H) (51BH) (5E3H) (6ABH) (773H)
508 708 908 1108 1308 1508 1708 1908 CH Alert output setting 1 Setting  
(1FCH) (2C4H) (38CH) (454H) (51CH) (5E4H) (6ACH) (774H)
509 709 909 1109 1309 1509 1709 1909 CH Rate control enable/ 1 Setting  
(1FDH) (2C5H) (38DH) (455H) (51DH) (5E5H) (6ADH) (775H) disable setting
510 710 910 1110 1310 1510 1710 1910 CH Alert output upper 0 Setting  
(1FEH) (2C6H) (38EH) (456H) (51EH) (5E6H) (6AEH) (776H) limit value
511 711 911 1111 1311 1511 1711 1911 System area    
(1FFH) (2C7H) (38FH) (457H) (51FH) (5E7H) (6AFH) (777H)
512 712 912 1112 1312 1512 1712 1912 CH Alert output lower 0 Setting  
(200H) (2C8H) (390H) (458H) (520H) (5E8H) (6B0H) (778H) limit value
513 713 913 1113 1313 1513 1713 1913 System area    
(201H) (2C9H) (391H) (459H) (521H) (5E9H) (6B1H) (779H)
514 714 914 1114 1314 1514 1714 1914 CH Increase digital limit 64000 Setting  
(202H) (2CAH) (392H) (45AH) (522H) (5EAH) (6B2H) (77AH) value
515 715 915 1115 1315 1515 1715 1915 System area    
(203H) (2CBH) (393H) (45BH) (523H) (5EBH) (6B3H) (77BH)
516 716 916 1116 1316 1516 1716 1916 CH Decrease digital 64000 Setting  
(204H) (2CCH) (394H) (45CH) (524H) (5ECH) (6B4H) (77CH) limit value
517 to 717 to 917 to 1117 to 1317 to 1517 to 1717 to 1917 to System area    
523 723 923 1123 1323 1523 1723 1923
(205H (2CDH (395H (45DH (525H (5EDH (6B5H (77DH
to to to to to to to to
20BH) 2D3H) 39BH) 463H) 52BH) 5F3H) 6BBH) 783H)
524 724 924 1124 1324 1524 1724 1924 CH Output setting 1 Setting  
(20CH) (2D4H) (39CH) (464H) (52CH) (5F4H) (6BCH) (784H) during wave output stop
525 725 925 1125 1325 1525 1725 1925 CH Output value during 0 Setting  
(20DH) (2D5H) (39DH) (465H) (52DH) (5F5H) (6BDH) (785H) wave output stop
526 726 926 1126 1326 1526 1726 1926 CH Wave pattern start 10000 Setting  
(20EH) (2D6H) (39EH) (466H) (52EH) (5F6H) (6BEH) (786H) address setting (L)
527 727 927 1127 1327 1527 1727 1927 CH Wave pattern start Setting  
(20FH) (2D7H) (39FH) (467H) (52FH) (5F7H) (6BFH) (787H) address setting (H)

5 OPERATING INTELLIGENT FUNCTION MODULES


5.6 Digital-Analog Converter Module R60DA4 115
Address Name Default Data Auto Necessity
Decimal (Hexadecimal) value type refresh of Y9*1
CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8
528 728 928 1128 1328 1528 1728 1928 CH Wave pattern data 0 Setting  
(210H) (2D8H) (3A0H) (468H) (530H) (5F8H) (6C0H) (788H) points setting (L)
529 729 929 1129 1329 1529 1729 1929 CH Wave pattern data Setting  
(211H) (2D9H) (3A1H) (469H) (531H) (5F9H) (6C1H) (789H) points setting (H)
530 730 930 1130 1330 1530 1730 1930 CH Wave output 1 Setting  
(212H) (2DAH) (3A2H) (46AH) (532H) (5FAH) (6C2H) (78AH) repetition setting
531 731 931 1131 1331 1531 1731 1931 CH Constant for wave 1 Setting  
(213H) (2DBH) (3A3H) (46BH) (533H) (5FBH) (6C3H) (78BH) output conversion cycle
532 to 732 to 932 to 1132 to 1332 to 1532 to 1732 to 1932 to System area    
597 797 997 1197 1397 1597 1797 1997
(214H (2DCH (3A4H (46CH (534H (5FCH (6C4H (78CH
to to to to to to to to
255H) 31DH) 3E5H) 4ADH) 575H) 63DH) 705H) 7CDH)
598 798 998 1198 1398 1598 1798 1998 CH Range setting 0 Setting  
(256H) (31EH) (3E6H) (4AEH) (576H) (63EH) (706H) (7CEH)
599 799 999 1199 1399 1599 1799 1999 System area    
(257H) (31FH) (3E7H) (4AFH) (577H) (63FH) (707H) (7CFH)
2000 to 3599 System area    
(7D0H to E0FH)

*1 Item enabled when 'Operating condition setting request' (Y9) turns on and off

5 OPERATING INTELLIGENT FUNCTION MODULES


116 5.6 Digital-Analog Converter Module R60DA4
Setting intelligent function module data
This section describes how to set data of intelligent function modules.
By adding an intelligent function module to a project, data of an intelligent function module (such as parameters and switch
settings) can be set.

Operating procedure
1. [Parameter] in the Navigation window  [Module
Information]  double-click [0010: R60DA4].

1. Double-click!

2. Select "Basic Settings" from the list of setting


items.

3. Set "Basic Settings" as follows.


[Setting details]
Output range setting (CH1): -10 to 10V
2. Select! D/A conversion enable/disable setting (CH1): D/A
conversion enabled
3. Set!

4. [Project] on the menu  [Intelligent Function


Module]  click [Module Parameter List].

4. Click!

5 OPERATING INTELLIGENT FUNCTION MODULES


5.6 Digital-Analog Converter Module R60DA4 117
5. In the Module Parameter List window, check that
the checkbox for "Setting Exist" for the initial
setting for R60DA4 is selected.

6. Click the [Close] button.

5. Check!

6. Click!

5 OPERATING INTELLIGENT FUNCTION MODULES


118 5.6 Digital-Analog Converter Module R60DA4
5.7 Exercise 2 A/D conversion, D/A conversion
In this training, like in exercise 1, specify "C:\CCPU_CWW_Prj\enshu" as a workspace.

Writing parameters
Operating procedure
1. Refer to Page 46 Writing parameters to the C
Controller module and write the parameters set in
"Setting intelligent function module data" to the C
Controller module.

Exercise 2.1 Checking the operation of the analog-digital


converter module and digital-analog converter module
Using the intelligent function module monitor, check the operation of the analog-digital converter module R60AD4 and digital-
analog converter module R60DA4.

Checking the operation of the R60AD


Operating procedure
1. Select R60AD4 in the project view, right-click the
mouse, and select "Register to Intelligent Function
Module Monitor".

1. Select!

2. The intelligent function module monitor window appears


as a docking window, and 0000:R60AD is registered.

5 OPERATING INTELLIGENT FUNCTION MODULES


5.7 Exercise 2 A/D conversion, D/A conversion 119
3. Select [Online] on the menu  [Watch]  [Start
Watching] and start the intelligent function module
monitor.

3. Select!

Input voltmeter (GOT) 4. Check the current value by selecting the item "Buffer
Input volume Memory Monitor"  "Digital output value"  "CH1
Digital output value". The R60AD4 receives an analog
input value from the A/D INPUT of the demonstration
machine at CH1, converts it through A/D conversion,
and stores a digital output value to the address
U0\G400 of its own buffer memory. This item indicates
the current value of the above digital output value.
Operate the input volume tab for the A/D INPUT of the
demonstration machine to check that the digital output
value changes according to the A/D conversion
characteristics of the R60AD.

Checking the operation of the R60DA


Operating procedure
1. Right-click the intelligent function module monitor and
select "Register Module Information".

1. Select!

5 OPERATING INTELLIGENT FUNCTION MODULES


120 5.7 Exercise 2 A/D conversion, D/A conversion
2. When the module information selection dialog box
appears, select "0010: R60DA4" in the module list.

3. Click the [OK] button.

4. The module registered for the intelligent function


module monitor is changed from R60AD4 to R60DA4.
2. Select!

3. Click!

5. Double-click the input value by selecting the item "Buffer


Memory Monitor"  "Digital value"  "CH1 Digital 5
output value" and enter 16000.

6. In accordance with the D/A conversion characteristics,


R60DA4 converts the CH1 digital value stored in the
address U1\G460 of the buffer memory into an analog
value, and outputs it to outside as an analog output.
Check with the D/A OUTPUT meter of the
demonstration machine that in accordance with the D/A
conversion characteristics, the digital value 16000 has
been converted as a voltage of approx. 5V and output.

5 OPERATING INTELLIGENT FUNCTION MODULES


5.7 Exercise 2 A/D conversion, D/A conversion 121
Exercise 2.2 Loading an A/D conversion output value into the HMI
The A/D INPUT of the demonstration machine is converted through A/D conversion using the R60AD4, and its digital output
value is loaded and displayed in the display device D1 of the HMI.

Operating procedure
1. Start up CW Workbench and newly create a project named "enshu2". ( Page 58 Creating a project)
A workspace does not need to be set again because the workspace is the same as the one set in exercise 1.

2. Copy the program enshu2_2.c to the project folder C:\CCPU_CWW_Prj\enshu\enshu2 to add it to the project. (
Page 66 Procedure for adding a program)

3. Rebuild enshu2_2.c in debug mode. ( Page 67 Generating a module for execution)

4. Connect the C Controller module and CW Workbench. ( Page 72 Connecting and disconnecting)

5. Debug the created program to check if it operates correctly. ( Page 73 Debugging the user program)

6. Rebuild the program enshu2_2.c that underwent debugging by canceling the debug mode, and store the created user
program on the C Controller module. ( Page 80 Registering a module for execution)

7. Create a script and store it in the C Controller module. ( Page 80 Registering a module for execution)
[Script details]
Load a program: ld (1, 0, "/0/enshu2.out")
Generate a task: sp (enshu2_2)

8. Reset the C Controller module and set the switch on the front to the RUN position.

9. Operate the switch M2 of the demonstration machine. A value obtained by converting an input voltage from the
demonstration machine into a digital value is displayed in the display device D1 of the HMI. Turn the input volume tab for
the A/D INPUT to check that the value on D1 changes when the input voltage is changed. ( Page 123 Checking the
operation)

10. After the operation is checked completely, disconnect CW Workbench from the C Controller module ( Page 72
Connecting and disconnecting) once, and delete the user program and script stored in the C Controller module.

5 OPERATING INTELLIGENT FUNCTION MODULES


122 5.7 Exercise 2 A/D conversion, D/A conversion
Checking the operation
Operating procedure
1. Reset the C Controller module and set the switch on the
front to the RUN position.

2. Operate the switch M2 of the demonstration machine.

3. Turn the input volume tab for A/D INPUT, and the meter
value for the A/D INPUT changes and a value obtained
by converting an input voltage into a digital value is
displayed in the display device D1.
5

Input volume

5 OPERATING INTELLIGENT FUNCTION MODULES


5.7 Exercise 2 A/D conversion, D/A conversion 123
Source code
The following shows the source code of the program enshu2_2.

5 OPERATING INTELLIGENT FUNCTION MODULES


124 5.7 Exercise 2 A/D conversion, D/A conversion
5

5 OPERATING INTELLIGENT FUNCTION MODULES


5.7 Exercise 2 A/D conversion, D/A conversion 125
Exercise 2.3 Outputting a value in the HMI through D/A
conversion
The R60DA4 converts a value of the input device D21 of the demonstration machine as a digital value through D/A
conversion, and outputs a value as a D/A OUTPUT voltage output when M3 is turned on.

Operating procedure
1. Copy the program enshu2_3.c to the project folder C:\CCPU_CWW_Prj\enshu\enshu2 to add it to the project. (
Page 66 Procedure for adding a program)

2. Rebuild enshu2_3.c in debug mode. ( Page 67 Generating a module for execution)

3. Connect the C Controller module and CW Workbench. ( Page 72 Connecting and disconnecting)

4. Debug the created program to check if it operates correctly. ( Page 73 Debugging the user program)

5. Rebuild the program enshu2_3.c that underwent debugging by canceling the debug mode, and store the created user
program on the C Controller module. ( Page 80 Registering a module for execution)

6. Create a script and store it in the C Controller module. ( Page 80 Registering a module for execution)
[Script details]
Load a program: ld (1, 0, "/0/enshu2.out")
Generate a task: sp (enshu2_3)

7. Reset the C Controller module and set the switch on the front to the RUN position.

8. Operate the switch M3 of the demonstration machine. Check that the value set by the input device D21 of the HMI is
converted through D/A conversion and output to the D/A OUTPUT. When the value of the input device D21 is 32001 or
more, D/A conversion is not performed, and the lamp Y17F turns on. ( Page 126 Checking the operation)

9. After the operation is checked completely, disconnect CW Workbench from the C Controller module ( Page 72
Connecting and disconnecting) once, and delete the user program and script stored in the C Controller module.

Checking the operation


Operating procedure
1. Reset the C Controller module and set the switch on the
front to the RUN position.

2. Operate the switch M3 of the demonstration machine.

3. The value set by the input device D21 of the HMI is


output to the D/A OUTPUT.

5 OPERATING INTELLIGENT FUNCTION MODULES


126 5.7 Exercise 2 A/D conversion, D/A conversion
4. When the value of the input device D21 is 32001 or
more, D/A conversion is not performed, and the lamp
Y17F turns on.

5 OPERATING INTELLIGENT FUNCTION MODULES


5.7 Exercise 2 A/D conversion, D/A conversion 127
Source code
The following shows the source code of the program enshu2_3.

5 OPERATING INTELLIGENT FUNCTION MODULES


128 5.7 Exercise 2 A/D conversion, D/A conversion
5

5 OPERATING INTELLIGENT FUNCTION MODULES


5.7 Exercise 2 A/D conversion, D/A conversion 129
5 OPERATING INTELLIGENT FUNCTION MODULES
130 5.7 Exercise 2 A/D conversion, D/A conversion
APPENDICES
Appendix 1 Security Functions
These functions serve to protect the user property stored in a personal computer and the user property inside the C Controller
module in the MELSEC iQ-R series system against threats such as theft, tampering, faulty operation, and unauthorized
execution due to the unauthorized access by an outsider.
Use an appropriate security function according to the purpose.

Each security function is just one means of preventing unauthorized access (such as destruction of programs
or data) from external devices, but does not prevent it completely. To maintain the safety of the C Controller
system against unauthorized access from external devices, include measures in addition to the security
functions. Mitsubishi Electric Corporation cannot be held responsible for any problems involving system
trouble that may occur as a result of unauthorized access.
The following are examples of measures against unauthorized access.
• Install a firewall.
• Install a personal computer as a relay station to control the relaying of send/receive data using an
application program.
• Install an external device that can control access rights as a relay station. (For details on external devices
that can control access rights, contact the network service provider or equipment dealer.)

Individual identification information


The individual identification information of the C Controller module can be read with the C Controller module dedicated
function (CCPU_GetIDInfo). By implementing the activation function in a user program, a user program that does not operate A
in a C Controller module with different individual identification information can be created.
For details on C Controller module dedicated functions, refer to the following.
MELSEC iQ-R C Controller Programming Manual

APPX
Appendix 1 Security Functions 131
File access restriction
A file attribute can be set to a file stored in the following types of memory. When a file attribute is set, access to the target file
can be restricted, and alteration and file leakage by an unauthorized user can be prevented.
• Program memory
• Data memory
• SD memory card
• USB Mass Storage Class compatible device

• When an SD memory card and USB Mass Storage Class compatible device are mounted on a device other
than the C Controller module (a peripheral such as a personal computer), an access restricted file can be
manipulated. When access restriction is set to a file in an SD memory card and USB Mass Storage Class
compatible device, take measures so that the SD memory card and USB Mass Storage Class compatible
device cannot be removed from the C Controller module freely.
• Access restriction cannot be applied to folders.

Setting file access restriction


Use the attrib() command to change the attribute of a file to be handled by the C Controller module. To change the file
attribute, the security password is required.

■Setting a file attribute


Use the attrib() command to set a file attribute to the file to be restricted.
The following table shows the file attributes the C Controller module can handle.
Attribute Description
S System file attribute This attribute helps prohibit file operation.
R Read only attribute*1 This attribute helps prohibit a file from being deleted or written to.
H Hidden file attribute* 2 A file is hidden when files are displayed in list form using the ls command and when FTP connection is
performed.

*1 Not covered by the file access restriction function. However, when this file attribute is set, deleting or writing to a file can be prohibited.
*2 A file can be manipulated when it is opened by specifying the file name. To prohibit manipulation of a file, the system file attribute must
be set.

■Checking the file attribute


Use the attrib() command to check the set file attribute.
S R H

H: Indicates that the hidden file attribute is assigned.


Empty: Indicates that the hidden file attribute is not assigned.

R: Indicates that the read file attribute is assigned.


Empty: Indicates that the read file attribute is not assigned.

S: Indicates that the system file attribute is assigned.


Empty: Indicates that the system file attribute is not assigned.

APPX
132 Appendix 1 Security Functions
Checking the file access restriction status
The file access restriction status can be checked with the Shell command or the C Controller module dedicated function
(CCPU_GetFileSecurity).

The file access restriction status cannot be checked from the script file (STARTUP.CMD).

Clearing/re-setting file access restriction


The file access restriction status is changed using the Shell command, script file (STARTUP.CMD), or user program. In
addition, to change the file access restriction, the security password set with CW Configurator is required.

■Changing the system file attribute


For operation to be performed on a file with the system file attribute, use the C Controller module dedicated function
(CCPU_ChangeFileSecurity) to temporarily clear the file access restriction. The cleared setting is configured again by setting
file access restriction with the C Controller module dedicated function (CCPU_ChangeFileSecurity) or re-setting the C
Controller module.

• To access a file with the system file attribute in the script file "STARTUP.CMD", clear the access restriction
inside the script file. In that case, to prevent password leakage, assign the system file attribute to the script
file.
• To prevent password leakage, do not use a file with the system file attribute in the script file
(STARTUP.CMD) in an SD memory card.

Precautions
■When safety must be maintained from unauthorized access from outside
To maintain the safety of the C Controller system from unauthorized access from outside, include measures taken by the user. A
To prevent security password leakage, set a password with the following in mind.
• Avoid setting a password using only simple one-byte alphanumeric characters.
• Set a complex password that also includes symbols.

■Characters that can be used for a security password


One-byte alphanumeric characters and symbols can be used. (Passwords are case-sensitive.)

■If the security password is forgotten


Initialize the C Controller module.
For details on the initialization procedure, refer to the following.
 MELSEC iQ-R C Controller Module User's Manual (Startup)

APPX
Appendix 1 Security Functions 133
Setting a service
Set a service that operates in the C Controller module.
By restricting the operating service, unauthorized access from another user can be prevented.

Window

Item Description Setting range Default


Setting a WDB Required when connecting CW Workbench. • Disable Enable
service • Enable
Shell Required when executing a command.
DHCP Required when using the function that automatically assigns the
network settings.
MELSEC communication Required for MELSEC communications.
function
CW Configurator operation Required when operating CW Configurator. When this service is
disabled, the following operations become unavailable.
• Writing to the C Controller module
• Reading from the C Controller module
• Verifying with the C Controller module
• Deleting data from the C Controller module
• Operating CPU memory (initialization)
Memory card access Required when accessing a memory card.
Memory card script execution Required when executing the script file "STARTUP.CMD" stored
in the memory card.
Memory card parameter Required when executing parameters stored in the memory card. Disable
execution*1
USB storage access Required when accessing a USB device. Enable
Security Password setting Set a security password. 8 to 16 characters password
password (one-byte
setting alphanumeric
characters,
symbols)

*1 To change a service, write the parameters to the data memory.


When the parameters are written to the memory card, the service settings are not changed.

APPX
134 Appendix 1 Security Functions
Password setting
■Current password
Enter the current security password.

■New password, password for confirmation


To change the security password, enter the new password into "New Password" and "Confirm New Password".

Precautions
■CW Configurator operation
When CW Configurator operation is disabled, parameters cannot be set. To enable the service, initialize the C Controller
module.

■Memory card parameter execution


When CW Configurator operation is disabled, parameters cannot be set. To enable the service, initialize the C Controller
module.

Lockout
Disables the password authentication for a certain duration of time after a certain number of failed authentication attempts.
Brute-force attacks by malicious users can be prevented.

Lockout time
The following table lists the durations of the lockout times.
Number of password input errors*1 Lockout time
1st time to 5th time 0 minutes
6th time 1 minute
7th time 5 minutes
8th time 15 minutes A
9th time or later 60 minutes

*1 When the correct password is entered, the number of password input errors is reset.

• While lockout is active, a password input error is not counted. For that reason, even if a 7th input error
occurs within one minute after the occurrence of the 6th error, the one minute lockout time is not extended.
• Lockout is not executed if security is set with the C Controller module dedicated function
(CCPU_ChangeFileSecurity).

APPX
Appendix 1 Security Functions 135
Appendix 2 Modules for Realizing Higher-Speed
Analog I/O Conversion
This section describes modules for realizing higher-speed analog I/O conversion.

High-speed analog input module R60ADH4


The high-speed analog input module can perform A/D conversion at high-speed: 1s/CH, medium speed: 10s/CH, and low
speed: 20s/CH per sampling period in normal mode. In addition, the simultaneous conversion mode, which makes
simultaneous conversion at four channels per module possible, is available and supports sampling at the fastest speed of
5s/4CH. Also available is the continuous logging function, which can log digital output values for four channels
simultaneously and transfer logged data to the CPU module continuously without stopping logging.

High-speed analog output module R60DAH4


For the high-speed analog output module, high-speed conversion (1s) improves the analog output response performance.
This realizes highly responsive feedback control in systems such as drive systems that perform speed control with analog
commands.

APPX
136 Appendix 2 Modules for Realizing Higher-Speed Analog I/O Conversion
Appendix 3 CW Workbench
CW Workbench is a product for developing user programs that run on the C Controller module and C intelligent function
module.
It is an OEM product of Wind River Systems in the United States. As a subset product of Wind River Workbench 3.3, it
implements only the functions minimally required for user program development such as coding, building, and debugging.

Features
CW Workbench has the following features.

Integrated development environment


CW Workbench is an integrated development environment that enables project management, source code editing, building,
and debugging, helping develop user programs for the C Controller module and C intelligent function module efficiently.

Same specifications as the specifications of Wind River Workbench 3.3


For the display and operation of the functions common to CW Workbench and Wind River Workbench 3.3, the specifications
are the same.

Windows supported for operating systems for personal computers


The following operating systems for personal computers are supported: WindowsXP, Windows 7, Windows 8, Windows
8.1, and Windows 10.
In addition, some 64 bit versions of operating systems are supported as well.

Extension of a function with plugin software


Third-party plugin software can be added easily, so that a function can be extended with ease.
A
Creating a new user program
Create a user program for controlling the C Controller system.

Operating procedure
1. In the "Project Explorer" window, select a project to
which a new file will be added, and select [File]  [New]
 [File].

1. Select!

APPX
Appendix 3 CW Workbench 137
2. Enter a file name for "File name" and click the [Finish]
button.
For the file name to be entered for "File name", enter up
to the file extension (.c, .h, .cpp, .hpp).

2. Enter!

2. Click!

3. Edit the source file in the "Editor" window, and include


files.
C Controller module dedicated function: "CCPUFunc.h"
MELSEC communication function: "MDFunc.h"
Data analysis function/statistical analysis function:
"DANLFunc.h"

• If a character that cannot be used on Windows is entered for "File name", the error text is displayed on the
header section of the window, and the [Finish] button is disabled.
• Do not use the characters below for "File name". If a file containing any of the following characters is
compiled, a compile error occurs.
#, $, &, ‘, (, ), :, =, `, two-byte character, one-byte katakana character

APPX
138 Appendix 3 CW Workbench SH(NA)-082520ENG-A
Programmable Controllers Training Manual
C Controller Basic Course

MODEL SCHOOL-R REDUNDANT-E

MODEL
CODE

SH(NA)-082520ENG-A(2203)MEE

HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN

When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.

Specifications subject to change without notice.

You might also like