PLC Mes
PLC Mes
Training Manual
MES Interface Basic Course
SAFETY PRECAUTIONS
(Always read these instructions before using the products.)
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 (such as X/Y table) 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
April 2020 SH(NA)-082342ENG-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.
2
TRADEMARKS
Ethernet is a registered trademark of Fuji Xerox Co., Ltd. in Japan.
Microsoft, Microsoft Access, Excel, SQL Server, Windows, and Windows Server are either registered trademarks or
trademarks of Microsoft Corporation in the United States and/or other countries.
MySQL is either a registered trademark or a trademark of MySQL AB.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
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
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
CHAPTER 1 OVERVIEW 9
1.1 MES Interface Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
CHAPTER 4 SETUP 25
4.1 Parameter Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Checking parameter settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Sequence program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Connection destination specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Writing parameters to CPU module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2 Database Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Database table creation procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3 ODBC (Open Database Connectivity) Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
ODBC setting procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4
Verification settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.3 DB Connection Service and Setting Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
DB Connection Service functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Setting items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
CONTENTS
Writing parameters to the MES interface module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Setting DB Connection Service Setting Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
6.2 Operation Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
6.3 Starting MC Works64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
APPENDICES 138
Appendix 1 MC Works64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
MC Works64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
SCADA software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
What to learn in this training course . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Appendix 2 Database Management System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Appendix 3 TCP/IP Setting on Personal Computer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
5
INTRODUCTION
To help users acquire the knowledge required for configuring the data collection system using the MES interface module, this
manual describes the functions and specifications of hardware and software used in the system, database, and
troubleshooting.
RELEVANT MANUALS
Manual name [manual number] Description Available
form
MELSEC iQ-R MES Interface Module User's Manual Specifications, procedures before operation, wiring, and operation examples e-Manual
(Startup) of the MES interface module PDF
[SH-081422ENG]
MELSEC iQ-R MES Interface Module User's Manual Functions, MES Interface Function Configuration Tool, DB Connection e-Manual
(Application) Service, parameter settings, troubleshooting, input/output, and buffer memory PDF
[SH-081423ENG] of the MES interface module
GX Works3 Operating Manual System configuration, parameter settings, and online operations of GX e-Manual
[SH-081215ENG] Works3 PDF
e-Manual refers to the Mitsubishi 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.
• Sample programs can be copied to an engineering tool.
6
TERMS
Unless otherwise specified, this manual uses the following terms.
Term Description
Account A right to use the MES interface module or a server, or an ID necessary for their use
Action A unit for processing defined in a job.
There are three kinds of actions: DB communication action for communicating with a database, operation action for
calculating values of device tag component, and external communication action for executing programs in an application
server.
The DB communication action is a processing unit for sending one SQL statement (Select, Update, Insert, Multiple
Select, or Delete) or one DB procedure execution request.
The operation action is a processing unit for performing a maximum of 20 binary operations.
Configuration personal computer A personal computer to set various settings required for operating the MES interface module.
This computer can be shared with a server.
Data source Connection information which is necessary for accessing data using ODBC.
With Windows, a data source name is assigned to connection information for management. The database is accessed
via ODBC by specifying the data source name with the information linkage function.
Database (DB) or relational Data management method that follows relational data model logic.
database (RDB) A piece of data is expressed as a collection of multiple items (fields) and a data collection is expressed as a table.
Data can be easily merged and selected using key data.
DB buffering A function that temporarily stores SQL statements, that failed to be sent due to a communication error, to an SD memory
card, and resends them when the communications have been recovered
DB procedure A program that combines sequential processing procedures into one program against the database, and saves it to the
database management system.
This performs processing based on arguments received from the MES interface module, and returns the results to the
MES interface module.
Device memory or device Various memory data in a CPU module.
There are devices handled in each bit and in each word.
Device tag (Tag) Data table that contains a set of information (component) required to access device data in each CPU module on a
network.
The MES interface module collects device data for each tag at an interval defined in the tag.
Device tag component A generic term for components (device data) which configures a device tag.
(Component) Data that contains communication routes, data types, devices, etc. required to access device data in each CPU module.
Engineering tool A tool for setting, programming, debugging, and maintaining programmable controllers.
For the supported tools, refer to the following.
MELSEC iQ-R Module Configuration Manual
Handshake For highly reliable processing, devices in a CPU module are used for managing processing between the CPU module
and the MES interface module
High-speed access A generic term for the following access types:
• High-speed access (interval specification)
• High-speed access (each scan)
Item A setting group unit that each setting type in the edit items has
Job A unit of process for linking information by the MES interface module
MES An acronym for Manufacturing Execution Systems.
A system for controlling and monitoring the plant status in real time to optimize production activities.
The system enables to speed up responses to changes of a production plan and situation that lead to efficient
production processes and optimization of production activities.
MES Interface Function An abbreviation for MELSEC iQ-R series MES Interface Function Configuration Tool
Configuration Tool
MES interface module An abbreviation for the RD81MES96 MES interface module
MX MESInterface-R The product name of SW1DND-RMESIF-E
Network module A generic term for the following modules:
• CC-Link IE Controller Network module
• CC-Link IE Field Network module
• MELSECNET/H network module
• Ethernet interface module
• CC-Link module
QCPU (Q mode) A generic term for MELSEC-Q series CPU modules and MELSEC-Q series C Controller modules
RCPU A generic term for MELSEC iQ-R series CPU modules and MELSEC iQ-R series C Controller modules
Server A generic term for a database server and application server.
Database server is a computer with a relational database which links information with the MES interface module.
Application server is a computer with a program which operates upon request from the MES interface module.
7
Term Description
SQL An abbreviation for Structured Query Language.
A database manipulation language that is used for operating a relational database.
Transaction A collection of different interrelated processes that work in synchronization.
Trigger buffering When trigger conditions (conditions for data transmission) of multiple jobs are satisfied at the same time, their data and
times are buffered in an internal memory of a module so that actions (data operation/transmission) can be executed later
using the buffered data.
Even if the frequency of data transmission triggers is high, jobs are executed without missing any trigger.
Trigger condition Start conditions for job operation
Update settings Processing that updates the settings in the MES interface module using MES Interface Function Configuration Tool
Variable (temporary variable) A variable that can be used for saving values selected from a database temporarily, and for writing operation values to a
database or device tag components.
There are two types of variables: local variable which has variable area for each job and global variable which can be
used for other jobs since it has a common variable area for all jobs.
8
1 OVERVIEW
1
The MES Interface module enables improved yield and product quality through its direct connectivity between programmable
controller systems of production equipment and information system databases. Conventionally, gateway personal computers
have performed the polling processing in which programmable controller devices and programs are constantly checked to
enable the connectivity. With the MES interface module, the transmission of data can be event-driven by specifying an event
as a trigger and it allows the data to be inserted into database records directly. Compared to the conventional connectivity
implemented using the gateway computers, the direct database connectivity implemented using the MES interface module
will decrease system complexity, improve reliability, and eliminate data loss, resulting in better agility, less maintenance and
reduces total cost of ownership (TCO).
Existing information linkage via a gateway Information linkage using the MES interface module
personal computer
<Communication gateway>
Event transmission
Host information system
communication processing
Data processing Computerization via SQL
(Operation processing, logging, communication gateways is
and another processing) unnecessary.
Controller communication
The following describes the overall system configuration when using the MES interface module.
DB
(b)
(3)
Ethernet
(2)
(1)
(a)
Name Description
(1) MES interface module A module to link information between production equipment and host information systems
(2) Configuration (a) MES Interface Function A tool to set various settings required for operating the MES interface module
personal Configuration Tool
computer Project File Conversion Tool*1 A tool to convert a MELSEC-Q series MES Interface module project file to a MELSEC iQ-R
series MES Interface module project file
(3) Server (b) DB Connection Service Software to link information between the MES interface module and a database
DB Connection Service Setting Tool A tool to set DB Connection Service
1 OVERVIEW
9
1.1 MES Interface Module
The MES interface module provides a highly reliable and easy method for exchanging data between programmable controller
CPUs and common industrial quality databases. Most production execution software applications use a database to source
data and store results. The product is named "MES interface module" because it greatly improves MES implementation and
operation by providing a high quality, high function link to the factory equipment.
One MES interface module can handle data with up to 32 database connections. Communications between the MES interface
module and the host computer system occur in a secure, encrypted format and the messages exist in SQL*1 format, which is
well suited to passage through common IT infrastructure devices such as firewalls, routers and switches.
The MES interface module is set up using the dedicated configuration software. For most applications, no computer language
programming or control logic programming is required. The knowledge of SQL language is not required because the setup
processing is executed in a menu driven format and SQL statements are automatically created based on the settings. The
idea is that standard engineering staff can easily handle initial setup and subsequent modification of the MES interface
module configuration.
*1 An abbreviation for Structured Query Language.
A database manipulation language that is used for operating a relational database.
Feature
The MES interface module provides enhanced functions with significant benefits beyond simple data transfer.
Connection with the information system using simple settings without program
SQL statements can be automatically created only by specifying necessary settings with the setting tool. Additionally, since
the stored procedures can be called from databases, a CPU module, the MES interface module, and databases can be
communicated easily. There is no need to write programs for data communications, so the engineering costs for system
construction can be reduced and the work period can be shortened.
1 OVERVIEW
10 1.1 MES Interface Module
Buffering function for reliable data acquisition/transmission
■Trigger buffering function 1
The trigger buffering function buffers trigger information when a trigger condition for a later job is satisfied. After the former job
is completed, the later job is executed according to the trigger information.
Even if the frequency of data transmission triggers is high, jobs are executed without missing any trigger.
When conditions for data transmission of multiple jobs are satisfied at the same time, their data and times are buffered in an
internal memory of a module.
After the loads are reduced, data operations and transmission are executed using the buffered data.
For details on the trigger buffering function, refer to the following.
Page 47 Trigger buffering function
1 OVERVIEW
1.1 MES Interface Module 11
1.2 Database
This section describes databases which the MES interface module uses as a source or destination for information exchanged
with programmable controller CPU modules.
For this example, a database is defined as software which provides a virtual filing system for storing groups of related data. It
also provides a set of commands that enable access, editing and manipulation of the stored data.
The following are some example cases that may occur in a database.
• During processing of a set of data, an error occurs.
In response, a user can apply a rollback command that restores the data to its original state.
• While certain stored data is being retrieved in one process, new data that needs to be stored in a second process arrives.
The database should handle completion of both actions without conflict or user intervention.
• A researcher desires to retrieve a specific set of 15 data items that was originally stored in the database on July 15th at
2:30 AM 5 years ago.
The user will create a "query" or command structure that the database understands as a request for data retrieval. The
database will return the specified information when the query is executed.
Database types
There are different database types including relational, hierarchical, and XML. The MES interface module operates with
relational databases provided by Microsoft and Oracle.
Relational databases organize data into tables consisting of fields (columns) and records (rows). The contents in one
database can range from one table to many thousands.
Field
Record
Part number Production plan Production result
M7000 300 120
J581-583 500 500
EH10 30 30
DHC8 10 0
Table
1 OVERVIEW
12 1.2 Database
Database commands
All common databases implement a standardized command format called SQL (Structured Query Language). SQL defines
1
each command action that a user can apply to operate the various database functions and the syntax for the command and
response messages paragraph change.
The MES interface module executes the basic commands such as SELECT, INSERT, UPDATE, and DELETE. All other
commands or complicated processing must be executed outside the MES interface module or by using a stored procedure.
UPDATE INSERT
1. Add a new record to the table that has fields for part number, production plan, and production result.
(INSERT command is executed via the production scheduling software.)
Part number Production plan Production result Part number Production plan Production result
M7000 300 120 Insert M7000 300 120
J581-583 500 500 J581-583 500 500
EH10 30 0 INSERT
2. After execution, add the production result to the record. (UPDATE command is executed by the MES interface module
and the production result is moved from the programmable controller CPU module to the database.)
Part number Production plan Production result Part number Production plan Production result
M7000 300 120 Update M7000 300 120
J581-583 500 500 J581-583 500 500
EH10 30 0 EH10 30 12 UPDATE
1 OVERVIEW
1.2 Database 13
2 STARTUP of DEMONSTRATION MACHINE
Ethernet
cable
Ethernet CH1
(192.168.3.3)
Ethernet
network No.1
Ethernet
(192.168.3.100)
DB
(4) (3)
CH1
Ethernet
cable
DB
Personal computer
GOT2000
2. Connect the AC servo to the Simple Motion module with an Ethernet cable.
AC servo
Simple Motion module
Ethernet
cable
DB
Overview
The following describes an example of an automated production process of pouring water into containers using the
programmable controller system.
200 160
Process Description
(1) Production control Inputs production patterns and starts/stops the production process.
(2) Production process Pours water into large, medium, or small containers based on an selected operation pattern.
(3) Quality determination Checks the amount of the water poured into each container and determines whether results are acceptable or
unacceptable.
Operation
The following is the operation between the control system and the production control database.
n1 2018-10-01 10:00:00.000 2 ×
Õ Ö
n2 2018-10-01 10:00:01.000 1
Visualization of data
DB
Data storage
(1)
(2)
(3)
(4)
Operating procedure
2
1. Start a server.
Start a server used as a database server.
(Page 19 Starting up servers)
2. Start the MES interface module and a configuration personal computer.
Start the MES interface module and a configuration personal computer on which MES Interface Function Configuration Tool
has been installed.
(Page 21 Procedures before Operation)
Starting up servers
DB
Database server*1
Sever
MX MESInterface-R
Operation starts.
The MES interface module accesses a database server via DB Connection Service.
Page 81 DB Connection Service and Setting Tool
• DB Connection Service needs to be installed on all the database servers and application servers accessed
from the MES interface module.
• When using DB Connection Service on an application server, an account for the application program
execution needs to be created in advance.
• The settings of DB Connection Service are changed with DB Connection Service Setting Tool.
Only the ODBC driver installed at the same time as the installation of the database can be used except for the
cases below. 'Microsoft Access Driver(*.mdb)', 'Microsoft ODBC for Oracle', and 'SQL Server' which are
supplied with the operating system cannot be used.
• When connecting the database of Oracle using any of the following DB Connection Services, the 32-bit
version of Oracle Client for the ODBC setting and the ODBC driver of Oracle need to be installed.
DB Connection Service which is stored to MX MESInterface-R whose software version is '1.03D' or earlier
DB Connection Service (32-bit) which is stored to MX MESInterface-R whose software version is '1.04E' or
later
• When using PostgreSQL for a database, install an ODBC driver.
Start a server before starting MES interface module and a configuration personal computer.
2
MES interface module*1 Configuration personal computer
MX MESInterface-R
Mount it on the base unit.*2 Install MES Interface Function Configuration Tool.*3
Switch the dot matrix LED display mode switch to the right (SHOW).
Connect the MES interface module and the configuration personal computer on a 1:1 basis.*4
Connect the MES interface module and the configuration personal computer to the network according to the network settings.
Review required
Operation starts.
3.1 MX MESInterface-R
3 ENVIRONMENT CONFIGURATION
3.1 MX MESInterface-R 23
System configuration when installing
The following shows the system configuration when installing each piece of software stored in MX MESInterface-R.
For the installation method, refer to the following.
MELSEC iQ-R MES Interface Module User's Manual (Startup)
(1) (2)
(1) (2)
Precautions
• When using Access for a database, select "32-bit" for DB Connection Service and DB Connection Service Setting Tool.
• When selecting "64-bit", configure the ODBC setting which is supported by a 64-bit version DB Connection Service.
(Page 37 ODBC (Open Database Connectivity) Setting)
3 ENVIRONMENT CONFIGURATION
24 3.1 MX MESInterface-R
4 SETUP
4 SETUP
4.1 Parameter Settings 25
3. Check that the following are set in "Start XY"
on the "Input the Configuration Detailed
Information" window.
[Setting details]
3. Check!
RD81MES96
Start XY: 0000
RD77GF4
Start XY: 0020
4. Double-click!
4 SETUP
26 4.1 Parameter Settings
7. Select "Basic Settings" in the "Setting Item
List" window.
8. Double-click "Network Configuration
Settings".
8. Double-click!
7. Select!
4 SETUP
4.1 Parameter Settings 27
Sequence program
Precautions
• This manual does not cover the devices used for the Simple Motion modules and servo amplifiers. For details, refer to the
user's manual for the module used.
• Program creation is not included in this training. When writing a program to a CPU module, write the pre-programmed
project "school_MES.gx3".
4 SETUP
28 4.1 Parameter Settings
Sequence program
For details on each instruction, refer to the following.
MELSEC iQ-R Programming Manual (Instructions, Standard Functions/Function Blocks)
1 2 3 4 5 6 7 8 9 10 11 12
1 Initial settings for servo
SM400 Y20
2 (0)
SM403
4 (15) = D0 K3 DMOVP K360000 U2\G4318
= DMOVP
4
6 D0 K1 K121000 U2\G4318
7 Production processing
X200
8 (46) SET M1
M1
9 (55) RND D129
10 SET X201
SM400
11 (59) MOV K500 SD415
SM705
12
SM415
13 (63) MOVP D129 D130
M2
14
15 Quality determination
M2 M4 M1
16 (68) > D130 K0 <= D130 K26213 MOV K1 D140
M1
17 = D130 K0
19 INC D200
M3
20
M3
21 (106) = D140 K1 INC D150
22 OUT C0 D100
C0 M4
25 (129)
26 Container ID creation
M3
27 (131) BINDA D200 D211
4 SETUP
4.1 Parameter Settings 29
1 2 3 4 5 6 7 8 9 10 11 12
29 Production information reset
M4
30 (145) OUT T0 K20
X300
31 (160) RST C0
T0
32 RST D0
33 RST M1
34 RST M4
35 RST X201
36 RST X300
37 RST X200
38 RST D100
39 RST D110
40 RST D120
41 RST D129
42 RST D130
43 RST D140
44 RST D150
45 RST D160
46 RST D200
47 RST D210
48 RST D211
49 RST D212
50 (198) END
4 SETUP
30 4.1 Parameter Settings
Connection destination specification
This section describes how to specify the connection destination.
Operating procedure
1. On the engineering tool, select [Online]
[Current Connection Destination] from the
menu.
1. Select!
4
3. Click!
4 SETUP
4.1 Parameter Settings 31
4. Select "No Specification" for "Other Station
Setting" on the "Specify Connection
Destination Connection" window.
4. Select!
5. Click!
7. Click!
4 SETUP
32 4.1 Parameter Settings
Writing parameters to CPU module
This section describes how to write the parameters set on GX Works3 to the CPU module.
1. Open the project "school_MES.gx3" whose the
parameter settings and programming have
been completed. On the engineering tool,
select [Online] [Write to PLC] from the menu.
1. Select!
4
3. Click!
4. Click!
4 SETUP
4.1 Parameter Settings 33
4.2 Database Setting
This section describes how to create two types of database table in Microsoft SQL Server Management Studio. This
procedure must be completed before setting the ODBC setting and MES interface function setting.
4 SETUP
34 4.2 Database Setting
6. Enter "Project" on the "Choose Name" window, and click
the [OK] button.
6. Click!
7. Right-click!
8. Select!
9. Select!
10. Set the items for the table as shown on the window.
(Set sizes (S, M, and L) in two-byte characters.)
4 SETUP
4.2 Database Setting 35
Creating [Judgement] table
Operating procedure
1. Right-click "Tables", and select "Table" in the "Object
Explorer" window.
1. Select!
3. Click!
4 SETUP
36 4.2 Database Setting
4.3 ODBC (Open Database Connectivity) Setting
When using DB Connection Service on the database server, the ODBC setting for the database used is needed to be set in
advance. Set the ODBC setting before setting parameters with MES Interface Function Configuration Tool.
This section describes the setting method for the following operating system (OS) and relational database.
• Operating system (OS): Microsoft Windows 10 Professional Operating System (64-bit)
• Relational database: Microsoft SQL Server 2016
1. Enter!
Enter the following commands in the command prompt in accordance with the software version of MX
MESInterface-R and the bit version of DB Connection Service to be used.
• Software version '1.03D' or earlier or '1.04E' or later and 32-bit DB Connection Service:
"%SystemRoot%\SysWOW64\odbcad32.exe"
• Software version '1.04E' or later and 64-bit DB Connection Service:
"%SystemRoot%\system32\odbcad32.exe"
2. Select the [System DSN] tab, and click the [Add] button.
2. Click!
3. Select "OBDC Driver 13 for SQL Server", and click the
[Finish] button.
3. Click!
4 SETUP
4.3 ODBC (Open Database Connectivity) Setting 37
4. Set the following.
Data source name: SAMPLE
Sever name: (Name of a personal computer for the
database)\SQLEXPRESS*1
*1 The server name can be checked by starting SQL Server
Management Studio.
4. Set!
5. Click!
7. Click!
4 SETUP
38 4.3 ODBC (Open Database Connectivity) Setting
8. Click the [Next] button.
8. Click!
4
9. Click!
10. Click the [Test Data Source] button, and check whether
the connection is successful.
11. Click the [OK] button on the "Test Data Source" window.
12. Click the [OK] button on the "ODBC Microsoft Server
Setup" window.
10. Click!
4 SETUP
4.3 ODBC (Open Database Connectivity) Setting 39
5 INFORMATION LINKAGE FUNCTION
This chapter describes the functions of the MES interface module, MES Interface Function Configuration Tool and DB
Connection Service.
<CPU3> DB
Target Access
device 3 table 3
Device memory
Select/Multiple Select
SELECT/Multi-SELECT
Device tag component
Temporary variable*1 Data
Insert
Device tag component INSERT
Temporary variable Data
Constant
Update*2
Device tag component UPDATE
Temporary variable Data Database
Constant
Delete*2
*3 DELETE
Disconnected
Õ DELETE...
SD memory card
SQL statements
that cannot be
sent are buffered
in chronological
Ò INSERT... order.
Ó INSERT...
Ô UPDATE...
Recovered
Ò INSERT...
Ó INSERT...
Ô UPDATE...
Õ DELETE...
■Trigger judgment
A trigger condition is configured by combining an event and a condition. (Page 46 Combination of conditions)
A trigger condition is evaluated according to a judgment result of the configuration of the trigger condition.
• Event: Shows that an event occurs, and the trigger condition is satisfied when an event occurs.
• Condition: Shows the status at a certain point, and a precondition for trigger condition satisfaction.
The overview of the trigger condition and outline specifications of event/condition type are as follows.
Event/condition type Description Attribute
Condition (Value monitoring) The condition is satisfied (status = true) while the value of device tag component or variable Condition
satisfies the specified condition. Event
The generates an event when the condition turns into the satisfied state from the not-
satisfied state (from false to true) for using as an event.
Condition (Period of time) The condition is satisfied (status = true) from the specified start time to the specified end Condition
time.
Event (Value changed) Generates an event when the value of device tag component or variable is changed from Event
the previous value.
Event (Fixed time) Generates an event at the specified time. Event
Event (Fixed Timer interval Generates an event at the asynchronous time interval with the time in MES interface Event
cycle) module.
Time interval Generates an event with the time interval based on the time in MES interface module.
Event (Module MES Interface Generates an event at start of the MES interface module or at restart/update the settings of Event
monitoring) Module the MES interface function.
Control CPU Generates an event at the status change of the control CPU.
Handshake Starts a job according to the value of the device tag component in the target device, and
notifies the job completion to the device tag component in the target device.
Ex. 5
When value monitoring is regarded as a condition
Condition
Monitoring
interval Job start Job start Job start
Job execution Job execution Job execution
Ex.
When value monitoring is regarded as a condition
Condition
Monitoring
interval
Trigger information Ó
Ô Trigger buffer
Õ
Job start Job start Job start Job start Job start
Job execution Ò Ó Ô Õ Ö
When the trigger buffering function is enabled, the data required for a job operation is always stored to the trigger buffer
temporarily, then the job is executed depending on the load state.
Operation example
The data categories that can be set for the data operation and processing function are as follows.
: Available, : Not available
Data category Substitution item First item Second item
Device tag component
(Data write prohibited tags and array (Array tags cannot be set.)
tags cannot be set.)
Variable
(System variables which are write-
protected cannot be set.)
Constant
Macro
(Only "Date and Time Character String" can be set.)
Network settings 5
This section describes the settings required for network connections.
Window
Click the "Network Settings" in the edit items tree.
Displayed items
Item Description
Ethernet Port (CH1) Use the Ethernet port (CH1) Selects this to use the Ethernet port (CH1).*1
IP Address Sets the IP address (CH1) of the MES interface module in decimal.*2
Subnet Mask Sets the subnet mask in decimal when using the subnet mask.
Ethernet Port (CH2) Use the Ethernet port (CH2) Selects this to use the Ethernet port (CH2).*1
IP Address Sets the IP address (CH2) of the MES interface module in decimal.*2
Subnet Mask Sets the subnet mask in decimal when using the subnet mask.
Default Gateway Selects the necessity of default gateway, and set the IP address.*3
Host Name Sets the host name.
[OK] button Reflects the specified settings.
Window
Click the "Target Device Settings" in the edit items tree.
Displayed items
Item Description
Target Device Setting List Target Device Name Displays the target device name.
Comment Displays the comment set arbitrarily.
Device Type Displays the target device type.
Multiple CPU Setting Displays the CPU number when the target device is a multiple CPU.
Communication Route Displays whether the communication route is set or not.
Network Communication Route Displays the settings of the network communication route.
Co-Existence Network Route Displays the settings of the co-existence network route.
[Edit] button Opens the "Target Device Settings" window of the selected row.
[Delete] button Deletes the settings of selected rows.
Window
Click the [Edit] button on the "Target Device Setting List" window.
Displayed items
Item Description
*1
Target Device Name Sets the target device name.
Comment Sets an arbitrary comment.
Target Device Settings Device Type Sets the target device type.
Multiple CPU Setting Selects a multiple CPU number.
[Communication Test] button Performs a communication test with the set access target device.
Global Label/Common Device Use the global label/ Selects this to import global labels/common device comments to MES Interface Function
Comment Settings (optional) common device comment Configuration Tool.
Global Label/Common Displays the project path of the engineering tool specified as an import source.
Device Comment Import An import source project can be specified in the "Select the Global Label/Common Device
Source Setting Comment Import Source Project" window displayed by clicking the [...] button.
[OK] button Reflects the specified settings.
*1 The same name cannot be used for the target device name.
*1 When selecting "MES Interface Module (Ethernet Port), switching to the [Co-existence Network Route] tab is not possible.
When accessing a QCPU (Q mode) for which the MELSOFT connection extended setting was set, specify
"Ethernet Interface Module".
Window
Click the "Device Tag Settings" in the edit items tree.
Displayed items
Item Description
Device Tag Setting List Device Tag Name Displays the name of device tag setting.
Comment Displays the comment set arbitrarily.
Data Writing Displays whether the writing to the device tag is protected or not.
Array Size Displays the array size of the array tag setting.
Array Type Displays the array type of the array tag setting.
[Edit] button Opens the "Device Tag Settings" window of the selected row.
[Delete] button Deletes the settings of selected rows.
Window
Click the [Edit] button on the "Device Tag Setting List" window.
Displayed items
Item Description
Device Tag Name*1 Sets the device tag name.
Comment Sets an arbitrary comment.
Device Tag Settings Component Name Sets the component name to be accessed.
Target Device Selects the device having the component to be accessed.
[...] button Opens the "Target Device Settings" window of the corresponding target
device.
Page 53 Target device settings
Device Memory (Start) Specifies the start of the device memory to be accessed.
Device Memory (End) Displays the end device obtained by calculating the set start device and the
data type and number of characters.
Data Type Selects a data type of the device memory to be accessed.
Length Set the number of characters when specifying the character string to the data
type.
[Delete] button Deletes the settings of selected rows.
Data Write-Protect Setting (optional) Protect data writing Selects this to protect data writing to the device tag being set.
Array Tag Settings (optional) Set the array tag to be used for the Selects this to use a device tag as an array tag.
assignment destination of Multiple
Select
Array Tag Setting Displays the array size and array type.
[Change] button Opens the "Array Tag Setting" window for the device tag being set.
[OK] button Reflects the specified settings.
Window
Click the "Target Server Settings" in the edit items tree.
Displayed items
Item Description
Target Server Setting List Target Server Name Displays the target server setting name.
Comment Displays the comment set arbitrarily.
Server Type Displays the server type.
IP Address Displays the IP address of the server.
[Edit] button Opens the "Target Server Settings" window of the selected row.
[Delete] button Deletes the settings of selected rows.
Window
Click the [Edit] button on the "Target Server Setting List" window.
Displayed items
Item Description
Target Server Name*1 Sets the target server name.
Comment Sets an arbitrary comment.
Target Server Common Server Type Sets the target server type.
Settings IP Address Sets the IP address of the server in which DB Connection Service is installed in decimal.
Port No. Sets a port number of the server.
Setting range: 1024 to 65535
Communication Timeout Sets the timeout time until the MES interface module detects a communication error when a
Time*2,*3 communication error occurs on the network between the MES interface module and the server.
Setting range: 1 to 180 seconds
Target Server Individual Data Source Name Sets the name of the ODBC data source to be accessed.
Settings User Name*4 Sets the user name to access the database/application server.
Password Sets the password to access the database/application server.
Database Type*5 Selects the database server type.
Access Error Notification Access Error Notification Displays whether or not to notify the current setting status for the access error status.
Settings (optional) Setting
[Change] button Opens the "Access Error Notification Setting" window.
[Communication Test] button Performs a communication test with the set access target server.
[OK] button Reflects the specified settings.
Window
Click the "Access Table/Proc. Settings" in the edit items tree.
Displayed items
Item Description
Access Table/Procedure Access Table/Procedure Displays the setting name of the access table/procedure.
Setting List Name
Comment Displays the comment set arbitrarily.
Target Server Name Displays the setting name of the target server.
Table/Procedure Type Displays the set table/procedure type.
DB Table/Procedure Name Displays the set DB table/procedure name.
[Edit] button Opens the "Access Table/Procedure Settings" window of the selected row.
[Delete] button Deletes the settings of selected rows.
Window
Click the [Edit] button on the "Access Table/Procedure Setting List" window.
Displayed items
Item Description
Access Table/Procedure Name*1 Sets the access table/procedure name.
Comment Sets an arbitrary comment.
Access Table/Procedure Settings Target Server Selects a target server.
[...] button Opens the "Target Server Settings" window for the corresponding target
server.
Opens a new "Target Server Settings" window when the target server is
"(Add)".
Page 58 Target server settings
Table/Procedure Type Selects a table or a stored procedure to be set.
[OK] button Reflects the specified settings.
*2 In case of SQL Server, because there is no distinction between "OUT" and "INOUT", acquire as "INOUT".
However, when there is no input usage in the DB communication action (Stored Procedure), the assignment direction is recommended
to set to "OUT" manually.
Operating procedure
1. Click the [Browse DB Table Information] button on the "Access Table/Procedure Settings" window.
Operating procedure
1. Click the [Browse DB Field Information] button on the "Access Table/Procedure Settings" window.
Operating procedure
1. Click the [Browse DB Procedure Information] button on the "Access Table/Procedure Settings" window.
Window
Click the "Job Settings" in the edit items tree.
Displayed items
Item Description
Job Setting List Job Name Displays the job setting name.
Comment Displays the comment set arbitrarily.
Job Configuration Displays the job type.
Event/Condition Type No.1 Displays the event/condition type No.1 of the trigger condition.
Event/Condition Type No.2 Displays the event/condition type No.2 of the trigger condition.
Trigger Buffering Setting Displays whether the trigger buffering setting is enabled or disabled.
Access Type Displays the job access type.
Access Interval Displays the access interval to read the data used at trigger judgment.
Reading Target Data Displays the target data for reading.
DB Buffering Setting Displays the settings of the DB buffering.
DB Buffer Use Size Displays the size to be a criterion for one DB buffering for the target job.
Verification Settings Displays the settings of the verification setting.
[Edit] button Opens the "Job Settings" window of the selected row.
[Delete] button Deletes the settings of selected rows.
Window
Click the [Edit] button on the "Job Setting List" window.
Displayed items
Item Description Reference
Job Name*1 Enters a job name.
Comment Sets an arbitrary comment.
[Job Configuration] tab Sets the settings for job configuration. Page 65 Job configuration
[Trigger Conditions] tab Sets the settings for trigger condition. Page 66 Trigger conditions
[Read Data at Trigger Judgment] tab Selects the data reading method to be used at trigger judgment. Page 68 Read data at trigger judgment
[Pre-Processing] tab Sets the settings for pre-processing. Page 69 Pre-processing
[Main-Processing] tab Sets the settings for main-processing. Page 70 Main-processing
[Post-Processing] tab Sets the settings for post-processing. Page 72 Post-processing
[Verification Settings] tab Sets the settings for verification control for a job in verification. Page 80 Verification settings
[Back] button Moves to the previous setting window.
[Next] button Moves to the next setting window.
[OK] button Reflects the specified settings.
The setting window can be switched by clicking the set tab directly.
A set tab has a check mark ( ).
Window
Displayed items
Item Description
Job Configuration Selection Job Configuration Selects the configuration of the job being set.
Settings for No. of Pre-Processing Pre-Processing Selects this to use the pre-processing.
and Post-Processing Actions*1
No. of Pre-Processing Actions Specifies the maximum number of settings for actions that are set in the pre-
processing.
Post-Processing Selects this to use the post-processing.
No. of Post-Processing Actions Specifies the maximum number of settings for actions that are set in the post-
processing.
*1 The setting can be set when "Extended Configuration" is selected for the "Job Configuration".
Window
Displayed items
Item Description
Trigger Condition Configuration Configuration Type Selects the configuration type for the trigger condition.
Settings Condition Combination Type Selects the combination type when combining multiple conditions.
Event/Condition Settings Event/Condition Type Displays the event/condition type.
Detail Type Displays the detail type.
Content Displays the details according to the event/condition type and detail type.
[Edit] button Opens the "Condition Settings" window of the selected row.
[Delete] button Deletes the settings of selected rows.
Trigger Buffering Setting (optional) Trigger Buffering Selects whether the trigger buffering is enabled or disabled.
■Condition settings
This sets the conditions to start a job.
Operating procedure
1. Click the [Edit] button on the [Trigger Conditions] tab on the "Job Settings" window to set the following items.
Item Description
Event/Condition Type Common Event/Condition Type Selects the event/condition type.
Settings
Detail Type Selects the detail type of event/condition.
2. Set the following depending on the event/condition type and detail type.
• Condition (Value Monitoring)
Item Description
Event/Condition Type Individual Monitoring Target Sets the monitoring target data for the value monitoring.
Settings
(Data Type) Displays the data type of the monitoring target.
Condition Sets the condition for the value monitoring.
Comparison Target Sets the comparison target data for the value monitoring.
(Data Type) Displays the data type of the comparison target.
• Handshake
Item Description
Event/Condition Type Individual Requirement Source/Notification Sets the data for the job start request and the job completion notification.
Settings Destination
(Data Type) Displays the data type of the job start request and the job completion
notification.
Window
Displayed items
Item Description
Access Type Selection Access Type Selects the access type.
Access Interval Settings*1 Seconds Specification Selects this to monitor in seconds and specify the monitoring interval in
seconds.
Milliseconds Specification Selects this to monitor in milliseconds and specifies the monitoring interval in
milliseconds.
Reading Target Data Setting Reading Target Data Displays the reading target data at trigger judgment.
(optional)
[Change] button Opens the "Reading Target Data Setting" window.
*1 It is not displayed when selecting "High-Speed Access (Each Scan)" for the "Access Type".
Window
Displayed items
Item Description
Pre-Processing Settings Action Type Displays the action type.
Content Displays the outline details of each action according to the action type.
[Edit] button Sets an action of the selected row.
Page 73 Action settings
[Delete] button Deletes the settings of selected rows.
No. of Pre-Processing Specifies the maximum number of settings for the pre-processing action.
Actions
Operation Settings at Pre-Processing At Processing Failure Displays the settings of operation at pre-processing failure.
Failure (optional) [Change] button Opens the "Operation Setting at Pre-Processing Failure" window.
Window
Displayed items
Item Description
Main-Processing Settings Action Type Displays the action type.
Content Displays the outline details of each action according to the action type.
[Edit] button Sets an action of the selected row.
Page 73 Action settings
[Delete] button Deletes the settings of selected rows.
Operation Settings at Main- At Processing Failure Displays the settings when the main-processing is failed (job cancellation).
Processing Failure/Interruption At Processing Interruption Displays the settings when the main-processing is interrupted.
(optional)
[Change] button Opens the "Operation Settings at Main-Processing Failure/Interruption"
window.
DB Buffering Settings (optional) DB Buffering Displays the settings (following operations) of the "DB Buffering Setting"
window.
DB Buffer Use Size [Byte] Displays the size to be a criterion for one DB buffering for the job being set.
[Change] button Opens the "DB Buffering Setting" window.
Operating procedure
1. Click the [Change] button for "Operation Settings at Main-Processing Failure/Interruption (optional)" on the [Main-
Processing] tab on the "Job Settings" window to set the following items.
Item Description
Operation Settings at Main- Operation Selects an operation when the main-processing is failed (job cancellation).
Processing Failure
Notification Selects this to notify the main-processing failure (job cancellation).
Notification Destination Specifies the data to be used for the notification destination.
(Data Type) Displays the data type to be used for the notification destination.
Notification Data Specifies the data to be used as the notification data.
(Data Type) Displays the data type to be used as the notification data.
Operation Setting at Main-Processing Operation Selects an operation when the main-processing is interrupted.
Interruption
Operating procedure
1. Click the [Change] button for "DB Buffering Settings (optional)" on the [Main-Processing] tab on the "Job Settings"
window to set the following items.
Item Description
DB Buffering Setting DB Buffering Selects whether the DB buffering is enabled or disabled, and a buffering area.
[...] button Opens the "DB Buffer Settings" window.
MELSEC iQ-R MES Interface Module User's Manual (Application)
Job Operation Settings at DB Operation Selects an operation when the DB buffering is performed in the main-processing.
Buffering
Notification Selects this to notify that the DB buffering is performed in the main-processing.
Notification Destination Specifies the data to be used for the notification destination.
(Data Type) Displays the data type to be used for the notification destination.
Notification Data
(Data Type)
Specifies the data to be used as the notification data.
Displays the data type to be used as the notification data.
5
2. Click the [OK] button.
Window
Displayed items
Item Description
Post-Processing Settings Action Type Displays the action type.
Content Displays the outline details of each action according to the action type.
[Edit] button Sets an action of the selected row.
Page 73 Action settings
[Delete] button Deletes the settings of selected rows.
No. of Post-Processing Specifies the maximum number of settings for the post-processing action.
Actions
Operation Settings at Post- At Processing Failure Displays the settings of operation at post-processing failure.
Processing Failure
[Change] button Opens the "Operation Setting at Post-Processing Failure" window.
Operating procedure
1. Click the [Change] button on the [Post-Processing] tab on the "Job Settings" window to set the following items.
Item Description
Operation Settings at Post- Notification Selects this to notify the post-processing failure.
Processing Failure
Notification Destination Specifies the data to be used for the notification destination.
(Data Type) Displays the data type to be used for the notification destination.
Notification Data Specifies the data to be used as the notification data.
(Data Type) Displays the data type to be used as the notification data.
Operating procedure
1. Click the [Edit] button on the [Pre-Processing] tab/[Main-Processing] tab/[Post-Processing] tab on the "Job Settings"
window.
Window
Click the [DB Communication Action] button on the "Action Type Selection" window.
Displayed items
Item Description
DB Communication Action DB Communication Type Selects a DB communication type.
Settings
Access Table Selects the target access table (access procedure) for the DB communication.
(Access Procedure)
[...] button Opens the "Access Table/Procedure Settings" window of the corresponding access table
(access procedure).
Page 60 Access table/procedure settings
[Data Assignment] tab Sets the data assignment of the MES interface module in the DB communication.
[Narrowing-Down Conditions] tab Sets the narrowing-down of the target record in the DB communication.
[Sorting Order] tab Sets the priority order of the corresponding record in select.
[Option] tab Sets the optional function such as the number of target records notification in each DB
communication type.
[Exception] tab Sets the operation when an exception occurs in the DB communication.
Execution SQL Statements (Execution Procedure) Displays the SQL statements*1 and procedure executed in the current DB communication
action and procedures.
[OK] button Reflects the settings.
*1 The execution SQL statements may not be displayed properly when using the following combination of modules and software. In that
case, update MX MESInterface-R.
MES interface module: "06" or later
MX MESInterface-R: "1.03D" or earlier
■[Exception] tab
Item Description
No Applicable Record - Exception Setting Displays the operation setting when an exception (no applicable record) occurs.
Exception Settings (optional) [Change] button Opens the "Exception Settings (No Applicable Record)" window.
Multiple Applicable Records - Exception Setting Displays the operation setting when an exception (multiple applicable records) occurs.
Exception Settings (optional) [Change] button Opens the "Exception Settings (Multiple Applicable Records)" window.
Applicable Record Overflow - Exception Setting Displays the operation setting when an exception (applicable record overflow) occurs.
Exception Settings (optional) [Change] button Opens the "Exception Settings (Applicable Records Overflow)" window.
Window
Click the [External Communication Action] button on the "Action Type Selection" window.
Displayed items
Item Description
Target Server Selection Target Server Selects the target server for the external communication action.
[...] button Opens the "Target Server Settings" window for the corresponding target
server.
Page 58 Target server settings
Execution Command Setting Execution Command Sets commands to be executed in the program execution.
Program Execution Option Settings Option Displays the settings of the optional function such as execution completion
(optional) standby.
[Change] button Opens the "Program Execution Option Setting" window.
Return Value Mismatch - Exception Exception Setting Displays the settings of the operation when the return value does not match
Settings (optional) with the expected value.
[Change] button Opens the "Exception Settings (Return Value Mismatch)" window.
[OK] button Reflects the settings.
Window
Click the [Operation Action] button on the "Action Type Selection" window.
Displayed items
Item Description
Operation Action Settings Substitution Item Sets the data to substitute the operation result.
(Data Type) Displays the data type to substitute the operation result.
Operator Selects an operator.
First Item Sets the data (first item) to be used for operation.
(Data Type) Displays the data type (first item) to be used for operation.
Second Item Sets the data (second item) to be used for operation.
(Data Type) Displays the data type (second item) to be used for operation.
[Delete] button Deletes the data corresponding to the selected rows.
[OK] button Reflects the settings.
Window
Click the [Copy of Action] button on the "Action Type Selection" window.
Displayed items
Item Description
Copy Source Job Selection Copy Source Job Selects the job to copy an action.
Copy Action Selection*1 Action Type Displays the action type to be copied.
Content Displays the details of action to be copied.
[OK] button Copies the selected action.
*1 The display details are the same in the [Pre-Processing] tab, [Main-Processing] tab, and the [Post-Processing] tab.
Window
Displayed items
Item Description
Working History Settings (optional) Working History Selects whether to output or not output the working history.
Detailed Log Selects whether to output or not output the detailed log.
Data Output Inhibition Necessity Inhibit the data output to the target Selects this to inhibit the data output to avoid affecting to the target device at
Settings (optional) device the job operation verification.
Inhibit the data output to the target Selects this to inhibit the data output to avoid affecting to the target server at
server the job operation verification.
Job Execution Inhibition Necessity Inhibit the job execution even when Selects this to inhibit the job execution even when the trigger condition is
Setting (optional) the trigger condition is satisfied. satisfied.
DB connection function
The DB connection function connects the MES interface module and the ODBC interface for database.
The following shows the operation on the database server.
Database
5
Database
ODBC
server
Ó
Ò
Information linkage DB Connection
function Service
Ô
When accessing When SQL execution
is failed
SQL
Access
failure
log
log
An SQL statement or stored procedure execution request is received from the information linkage function performing on
the MES interface mode.
The SQL statement or stored procedure is executed by accessing the database via ODBC interface.
The execution result is sent to the MES interface module.
Program
Ó
Application
Ò
server
Information linkage DB Connection
function Service
When accessing
Access
log
A program execution request is received from the information linkage function performing on the MES interface module.
The program on the application server is executed.* 1
The program execution result is sent to the MES interface module.
*1 DB Connection Service Client (user session) executes programs.
DB Connection Service Client is automatically started at the time of user login.
Database
Configuration personal
computer
Database
ODBC
server
Ó
Ò
MES Interface
DB Connection
Function
Service
Configuration Tool
Ô
When accessing
Access
log
When clicking the [Browse DB Table Information] button, the [Browse DB Field Information] button, or the [Browse DB
Procedure Information] button of MES Interface Function Configuration Tool, a request to browse the table information or
stored procedure information is received from MES Interface Function Configuration Tool.
The table information (table name and field name) or stored procedure information in the database is acquired.
The table information (table name and field name) or stored procedure information is returned to MES Interface Function
Configuration Tool.
■Access log
The communication details between the MES interface module and DB Connection Service are output to the access log.
For access log specifications, refer to the following.
Page 124 Access log
Operating procedure
1. Set the following items, then click the [Reflect settings] button.
Item Description
Service port (required) Sets the port number where DB Connection Service operates.
DB access timeout (required) Sets the value of "DB access timeout" (unit: second) for the case when no response is returned to the MES
interface module after requesting the server to write/read the value to/from the database or execute a program.
Limit IP addresses permit to connect Specifies whether to set the connection-permitted IP address.
Output access log Sets whether to output the access log.
Output SQL failed log Sets whether to output the SQL failure log.
Log character code Specifies the character code of the log file (access log, SQL failure log) that is output by DB Connection Service
in ASCII/SJIS or Unicode.
2. After updating the settings, check whether any errors occurs by selecting [Administrative Tools] [Event Viewer] of
Windows.
Precautions
● Change the settings of DB Connection Service when a job using DB Connection Service is not operating.
The status is as follows:
• The programmable controller is powered off.
• The MES interface function is stopped to perform with [Online] [Remote operation] of MES Interface Function
Configuration Tool. (Page 115 MES interface module diagnostics)
● When reflecting the settings while a job using DB Connection Service is running, the execution of the connected job is
canceled and a communication error occurs.
For a job in which the DB buffering is enabled, any SQL statement is buffered in the DB buffer.
Setting data
Setting range: 1024 to 65535, Default: 5112
Setting data
Setting range: 1 to 3600, Default: 30
Setting data
Default: Output
■Output destination
This sets the output destination of a log file.
If no output destination is set, the log is output to an install folder.
If a read-only file is specified, the log is not output and "SQL failure log output error" is output to [Administrative Tools]
[Event Viewer] of Windows.
Setting data
Default: "sqlFailed.log"
Setting data
Setting range: 1 to 10 MB 2 to 100 files, Default: 1 MB 10 files
Setting data
Default: ASCII/SJIS
Product information
Operating procedure
1. Select [Help] [Product information] from the menu.
2. Set a connection route to access a device existing in the own station or other stations from the MES interface module in
[Target Device Settings]. (Page 90 Setting a target device)
3. Set a logic name to the device memory of the target device as a tag component in [Device Tag Settings]. Also, set the
group of device tag components as a device tag. (Page 91 Setting device tags)
4. Set the server type, network information, and user authentication information in [Target Server Settings]. (Page 93
Setting a target server)
5. Set a logic name to the table/procedure and field/procedure argument of the database as an access table/procedure and
access field/procedure argument in [Access Table/Proc. Settings]. (Page 94 Setting access tables)
6. Set the trigger condition that collects or transfers data, and create a transaction that relates the specific data with an
action in [Job Settings]. (Page 98 Setting jobs (GettingProject), Page 103 Setting jobs (Reporting))
1. Select!
Setting a network
Operating procedure
6
1. Select [Network Settings] in the edit item tree.
1. Select!
3. Click the [OK] button.
3. Click!
1. Select!
2. Select!
2. Click!
3. Click!
Operating procedure
1. Right-click [Device Tag Settings] in the edit item tree,
and select [Add Item].
1. Select!
2. Set!
3. Click!
Component Name Target Device Device Memory (Start) Device Memory (End) Data Type Length
Production plan volume ControlCPU D100 D100 Word [Unsigned]/Bit String [16-bit]
Specified weight ControlCPU D110 D110 Word [Unsigned]/Bit String [16-bit]
Size ControlCPU D120 D120 Character string [ASCII/SJIS] 2
Production plan volume ControlCPU X100 X100 Bit
acquisition
4. Select!
5. Set!
6. Click!
Component Name Target Device Device Memory (Start) Device Memory (End) Data Type Length
Pattern ControlCPU D0 D0 Word [Unsigned]/Bit String [16-bit]
Quality determination ControlCPU D140 D140 Word [Unsigned]/Bit String [16-bit]
Number of accepted ControlCPU D150 D150 Word [Unsigned]/Bit String [16-bit]
products
Number of rejected ControlCPU D160 D160 Word [Unsigned]/Bit String [16-bit]
products
Production volume ControlCPU D200 D200 Word [Unsigned]/Bit String [16-bit]
Container ID ControlCPU D210 D212 Character string [ASCII/SJIS] 6
1. Select!
Precautions
• Set the same IP address as TCP/IP of the personal computer.
Page 148 TCP/IP Setting on Personal Computer
• Set the same data source name as the one set on the [System DSN] in the ODBC setting.
Page 37 ODBC (Open Database Connectivity) Setting
• Set the same user name and password as the one set in the database.
The user name/password are the same as the login ID and password that are entered when the device is connected to the
following server.
Page 34 Database table creation procedure
Operating procedure
1. Right-click [Access Table/Proc. Settings] in the edit item
tree, and select [Add Item].
1. Select!
5. Click!
6. Click!
7. Click!
8. Click!
Access Field Name DB Field Name Data Type Precision Hold Default Value Setting Default Value
Pattern Pattern Integer Disable Disable
Size Size Character String Disable Disable
[Unicode(NCHAR)]
ProductionPlanVolume ProductionPlanVolume Integer Disable Disable
SpecifiedWeight SpecifiedWeight Integer Disable Disable
9. Select!
13. Click!
14. Click!
15. Click!
16. Click!
Access Field Name DB Field Name Data Type Precision Default Value Default
Hold Setting Value
ContainerID ContainerID Character String Disable Disable
[Unicode(NCHAR)]
DateAndTime DateAndTime Date and Time [Without Disable Disable
Time Zone]
QualityDetermination QualityDetermination Integer Disable Disable
TotalNumberOfAcceptedProducts TotalNumberOfAcceptedProducts Integer Disable Disable
TotalNumberOfRejectedProducts TotalNumberOfRejectedProducts Integer Disable Disable
Operating procedure
1. Right-click [Job Settings] in the edit item tree, and select
[Add Item].
1. Select!
3. Click!
8. Click!
10. Click!
13. Click!
15. Set!
15. Set!
16. Click!
17. Click!
Operating procedure
1. Right-click [Job Settings] in the edit item tree, and select
[Add Item].
1. Select!
3. Click!
7. Click!
• When the production is completed, 1 is added to D200 in the ladder program, so whether the production is
completed or not is determined according to the change of the value in D200.
• When the [Production stop/reset] button on the GOT is touched, the value in D200 is reset. (The value is
changed to 0.)
The condition, the production volume (D200) is 1 or more, is added not to insert the value to the database.
8. Click!
10. Click!
13. Click!
14. Set!
16. Click!
17. Click!
20. Click the save icon, name the file, and save it.
File name: school_MES_MESIF.mu2
20. Click!
20. Name!
Operating procedure
1. Select [Online] [Write to MES Interface Module] from
the menu in MES Interface Function Configuration Tool.
1. Select!
4. Click!
3. Click!
4. Click the [OK] button.
5. After the parameters are written, reset the CPU module,
and restart the MES interface module.
After resetting the CPU module, change the state of the
CPU module to "RUN".
Operating procedure
1. Select [MELSOFT] [DB connection service
setting tool] from Windows Start.
2. When using an operating system with the User
Account Control function, a warning message
relating to "DBCnctConf.exe" is displayed. Click the
1. Select! [Yes] button.
Operating procedure
1. Set the RUN/STOP/RESET switch of the CPU module
to the RUN position.
2. Touch the [1] button of "Production pattern selection"on
the GOT.
2. Touch!
3. Touch!
5. Touch!
When the [Production start] button is touched, the following operations are performed.
• Small containers are produced in every one second.
• ID numbers are assigned to the finished products. (S1, S2, S3, and others.)
• The finished products are checked if they are accepted or rejected.
• When the number of accepted products meets production plan volume, the production stops.
• Servomotor changes its number of rotations depending on the production patterns.
Small container: 1 rotation
Medium container: 2 rotations
Large container: 3 rotations
• If the production is stopped, the servomotor stops its operation.
6. Touch!
8. Select!
Operating procedure
1. Open the file "MC Works64_Demo.gdfx", and click the
1. Click! [Runtime] button.
Precautions
Depending on the operating status of jobs in a module or the status of peripherals (such as network and database), the
communication test may take time.
Before the performing communication test, check the operation status of jobs in a module and the status of peripherals.
7 TROUBLESHOOTING
114 7.1 Troubleshooting Functions
Diagnostics
This function performs MES interface module diagnostics by displaying the information in the MES interface module, and by
confirming the diagnostic information such as operating status and error status of the module.
In addition, remote operations such as error clear and module stop can be performed for the MES interface module.
Diagnostic function Description Reference
name
Diagnostics Displays the module status, error history, and product information of the module, and Page 115 MES interface module
performs the remote operation for the module status. diagnostics
Job Diagnostics Displays the working history and detailed log of the module. Page 117 Job diagnostics
This function changes temporarily the verification settings of the job set in the module.
Server Access Diagnostics Displays the connection status of the target server set in the module. Page 119 Server access diagnostics
Device Access Diagnostics Displays the connection status of the target device set in the module. Page 120 Device access diagnostics
DB Buffer Diagnostics Displays the current use status of the DB buffer in the module and performs Page 121 DB buffer diagnostics
operations manually.
SD Memory Card Diagnostics Displays the current use status of the SD memory card inserted in the module and Page 122 SD memory card
formats the SD memory card. diagnostics
Monitoring status
Operating status
Error status
Displayed items
Item Description
Product Information Displays the product information of the MES interface module.
Firmware Version Displays the firmware version of the MES interface module.
Project Name Displays the project name of the project operating in the MES interface module.
Date and Time of Project File Editing Displays the date and time of editing the project operating in the MES interface module.
[Module Status] tab Displays the monitoring status, operating status, and error status of the MES interface module, and performs the
remote operation of each status.
[Error History] tab Displays the error history of the MES interface module.
[Job Diagnostics] button Opens the "Job Diagnostics" window.
[Server Access Diagnostics] button Opens the "Server Access Diagnostics" window.
[Device Access Diagnostics] button Opens the "Device Access Diagnostics" window.
[DB Buffer Diagnostics] button Opens the "DB Buffer Diagnostics" window.
[SD Memory Card Diagnostics] button Opens the "SD Memory Card Diagnostics" window.
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 115
■[Module Status] tab
Item Description
Monitoring status Displays the monitoring status.
[Start Monitoring] button/ Switches the start monitoring and stop monitoring.
[Stopped Monitoring] button
Operating status Displays the operating status of the MES interface function and SD memory card status.
[Restart] button/[Stop] button Switches the restart and stop of the operation of the MES interface function.
When stopped, the operating processing is as follows:
• The trigger buffer will be cleared.
• When the job stops during execution before completing the main-processing, the job rolls
back to the database. The job returns to the status prior to execution without writing to the
device and ends. However, the variable and external communication action operations do not
return to the status prior to execution.
The job is completed by performing the post-processing and writing to the device after
completing the main-processing.
• When the job stops while communicating with the database, and if there is no response even
after waiting up till the communication time out time from the corresponding connection, then it
changes to unconnected status (In such a case it is not an error).
Error status Displays the error status of the MES interface module.
[Clear Error] button Clears the error status of the MES interface module.
Current error list*1 Occurrence Displays the occurrence date and time.
Operation Displays the error status.
Error Code Displays the error code.
Summary Displays an error outline.
Detailed Information Detailed Information Displays the detailed information of error.
Cause Displays the cause of error occurrence.
Corrective Action Displays the corrective action for clearing error.
Operating procedure
1. Click the [Create File] button on the [Error History] tab of the "Diagnostics" window.
2. Specify a save location and file name on the "Create File of Error History" window.
7 TROUBLESHOOTING
116 7.1 Troubleshooting Functions
Job diagnostics
This function displays the working history and detailed log of the MES interface module.
The function changes temporarily the verification settings of the job set in the MES interface module.
Window
Click the [Job Diagnostics] button on the "Diagnostics" window.
7
Displayed items
■[Working History] tab
Item Description
[Refresh] button Updates the working history to the latest information.
[History Clear] button Clears the working history.
[Create File] button Opens the "Create File of Event History" window.
Page 118 To save working history
No. of History Select the number of logs to be displayed on the working history list.
Working history list*1,*2 Warning icon Displays an icon depending on the error type.
: When the job execution result is processing failure and processing interruption.
: When the job execution is being inhibited or for the operation history (stop or restart
operations of the module) for the MES interface module
Date and Time Displays a date and time.
Job Name Displays the executed job name.
Content Displays the working contents of the job and operations for the module.
Comment Displays the comment set arbitrarily.
Detailed Log*3 When the "Detailed Log" is set to "Output" in the verification settings, the "Detailed Log" window
appears by clicking the [Display] button.
MELSEC iQ-R MES Interface Module User's Manual (Application)
[Trigger Buffering Status Confirmation] button Opens the "Trigger Buffering Status Confirmation" window.
MELSEC iQ-R MES Interface Module User's Manual (Application)
*1 When the "Detailed Log" is set to "Output" in the verification settings, it may not be displayed up to the maximum number of items
displayed (256).
*2 If the trigger buffering count reaches to the maximum number (192 counts) when the trigger buffering condition of a job, of which the
trigger buffering is enabled, is satisfied, the working history of the job will not be displayed.
*3 The detailed log may not be output when an error occurs at job execution.
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 117
■[Temporary Change Verification Settings] tab
Item Description
[Refresh] button Updates the verification settings information to the latest information.
Job to be Confirmed/Changed Target Job Selects the target job to be confirmed and changed.
Select
Confirmation and Change for Current Settings Displays the verification settings on the MES interface module.
Verification Settings
Change Item Selects the items to be changed.
Settings to be Changed Displays the settings to be changed.
[Change] button Requests a verification settings change to the MES interface module.
Operating procedure
1. Click the [Create File] button on the [Working History] tab of the "Job Diagnostics" window.
2. Specify a save location and file name on the "Create File of Event History" window.
7 TROUBLESHOOTING
118 7.1 Troubleshooting Functions
Server access diagnostics
This function displays the connection status of the target server set in the MES interface module.
Window
Click the [Server Access Diagnostics] button on the "Diagnostics" window.
Displayed items
7
Item Description
[Monitoring] button/[Stop Monitoring] button Switches the start monitoring and stop monitoring.
Server access connection status list Warning icon Displays an icon depending on the error type.
: Disconnected
: Not connected
Target Server Displays the server name registered in the target server settings.
Server Type Displays the server type registered in the target server settings.
Database Type Displays the connected database when the server type is a database server.
Status Displays the result of connection to the server from the MES interface module.
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 119
Device access diagnostics
This function displays the connection status of the target device set in the MES interface module.
Window
Click the [Device Access Diagnostics] button on the "Diagnostics" window.
Displayed items
Item Description
[Monitoring] button/[Stop Monitoring] button Switches the start monitoring and stop monitoring.
Device access connection status list Warning icon Displays an icon depending on the error type.
: Disconnected
: Not connected
Target Device Displays the device name registered in the target device settings.
Device Type Displays the device type registered in the target device settings.
Communication Route Displays the network settings.
Status Displays the result of connection to the device from the MES interface module.
7 TROUBLESHOOTING
120 7.1 Troubleshooting Functions
DB buffer diagnostics
This function displays the current use status of the DB buffer in the MES interface module and performs operations manually.
Window
Click the [DB Buffer Diagnostics] button on the "Diagnostics" window.
Displayed items
Item Description
DB Buffer Diagnostics [Monitoring] button/[Stop Monitoring]
button
Switches the start monitoring and stop monitoring.
7
Warning icon Displays an icon depending on the error type.
: When the use rate is 100%
: When the use rate is 1% to 99%
Current Stored Data Displays the number of jobs that the DB buffering is currently being
performed.
Maximum Stored Data Displays the maximum number of jobs that the DB buffering is performed after
starting the MES interface module.
[Clear] button Clears the maximum stored data.
Current Used Amount [KB] ([%]) Displays the current used amount and use rate of the DB buffering.
Maximum Used Amount [KB] ([%]) Displays the maximum used amount and use rate of the DB buffering after
starting the MES interface module.
[Clear] button Clears the maximum used amount.
Resending Status Displays the current resending status of DB buffer.
Resend Mode Displays the resend mode of DB buffer.
Operation at Recovery Displays the operation at recovery of DB buffer.
DB Buffer Size [MB] Displays the DB buffer size currently set.
DB Buffer Operation Target DB Buffer Selects the target DB buffering area.
[Start Resending] button Starts the resend of the DB buffering data.
[Stop Resending] button Stops the resend of the DB buffering data.
[DB Buffer Clear] button Clears the DB buffer.
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 121
SD memory card diagnostics
This function displays the current use status of the SD memory card inserted in the MES interface module and format the SD
memory card.
Window
Click the [SD Memory Card] button on the "Diagnostics" window.
Displayed items
Item Description
SD Memory Card Diagnostics [Refresh] button Updates the SD memory card status to the latest information.
Used Amount [KB] ([%]) Displays the used amount and use rate of an SD memory card.
Capacity [KB] Displays the capacity of an SD memory card.
SD Memory Card Operation [SD Memory Card Format] button Formats an SD memory card.
Precautions
All the settings of the MES interface module will be lost if the SD memory card is formatted since the settings are saved in the
SD memory card.
Read the current setting as necessary, and write the setting after formatting the card.
If the power is OFF to ON or the CPU module is reset without writing the setting in the SD memory card, the IP address of the
MES interface module returns to the initial status (192.168.3.3).
7 TROUBLESHOOTING
122 7.1 Troubleshooting Functions
One-shot execution function
The One-shot execution function executes an arbitrary job in an arbitrary timing regardless of the operation status of the MES
interface module.
The operation specification of the One-shot execution function is as follows:
1. The following operations can be executed by selecting the target job for one-shot execution (one-shot job) and selecting
[Online] [One-Shot Execution] in MES Interface Function Configuration Tool.
MES Interface Function Configuration Tool writes the settings required for the execution of one-shot job to the MES
interface module.
MES Interface Function Configuration Tool notifies the execution request of the one-shot job to the MES interface module.
Configuration Ò One-shot job setting information
personal computer writing MES interface module
MES Interface
Function
Configuration Tool
2. The MES interface module in which the notification has been received notifies the one-shot job execution request for the
Job execution control function. After that, the job is executed based on the settings written in Operation 1-.
Configuration
personal computer MES interface module
7
One-shot job setting information
One-shot
execution Operating based on the one-shot
Trigger condition monitoring function
request job setting information
3. After the one-shot job is completed, the MES interface module performs the following operations.
The execution result of the one-shot job is saved as a detailed log.
The settings written in Operation 1- are deleted.
Completion of the one-shot job and detailed log of the Operation 3- is notified to MES Interface Function Configuration
Tool.
Configuration
personal computer MES interface module
4. If canceling from MES Interface Function Configuration Tool during one-shot execution, or if the communication with the
setting tool is disconnected, the MES interface module will operate as follows:
The one-shot job is canceled.
The settings written in Operation 1- and detailed log are deleted.
The one-shot execution is ended without notifying the completion of the one-shot job.
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 123
Access log
The communication details between the MES interface module and DB Connection Service are output to the access log.
■Output destination
The output destination of a log file can be set.
If a file name only is specified, the log is output to an install folder.
If a read-only file is specified, the log is not output and "Access log output error" is output to [Administrative Tools] [Event
Viewer] of Windows.
Ex.
When the output destination is set to 'dbConnector.log' and the access log capacity is set to '1MB × 3 files'
Capacity
exceeded
New
dbConnector.log dbConnector.log
Ò Ren
ame
Ô dbConnector.log.002 dbConnector.log.002
Dele
te
7 TROUBLESHOOTING
124 7.1 Troubleshooting Functions
Access log details
For details on [Database error number] and [Database error message] in the output log format in the case of failure, refer to
the manual for each database.
Depending on the [Error code], the contents after 'Database Message' are not be output.
According to the error code, check the error details and take corrective actions.
MELSEC iQ-R MES Interface Module User's Manual (Application)
■Service start
Item Description
Output log format [Date] [Error code] Service Start
Example 2015/08/01 12:00:00.000 0x00000000 Service Start
■Service end
Item Description
Output log format [Date] [Error code] Service Stop
Example 2015/08/01 12:00:00.000 0x00000000 Service Stop
■Connection to a database
Item Description
Output log When [Date] [Error code] SID [Session ID]:DB Connect:[Target data source]:[Connection User Name]:Success
format succeeded
When failed [Date] [Error code] SID [Session ID]:DB Connect:[Target data source]:[Connection User Name]:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:DB Connect:DataSource:UserName:Success
succeeded
When failed 2015/08/01 12:00:00.000 0x20400022 SID 00000001:DB Connect:DataSource:UserName:Failed
Database Message 0x000003f9 [Oracle][ODBC][Ora]ORA-01017: invalid username/password;logon denied
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 125
■SQL statement reception/processing results
• SELECT
Item Description
Output log When [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Success([No. of selected records])
format succeeded
When failed [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:SQL<SELECT COL from TABLE;>:Success(1)
succeeded
When failed 2015/08/01 12:00:00.000 0x20600023 SID 00000001:SQL<SELECT COLL from TABLE;>:Failed
Database Message 0x00000388 [Oracle][ODBC][Ora]ORA-00904: "COLL": invalid identifier
• UPDATE
Item Description
Output log When [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Success([No. of updated records])
format succeeded
When failed [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:SQL<UPDATE TABLE SET COL = '1';>:Success(1)
succeeded
When failed 2015/08/01 12:00:00.000 0x20600023 SID 00000001:SQL<UPDATE TABLE SET COL = 'COL';>:Failed
Database Message 0x000006ba [Oracle][ODBC][Ora]ORA-01722: invalid number
• INSERT
Item Description
Output log When [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Success([No. of inserted records])
format succeeded
When failed [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:SQL<INSERT INTO TABLE (COL) VALUES ('1');>:Success(1)
succeeded
When failed 2015/08/01 12:00:00.000 0x20600023 SID 00000001:SQL<INSERT INTO TABLE (COL) VALUES ('1');>:Failed
Database Message 0x000003ae [Oracle][ODBC][Ora]ORA-00942: table or view does not exist
• COMMIT
Item Description
Output log When [Date] [Error code] SID [Session ID]:COMMIT:Success
format succeeded
When failed [Date] [Error code] SID [Session ID]:COMMIT:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:COMMIT:Success
succeeded
• ROLLBACK
Item Description
Output log When [Date] [Error code] SID [Session ID]:ROLLBACK:Success
format succeeded
When failed [Date] [Error code] SID [Session ID]:ROLLBACK:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:ROLLBACK:Success
succeeded
7 TROUBLESHOOTING
126 7.1 Troubleshooting Functions
• DELETE
Item Description
Output log When [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Success([No. of deleted records])
format succeeded
When failed [Date] [Error code] SID [Session ID]:SQL<[SQL statement]>:Failed
Database Message [Database error number] [Database error message]
Example When 2015/08/01 12:00:00.000 0x00000000 SID 00000001:SQL<DELETE FROM TABLE;>:Success(1)
succeeded
When failed 2015/08/01 12:00:00.000 0x20600023 SID 00000c60:SQL<DELETE FROM table1 ;>:Failed
Database Message 0x000003ae [Oracle][ODBC][Ora]ORA-00942: table or view does not exist.
7 TROUBLESHOOTING
7.1 Troubleshooting Functions 127
7.2 Troubleshooting Operation Check
This section describes how to detect and correct improper settings in the project "school_MES_MESIF_troubleshoot.mu2"
using the troubleshooting functions, and check whether the corrected settings operate properly.
The following functions are used as the troubleshooting functions; "communication test function", "diagnose MES interface
module", "one-shot execution function", and "access log".
Troubleshooting 1
The troubleshooting is performed by using the "communication test function" and "access log".
Checking errors
■Communication test function
Operating procedure
1. Open the project
"school_MES_MESIF_troubleshoot.mu2". Click the
[Communication Test] button on the "Target Server
Setting No.[1]" window of MES Interface Function
Configuration Tool.
1. Click!
2. Click!
7 TROUBLESHOOTING
128 7.2 Troubleshooting Operation Check
3. Click the [OK] button.
3. Click!
7 TROUBLESHOOTING
7.2 Troubleshooting Operation Check 129
■Access log
Operating procedure
1. On Windows, select [MELSOFT] [DB connection
service setting tool] from the start menu.
4. Check!
7 TROUBLESHOOTING
130 7.2 Troubleshooting Operation Check
Correcting errors
According to the access log, there is an error in data source name From this result, it is assumed that the name entered in
"Data Source Name" on the "Target Server Setting No.[1]" window is inappropriate.
Operating procedure
1. An unnecessary one-byte space has been added to the
end of the data source name, so the name differs from
the data source name set in Page 37 ODBC (Open
Database Connectivity) Setting. This caused the error.
Delete the one-byte space to correct the name in "Data
Source Name".
1. Correct!
2. Click!
3. Select!
7 TROUBLESHOOTING
7.2 Troubleshooting Operation Check 131
Troubleshooting 2
The troubleshooting is performed by using the MES interface module diagnostics, one-shot execution function, access log,
and referring to their results. Although how an error is displayed differs among the these methods, the error occurred is
identical.
Checking errors
■MES interface module diagnostics (Job diagnostics)
Operating procedure
1. Select [Online] [Diagnose MES Interface Module] in
MES Interface Function Configuration Tool.
1. Select!
2. Click!
7 TROUBLESHOOTING
132 7.2 Troubleshooting Operation Check
3. Click the [Temporary Change Verification Settings] tab,
and select the target job to be diagnosed. Select the
"Change Item" checkboxes of "Working History" and
"Detailed Log" to output them.
Click the [Change] button.
4. Click!
8. Click!
7 TROUBLESHOOTING
7.2 Troubleshooting Operation Check 133
9. On the "Detailed Log" window, check execution results
of actions actually executed, and correct improper
settings.
Operating procedure
1. Select a target job to execute the one-shot execution
function, and select [Online] [One-Shot Execution] on
the "Job Setting No.[1]" window of MES Interface
Function Configuration Tool.
1. Select!
7 TROUBLESHOOTING
134 7.2 Troubleshooting Operation Check
■Access log
Operating procedure
1. Perform "Page 110 Operation Check".
3. Check!
7 TROUBLESHOOTING
7.2 Troubleshooting Operation Check 135
Correcting errors
According to the access log, there are errors in the execution SQL statements of "Reporting" in "Job Names". In the access
log, an error "Cannot insert the value NULL into column 'Pattern', table 'master.dbo.Project'; column does not allow nulls." is
confirmed. This means that the table and row to which the value should be inserted are container ID and other items in the
'master.dbo.Judgement' row. Therefore, it can be assumed that there is an error in their settings.
Operating procedure
1. Open the "DB Communication Action" for "Main-
Processing" of "Reporting".
3. Click!
4. Click!
7 TROUBLESHOOTING
136 7.2 Troubleshooting Operation Check
5. Write the setting to the MES interface module.
Page 108 Writing parameters to the MES
interface module
5. Select!
7 TROUBLESHOOTING
7.2 Troubleshooting Operation Check 137
APPENDICES
Appendix 1 MC Works64
MC Works64
Mitsubishi Electric provides MC Works64 that is a SCADA software package with a highly functional monitoring control
system designed for industrial systems, instrumentation systems in plants, air conditioning/lightening systems in buildings,
and social infrastructure.
This software includes the function required for variety of industries and systems and these function can be flexibly integrated
to construct unique systems by users.
The functions can be added or changed as desired by the users to customize the systems.
MC Works64 is the advanced software that can operate together with cloud services or business process management
systems such as ERP for responding to the Iot age.
Basic functions
Application name Function
Workbench Desktop Project management function that builds applications of all the MC Works64 related products
GraphWorX64 Window configuration function that configures advanced monitoring screens allowing the 2D/3D animation, utilization of
symbols, linkage with videos, and other functions
TrendWorX64 Trend display function that displays advance trend graphs allowing split and overlapped displays
AlarmWorX64 Alarm function that displays notification lists of the standard alarms and an alarm chart of every alarm type
Advanced functions
Application name Function
Workbench-SL Project management function that builds applications of all the MC Works64 related products
MC AppBuilder Project auto generation function
APPX
138 Appendix 1 MC Works64
Features
■Enhanced visibility and operability
3D graphics enables to monitor devices from various angles with stereoscopic displays that are not achieved with 2D
graphics.
On a 3D graphic window, users can shift the window's viewpoint freely and zoom in/out the window, so monitor an entire
equipment as well as details of an equipment.
Integrating with 2D graphic windows which are excellent in monitoring device operating status and displaying measurement
data enhances the visibility and operability of the monitoring windows.
■Enhanced reliability
MC Works64 enables to construct a sever redundant systems and server-and- client systems.
Two servers, a control server and a standby server, can be utilized to enhance the reliability of the system and reduce the
communication load on the network.
Server systems can be configured flexibly depending on system scale, from large-scaled systems to standalone systems.
APPX
Appendix 1 MC Works64 139
SCADA software
SCADA is the abbreviation for Supervisory Control And Data Acquisition. It is a system of software controlled with a personal
computer to perform industrial system supervision, system control, and data acquisition.
The basic configuration includes client personal computers, an SCADA server, and programmable controllers as shown
below.
Industrial systems are normally controlled using the programmable controllers and relevant data, such as production results
and process values, is collected in the SCADA server.
The collected data is interconnected with graphics to operate animations on a screen of an HMI (Human-Machine Interface)
on the SCADA server, recorded as logs, and utilized to notify alarms.
When collecting data from programmable controllers, device addresses of the programmable controllers and data elements,
known as tags, handled on the SCADA server need to be linked. Tag databases manage this processing//operation.
To check log data, alarms, and graphics, open an HMI screen by accessing the server from a client personal computer.
Alternatively, the HMI screen can be opened directly on the server.
SCADA system primally collect data. In addition to this function, it converts values on the HMI screen to send instructions to
control systems and sends signals for production instructions and process values to the programmable controller after the
buttons are pressed.
Client personal computer
DB SCADA server
Programmable controller
APPX
140 Appendix 1 MC Works64
What to learn in this training course
MC Works64 is used to transfer information which is acquired in a CPU module to databases via the MES interface module
and efficiently visualize them. This training practices the operations of (1) and (2). The details on (3) can be learnt in another
training course.
(3)
Displaying the inserted data.
(2)
Control system
A
APPX
Appendix 1 MC Works64 141
Appendix 2 Database Management System
Operating procedure
1. Start the downloaded installer.
2. Click!
APPX
142 Appendix 2 Database Management System
3. Select "Custom" in the installation type.
3. Select!
4. Click!
A
5. Select!
APPX
Appendix 2 Database Management System 143
6. Select the "I accept the license terms and Privacy
Statement." checkbox.
7. Click the [Next] button.
7. Click!
6. Select!
8. Click!
10. Click!
APPX
144 Appendix 2 Database Management System
11. Set the server configuration according to the
database server personal computer to be used and
the network environment. Click the [Next] button.
11. Click!
15. Click!
APPX
Appendix 2 Database Management System 145
■Installing the latest version of SQL Server Management Studio
Operating procedure
1. Return to the "SQL Server Installation Center"
window, and select "Install SQL Server Management
Tools".
1. Select!
2. Select!
3. Click!
APPX
146 Appendix 2 Database Management System
4. When the "User Account Control" window appears,
click the [Yes] button.
5. Click the [Install] button.
5. Click!
6. Click!
A
APPX
Appendix 2 Database Management System 147
Appendix 3 TCP/IP Setting on Personal Computer
This section describes how to set TCP/IP in a personal computer operated with Microsoft Windows 10 Operating System.
Operating procedure
1. On Windows, select [System Tools]
[Control Panel] from the start menu.
1. Select!
2. Select!
APPX
148 Appendix 3 TCP/IP Setting on Personal Computer
3. Select "Ethernet".
3. Select!
4. Click!
APPX
Appendix 3 TCP/IP Setting on Personal Computer 149
5. Select [Internet Protocol Version 4 (TCP/
IPv4)].
6. Click the [Properties] button.
5. Select!
6. Click!
8. Click!
APPX
150 Appendix 3 TCP/IP Setting on Personal Computer
9. Click the [Close] button.
9. Click!
A
10. Click the [Close] button.
10. Click!
APPX
Appendix 3 TCP/IP Setting on Personal Computer 151
MEMO
APPX
152 Appendix 3 TCP/IP Setting on Personal Computer SH(NA)-082342ENG-A
Mitsubishi Programmable Controllers Training Manual
MES Interface Basic Course
MODEL -
CODE
SH(NA)-082342ENG-A(2004)MEE
HEAD OFFICE: TOKYO BLDG., 2-7-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS: 1-14, YADA-MINAMI 5-CHOME, HIGASHI-KU, NAGOYA 461-8670, JAPAN
When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.