You are on page 1of 68

SAFETY PRECAUTIONS

(Always read these instructions before using this equipment.)


Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly. The instructions given in this manual are concerned with this product. For the safety instructions of the programmable controller system, please read the CPU module user's manual. In this manual, the safety instructions are ranked as "DANGER" and "CAUTION".

DANGER CAUTION

Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury. Indicates that incorrect handling may cause hazardous conditions, resulting in medium or slight personal injury or physical damage.

Note that the ! CAUTION level may lead to a serious consequence according to the circumstances. Always follow the instructions of both levels because they are important to personal safety.

Please save this manual to make it accessible when required and always forward it to the end user.

[Design Instructions]

DANGER
When performing data changes or status control from the personal computer to the running PLC, configure up an interlock circuit outside the PLC system to ensure that the whole system will operate safely. In addition, predetermine corrective actions for the system so that you can take measures against any communication error caused by a cable connection fault or the like in online operations performed from the peripheral device to the PLC.

CAUTION
Read the manual carefully before performing the online operations (especially forced output and operating status change) which will be executed with the personal computer connected to the running CPU module. Not doing so can damage the machine or cause an accident due to misoperation.

REVISIONS
Print Date Aug, 2008 Jun, 2009 * The manual number is given on the bottom left of the back cover. * Manual Number Revisions BAD-804Q008-A0 First edition BAD-804Q008-A1 Correction Section 1.3 Section 2.2 Section 3.2 BAD-804Q008-A2 Correction Before You Begin Section 3.1 Section 3.2 BAD-804Q008-A3 Correction Before you begin BAD-804Q008-A4 Correction Chapter 1 Chapter 2 Chapter 3 BAD-804Q008-A5 Correction Chapter 1

Feb, 2010

Sep, 2010 Jun, 2011

Jun, 2012

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.

This book applies to the Mitsubishi Electric Corporation MESInterface IT product components and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the product. MITSUBISHI ELECTRIC CORPORATION PROVIDES THIS BOOK "AS IS," WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions therefore, this statement may not apply to you. This book could contain technical inaccuracies or typographical errors. Changes are made periodically to the information herein. Mitsubishi Electric Corporation may make improvements and changes at any time to the product(s) and/or program(s) described in this book. When you send information to Mitsubishi Electric Corporation, you grant Mitsubishi Electric Corporation a nonexclusive right to use or distribute the information in any way it believes appropriate, without incurring any obligation to you.

2012 ILS Technology, Licensed to Mitsubishi Electric Corporation

Contents
Before you begin
Assumptions ..................................................................................................................... i About the sample trigger ................................................................................................. ii Process for creating the sample trigger .......................................................................... iii Define the transport ................................................................................................ iii Build the transport map .......................................................................................... iv Create a project ....................................................................................................... iv Create the trigger .................................................................................................... iv Connecting to the MESInterface IT node ...................................................................... iv Shutting down the Workbench ........................................................................................ x

Chapter 1: Defining the transport


1-1 Supported transport protocols ................................................................................. 1-2 1-2 Assumptions ........................................................................................................... 1-3 1-3 Defining the database transport .............................................................................. 1-4 1-3-1 Specifying connection parameters ............................................................... 1-6 1-3-2 Turning on store and forward ....................................................................... 1-8 1-3-3 Adding timeout values ................................................................................. 1-9 1-3-4 Turning on the map log .............................................................................. 1-10 1-3-5 Setting the transport to load at initialization .............................................. 1-11 1-3-6 Validating and saving the transport ........................................................... 1-11

Chapter 2: Building the transport map


2-1 Overview of the transport map elements ................................................................ 2-2 2-2 Creating the transport map ..................................................................................... 2-3 2-2-1 Adding a database table ............................................................................... 2-5 2-2-2 Defining the map variables .......................................................................... 2-6 2-2-3 Associating map variables with table columns .......................................... 2-11

Chapter 3: Creating the trigger


3-1 Creating a project ................................................................................................... 3-2 3-2 Creating the schedule trigger .................................................................................. 3-5 Contents

Contents

3-2-1 Adding the transport map ............................................................................. 3-9 3-2-2 Associating PLC device variables with map variables .............................. 3-11 3-3 Starting and stopping projects and triggers .......................................................... 3-18 3-4 Performing start operations from the project level ............................................... 3-19

Appendix A: Notices
Disclaimers .................................................................................................................. A-1 Trademarks .................................................................................................................. A-1

: Index

ii Contents

Before you begin


This product combines a Workbench program that runs on the same network as your programmable logic controller and a MESInterface IT node that is installed in a slot on the controllers backplane.

Chapter 0

The MESInterface IT node is a hardware module with MESInterface IT runtime software embedded. The Workbench is used to configure the MESInterface IT node. The system enables communication between the plant floor and the business enterprise. To start the interactive process, you must have a trigger. This book provides step-by-step instructions on how to create a trigger using the Workbench program.

Assumptions
This book assumes that you have completed the following tasks: Installed the MESInterface IT node on a supported PLC.

Before you begin

Before you begin

Installed the Workbench on a computer that has TCP connectivity to the MESInterface IT node. Started the Workbench, installed the appropriate the MESInterface IT license keys, and performed initial setup.

This book also assumes that you are a new user of the Workbench. Before you begin creating your first trigger, you should review the sample trigger that will be used throughout this book including the process map for creating the sample trigger. This chapter also provides the steps to start the Workbench and connect to a specific MESInterface IT node. Each Workbench feature is briefly described.

About the sample trigger


The sample trigger described in this book was designed to combine an SQL Insert operation and a scheduled event. When started, the trigger will execute every 5 seconds. The sample trigger is made up of these components:
MyFirstTransportMap MyDatabaseTransport
From Trigger

Map variables
To Enterprise

MyFirstTrigger Schedule event Transaction action MyFirstTransportMap

Payload

The components are named as follows: MyDatabaseTransport This is the transport that you will create. This transport provides the database table that data will be routed to. The transport is created before any of the other components. You must have a database product installed and your database

ii

Before you begin

Before you begin

administrator must have created the database tables, provided you with the IP address of the database server, and a user ID and password. For more information, see Defining the transport on page 1-1. MyFirstTransportMap This is the transport map that you will create. The transport map provides the mapping of the plant floor data into format that the enterprise system is expecting (in this case, columns in a database table). All transport maps require a transport. This transport map will use the MyDatabaseTransport transport. For more information, see Building the transport map on page 2-1. MyFirstTrigger This is the trigger you will create. This trigger provides a scheduled event that is set to execute every 5 seconds. When the event occurs and the trigger executes, the trigger data will be input for MyFirstTransportMap. For more information, see Creating the trigger on page 3-1.

Process for creating the sample trigger


The process to create the trigger includes selecting the type of data to be captured, define the event on which to send it, and indicate to the system how and where the data should be sent. The Workbench provides the means to create the trigger and its associated components. Once the trigger is created, the Workbench is used to start the trigger. A trigger that is started is registered for events and is ready to execute. The following describes the steps to create your first trigger. Each step represents an element in the trigger with a brief description so that you can begin to understand each of the elements that are required to make up the trigger and any pre-requisite software.

Define the transport


You can think of a transport as the link to and from the plant floor and the enterprise system. The transport provides the destination information for the data. Data can be sent to a specific location on the intranet or Internet or stored locally in a database. For this example, a database table will be used as the transport. For more information, see Building the transport map on page 2-1.
Before you begin

iii

Before you begin

Build the transport map


The transport map provides the mechanism to use logical names for data items instead of plant floor PLC device variable names as the source or destination of enterprise data. When you define the transport map, you specify a transport and then specify the format for the presentation of the content of the data (such as database insert). For this trigger example, the logical names are mapped to a specific column in a database table. For more information, see Building the transport map on page 2-1.

Create a project
Before you can create a trigger, you must create a project. A project is simply a group of triggers. The grouping enables global operations that apply to all triggers in the project. The project also serves to organize the MESInterface IT nodes work environment. For more information, see Creating a project on page 3-2.

Create the trigger


A trigger executes to provide operations that you specify such as writing a row of data to a database table. A trigger is the logical pairing of an action (such as a database insert operation) to a plant floor event. The event could be a machine fault. The corresponding response could be to insert the event data into a database table. For more information, see Creating the schedule trigger on page 3-5.

Connecting to the MESInterface IT node


Before you can build the trigger, you must start the Workbench and then connect to a specific MESInterface IT node where you want the trigger to reside. Assumptions: It is assumed that the Workbench was previously started and at least one MESInterface IT node was setup to work in the companys network.

iv

Before you begin

Before you begin

It is expected that you were also given a user ID and password for the Workbench.

To start the Workbench: 1. From the Windows Start menu, click All Programs >MELSOFT Application > MESInterface IT Workbench>Workbench. There is another way to start the Workbench on Windows. During installation, a Workbench icon was placed on your desktop.You can double-click that icon to start the Workbench. When the Workbench starts, a window similar to the following appears.

2. At the bottom of the window, type your user name and password, and then click Logon.

Before you begin

Before you begin

After the Workbench window appears, you can connect to one or more MESInterface IT nodes and begin your work. 3. From the Workbench left pane, click the Nodes icon. A list of MESInterface IT nodes appear in the left pane. These are the MESInterface IT nodes that were saved when the Workbench was last shut down.

Left pane

Right pane

The right pane provides a summary and status of each MESInterface IT node. 4. From the left pane, click the MESInterface IT node you want to connect to. MESInterface IT checks to see if you are an authorized user for this module. When your credentials are authenticated, the status window for the module appears as the default right pane. At this point, you are connected to the specific MESInterface IT node.

vi

Before you begin

Before you begin

The left pane provides an expandable tree view. Each icon is a link to that feature. Projects Displays a tab with a list of projects for the current MESInterface IT node. Each project will have its own tab. You can add a new project, edit an existing project, and start and stop individual or all projects from this tab. Once a project is created, you can double-click the project name and then add a trigger. The trigger will belong to the project tab under which it was created. Enterprise Displays Transports, Transport Maps, Listeners, and Listener Maps tabs as the right pane. Transport Maps Displays a tab with a list of transport maps and their associated transports for the current MESInterface IT node. A status of each transport map is also provided. You can add a new transport map or change an existing transport map from this window. For information about this feature, refer to the Enterprise Connectivity User's Guide available from the Workbench Help menu. Transports Displays a tab with a list of transports that are available for the current MESInterface IT node. You can edit an existing transport or add a new transport from this window. For information about this feature, refer to the Enterprise Connectivity User's Guide available from the Workbench Help menu.

Before you begin

vii

Before you begin

Listener Maps Displays a tab with a list of listener maps that are available for the current MESInterface IT node. Status and details about each listener map is provided such as the name and type of the listener the map is associated with. You can edit an existing listener map or add a new map from this window. For information about this feature, refer to the Enterprise Connectivity User's Guide available from the Workbench Help menu. Listeners Displays a tab with a list of listeners that are available for the current MESInterface IT node. You can edit an existing listener or add a new listener from this window. For information about this feature, refer to the Enterprise Connectivity User's Guide available from the Workbench Help menu. Devices Provides the Devices, Variables tabs as the right pane. The Devices tab lists of one or more local CPUs installed on the rack. You can also add a connection to a remote CPU using this feature. For more information, refer to the User's Guide available from the Workbench Help menu. Variables Displays a tab that lists all the device variables that are available in the controller's memory. From this window, you can also perform read or write operations on the appropriate device. For more information, refer to the User's Guide available from the Workbench Help menu.

viii

Before you begin

Before you begin

Logs and Reports Provides the Overview, Exceptions Log, Audit Log, Reports, and Mapping Logs tabs. The Overview tab provides a list of log files by type such as listener, system, and transport. You can doubleclick the type of logging activity or click Open. Activity is viewed by date, time, activity, message content, and so forth. Tabs let you access system exception and audit logs, and mapping logs, or generate runtime statistics. For more information, refer to the User's Guide available from the Workbench Help menu. Local Database Displays a set of tabs that let you create a database table, add an index, and type SQL commands directly to the database. The MESInterface IT node comes installed with a database product. This local database resides on the MESInterface IT node. There are six predefined transports for the database. When you create a local database table, it becomes available to use with a transport map. For more information, refer to the Enterprise Connectivity Users Guide available from the Workbench Help menu. Administration Displays a set of tabs to add users and assign privileges, configure or change general network settings, set the current time and date for an installed MESInterface IT node, and more. For more information, refer to System Administration available from the Workbench Help menu. Now that you have started the Workbench and connected to a specific MESInterface IT node, you are ready to build your first trigger. The first step is to add a transport to the system.

Before you begin

ix

Before you begin

Shutting down the Workbench


Whenever the Workbench is shut down, the results of the last scan are saved. Subsequent restarts automatically display the MESInterface IT nodes that were saved. To shut down the Workbench: 1. From the User menu, click Exit. 2. A message asks you if you want to exit the Workbench. Click Yes.

Before you begin

Defining the transport

Chapter 1

Transports refer to the transferring of data that is generated when a trigger condition occurs. For the sample trigger, the data will be propagated to a relational database. The output format of the data will be a database insert. This chapter will described how to create a transport that will provide delivery of data to a relational database. The transport must be available before the trigger is created. Refer to the Enterprise Connectivity User's Guide for a comprehensive set of tasks when using the transport feature.

1-1

Defining the transport

1-1 Supported transport protocols


MESInterface IT nodes support specific transport protocols that are turned on using a license activation key. The transport that is created in this chapter is based on the IBM DB2 database product. You can also setup a transport to take advantage of the following relational database products: IBM DB2 Universal Database Oracle 10g,11g Database Microsoft SQL Server Local database (default) In addition, there is license activation available for IBMs WebSphere MQ product; however, TCP and e-mail protocols are included free with each MESInterface IT node.

1-2

1-1 Supported transport protocols

Defining the transport

1-2 Assumptions
Information in this chapter assumes the following: The Workbench was previously started. For more information, see Connecting to the MESInterface IT node on page 1-iv. There is a database product installed and configured on the network. Your database administrator created a database and populated the database with tables. The administrator gave you the name of one or more databases. Your database administrator provided you with the IP address of the computer where the database resides. You have the user ID and password needed to log on to the database. You have some understanding of relational databases and SQL.

1-2 Assumptions

1-3

Defining the transport

1-3 Defining the database transport


You can create a transport that will be able to generate a value for a newly inserted row in a database table. It is assumed that the Workbench is started and you have logged on. 1. From the Workbench left pane, expand the MESInterface IT node that you want to associate the new transport with. A progress indicator might appear.

The Workbench is simply checking communication with the MESInterface IT node.

1-4

1-3 Defining the database transport

Defining the transport

2. Expand Enterprise, right-click the Transports icon to display its pop-up menu.

3. Click New. The Create Transport default window appears. 4. In the Name box, type MyDatabaseTransport. This will be the unique name for the transport. You will not be able to type invalid characters. For example, spaces are not allowed. You will not be able to insert a space in the name. 5. Next to Type, click the down-arrow, and then select DB.

1-3 Defining the database transport

1-5

Defining the transport

The Create Transport window changes to accommodate the definition for a DB2 database transport. The Create Transport window has several tabs. Each tab and its parameters will be described separately.

1-3-1 Specifying connection parameters


The Parameters tab provides parameters that let you add communication parameters so that the transport is able to connect to the database.

1. In the DB Name box, type DWDB. This is the name of the database to use. The database must exist and be populated with tables. 2. Use the DB Type down arrow to display a list of installed databases.

3. In the Host box, type the IP address of the computer where the database whose name you just typed in DB Name resides.

1-6

1-3 Defining the database transport 1-3-1 Specifying connection parameters

Defining the transport

4. In the Port box, accept the default value of 50000. 5. In the User and Password boxes, type the user ID and password given to you by the database administrator. These are the user ID and password to access the database. The bottom of the Parameters tab provides these optional features:

Click the Extended Attributes button to display the Extended Attributes window. Each database has published a list of properties that can be specified to alter the connection settings when connecting to the database server. You can use the Extended Attributes window to specify these settings. Typically, you should only modify these values if required by your database administrator. A connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. The Connection Pool Size value is the maximum number of new connections to create and store in the pool. The default value is 1. By default, a transport is down until it processes a transaction. Select the Load transport at initialization check box to have the transport connect to the host as soon as the MESInterface IT node boots up (or immediately after leaving store and forward). Thus, when the first transaction comes in, processing is faster because the transaction does not have to initialize the transport (the connection is already established).

1-3 Defining the database transport 1-3-1 Specifying connection parameters

1-7

Defining the transport

1-3-2 Turning on store and forward


The Store & Forward tab provides values for store and forward queues.

Accept the default value for each Store & Forward parameter. The following describes those default values: The Store & Forward Select this check box to turn on store and forward. The Store and Forward queue for this transport will be based on the TTL (time to live), Max Storage, and On overflow parameters. TTL (sec) TTL means time-to-live in seconds which is how long to retain messages that are in the store and forward queue. Max Storage (MB) The maximum size of the store and forward queue for this transport. The default is 20 MB. The only limit is the amount of disk space on the MESInterface IT node. On overflow Options are: Discard new message Do not accept any new messages once the store and forward queue reaches its maximum size. Delete oldest message Have the oldest messages discarded in a first in/first out (FIFO) manner when the store and forward queue becomes full. Process queue before leaving S/F When the Process queue before leaving S/F check box is selected, and the connection is re-established, data is delivered in the order in

1-8

1-3 Defining the database transport 1-3-2 Turning on store and forward

Defining the transport

which it entered the store and forward queue. When the Process queue before leaving S/F check box is not selected, as soon as the connection is re-established, new data is not added to the store and forward queue but; instead, is sent directly to the end-point application.

1-3-3 Adding timeout values


The Timeout tab provides values that affect connection times.

Accept the default value for each Timeout parameter. The following describes those default values: Connection (seconds) The Connection timeout parameter defaults to 10 seconds and specifies the length of time the system will try to connect to a target computer (where the associated database program is running). If the connection is not made in the specified time period, an error message is sent to the exception log. For more information, see the MESInterface IT Users Guide. This connection is tested when you click Validate (see Validating and saving the transport on page 1-11). Execution (seconds) The Execution timeout parameter defaults to 5 seconds and specifies the amount of time the MESInterface IT should wait (once the connection is made) for a transaction to complete. The time value should be the outer limit for how long you expect a typical transaction to take using a transport. Because store and forward is turned on, the execution timeout value will also specify the amount of time the MESInterface IT node will wait before attempting to either switch to store and forward mode (for
1-3 Defining the database transport 1-3-3 Adding timeout values

1-9

Defining the transport

the database Insert operation). For more information, see the Enterprise Connectivity User's Guide. Inactivity (seconds) The Inactivity timeout parameter specifies the maximum number of seconds of inactivity the MESInterface IT will wait before disconnecting from the database.

1-3-4 Turning on the map log


This section provides a Mapping Log check box that turns on transaction logging for the transport. The content of every outbound transaction for the transport will be recorded in a log file.

Select the Mapping Log check box, and then accept the default values for the remaining parameters. Their descriptions follow: Log Size (MB) The value is the maximum size of the log file for this transport. The size can be from 1 MB to 10 MB. Once the log file reaches that size, a new file is created and named as Name_1.log. Message Size (byte) The value controls the length of the line recorded in the log file for this transport. For this example, accept the default to specify that the entire message be recorded. Number of Log Files The value is the number of log files that can be maintained for this transport. Log files are maintained as numbered logs (1 to 10). Copy rolled log to staging When selected, MESInterface IT sends a copy of that log file to the root of the staging file system (the Staging Browser tab).

1-10

1-3 Defining the database transport 1-3-4 Turning on the map log

Defining the transport

1-3-5 Setting the transport to load at initialization


By default, a transport is down until it processes a transaction.

Select the Load transport at initialization check box to have the transport connect to the host as soon as the MESInterface IT node boots up (or immediately after leaving store and forward). Thus, when the first transaction comes in, processing is faster because the transaction does not have to initialize the transport (the connection is already established).

1-3-6 Validating and saving the transport


Now that you have filled in the appropriate value for each parameter, you must validate the connection, and then save your work. 1. Click Validate. The Workbench tests the connection to the database. 2. A message will tell you whether or not the validation was successful. Click OK.

1-3 Defining the database transport 1-3-5 Setting the transport to load at initialization

1-11

Defining the transport

3. If no errors are received, click Save. The new transport is saved to the MESInterface IT node and added to the Transports tab.

The Transports tab provides information about transport processing such as whether a transport is operational or in a store and forward mode.

The next step is to create the transport map and create the input that will be used to build the payload at run time. Go to Building the transport map on page 2-1.

1-12

1-3 Defining the database transport 1-3-6 Validating and saving the transport

Building the transport map

Chapter 2

This chapter will describe how to build a transport map. A transport map is a mechanism by which data is exchanged between the plant floor and the enterprise system. A feature of a transport map is to provide the ability to use logical names for data items instead of plant floor PLC device variable names as the source or destination of enterprise data. This chapter assumes that you have completed the steps in Defining the transport on page 1-1.

2-1

Building the transport map

2-1 Overview of the transport map elements


A transport map is specified as an action that is executed whenever a runtime event occurs. At that time, the trigger that is associated with the transport map performs several operations including the building of a runtime payload per the input map specification and the sending of an event notification to the transaction engine using that payload. The transport map for this example is comprised of its name, a previously defined database transport, an input map (as appropriate for the database transport), and payload (the data that will be stored on the enterprises database system).The transport map will be specified within a trigger as an action to be executed whenever the scheduled event occurs.

2-2

2-1 Overview of the transport map elements

Building the transport map

2-2 Creating the transport map


It is assumed that a database transport was defined. It is also assumed that the Workbench is started and you have logged on. Follow these steps to create a transport map that uses a database transport. 1. From the Workbench left pane, expand the MESInterface IT node that you want to add the transport map to.

2. Expand Enterprise, right-click the Transport Maps icon to display its pop-up menu, and then click New. The Transport Map window appears.

3. In the Name box, type MyFirstTransportMap as the unique name for the transport map. A transport map name can be up to 32 characters and include letters, numbers, and the underscore character. Spaces are allowed. You will not be able to type invalid characters.

2-2 Creating the transport map

2-3

Building the transport map

4. From the Transport drop-down list, select the transport you created on page 4, MyDatabaseTransport.

The To Enterprise section changes to accommodate the database transport. This is the data that will be stored on the enterprise system. The data can be any type including an engine serial number, machine torque reading, part count, and so forth. 5. From Version Mismatch drop-down list, accept the default Fail. The Fail option will immediately fail any trigger event that has a version mismatch between the current transport map and the transport map that was used in the trigger.

2-4

2-2 Creating the transport map

Building the transport map

2-2-1 Adding a database table


When you selected the database transport, the To Enterprise section of the Transport Map window changed to accommodate a database table. The first step is to select the table you want to route data to. 1. Go to the To Enterprise section under the Input tab. You will see parameters to select the schema, action, and database table.

2. Click the Schema down-arrow. For this example, ACUSER is selected. The schema will contain tables whose columns and rows you want to store values from map variables you set in the Input tab (see Defining the map variables on page 2-6). 3. Click the Action down-arrow, and then select Insert. Insert will add a new row of data into a database table whenever a trigger event occurs.

2-2 Creating the transport map 2-2-1 Adding a database table

2-5

Building the transport map

4. Click the Table down-arrow, and then select the appropriate table. For this example, TABLE01C.

An Insert tab becomes populated with the column information for that table.

2-2-2 Defining the map variables


Now that you have added the table, you can create the input map. The input map will consist of a collection of map variables. The plant floor engineer will see these variables when defining the trigger. During runtime, the variables are mapped to physical PLC device variables (when a plant floor event occurs). Since there are 5 required columns in the example table, you will want to map 5 data items (from the production line) into the table. These data items will be defined by using 5 logical names (not the real PLC device variable or alias names). The resolution of these map variables to production line data will occur when you create the trigger.

2-6

2-2 Creating the transport map 2-2-2 Defining the map variables

Building the transport map

There are two methods for defining the map variables: Create each map variable separately (see page 7). Create the map variables automatically at one time (see page 9).

Creating each map variable separately To create each map variable separately, use the Add button on the Input tab on the Transport Map window. 1. On the Input tab, under From Trigger, click Add.

The New Item window appears.

2-2 Creating the transport map 2-2-2 Defining the map variables

2-7

Building the transport map

2. In the Name box, type log1 as the name for the map variable. The name can be up to 32 characters and include letters, numbers, underscore, dash characters, and spaces. Special characters such as < > (single quotation) " (double quotation) are not allowed. 3. Click the Type down-arrow to display a list of supported data types, and then select the data type that you want assigned to the name. For this example INT2.

4. In the Count box, accept the default 1. The value specifies the dimension of the map variable (for this example a scalar). Arrays: If the data type were an array, you would change the value in the Count box to the number of elements in the array. 5. Click Add. A row appears on the Input tab with the information you added.

6. Repeat the steps to add all required rows naming the map variables appropriately.

2-8

2-2 Creating the transport map 2-2-2 Defining the map variables

Building the transport map

The final Input tab might look like this:

map variables Automatically creating the map variables To automatically create the map variables, use the Map Table button (on the To Enterprise section) that became available when you selected the database transport. All of the columns in the table will be populated with a name and appropriate data type. From the To Enterprise section, click Map Table.

2-2 Creating the transport map 2-2-2 Defining the map variables

2-9

Building the transport map

The map variables are automatically added to the Input tab.

map variables Once you have created the map variables, you can edit the columns as follows: To change the name under the Name column, double-click the name, and then retype it. To change a data type, click the row under the Logical column, and then select a data type from the list. To change a value that specifies the dimension of the map variable, double-click the row under the Count column, and then type a different value. Output map: Because the transport map is based on a database Insert operation, an output map is not applicable. If a transport map is bi-directional then the trigger will expect data that is queried from an enterprise system to be sent to it in the output map. For more information, refer to the User's Guide available from the Workbench Help menu.

2-10

2-2 Creating the transport map 2-2-2 Defining the map variables

Building the transport map

2-2-3 Associating map variables with table columns


Now that you have created the map variables, the last step is to associate the map variables with the database table columns. This is the payload that will be stored on the enterprise system. For this example, the payload will facilitate an SQL Insert operation. 1. Go to the table at the bottom of the To Enterprise section. 2. Select the first database column. For this example, CO1. 3. Click the Variable column. A list appears with the map variables that you just created.

map variables 4. Select the map variable that you want associated with the database column. For this example, log1. 5. Repeat steps 2 through 4 for each column in the table. The completed To Enterprise section will be similar to the following.

2-2 Creating the transport map 2-2-3 Associating map variables with table columns

2-11

Building the transport map

6. When you complete the transport map, click Validate. 7. If no errors are received, click Save. The new transport map is saved to the current MESInterface IT node, and the name is added to the Transport Maps tab. The transport map also becomes available from the Transport Map dropdown list when creating a trigger with a Transaction action.

The final step is to create the trigger and associate the map variables in the trigger Transaction action definition. Go to Creating the trigger on page 3-1.

2-12

2-2 Creating the transport map 2-2-3 Associating map variables with table columns

Creating the trigger

Chapter 3

Before you can create a trigger, you must create a project. This chapter walks you through how to create the project. This chapter also describes how to create the sample trigger. When the trigger is saved, it will belong to the project. This chapter assumes that you have completed the steps in Building the transport map on page 2-1.

3-1

Creating the trigger

3-1 Creating a project


The Workbench provides the notion of a project. A project is simply a group of triggers. The grouping enables global operations that apply to all triggers in the project. For example, when the project is started, all triggers with a started status are also started; likewise, when the project is stopped, all started triggers are also stopped. Using the Workbench, you can create as many projects as needed and then populate each project with one or more triggers. MESInterface IT node

Project Project Collectively, triggers are often related and serve to organize and test the MESInterface IT nodes work environment. Before you create a project and then add a trigger, you must first create a transport map following the instructions in Building the transport map on page 2-1. It is assumed that the Workbench is started and you have logged on. Follow these steps to create a project. 1. From the Workbench left pane, expand the MESInterface IT node that you want to add a project to.

3-2

3-1 Creating a project

Creating the trigger

2. On the Projects icon, right-click to display its pop-up menu.

3. Click New. The Create Project window appears.

4. Type APProject2 as the name for the project, and then click OK. A project name can be up to 32 characters in length and can include letters, numbers, and the underscore character. Spaces are allowed.

3-1 Creating a project

3-3

Creating the trigger

The name and new icon is added under the Projects icon (on the Workbench left pane).

This example shows two projects The X on APProject2 indicates the project is not started. For more information, see Starting and stopping projects and triggers on page 3-18. The project name is also added to the list of projects in the Projects tab (on the Workbench right pane).

Now that you have a project, you can add as many triggers as necessary.

3-4

3-1 Creating a project

Creating the trigger

3-2 Creating the schedule trigger


You can create a trigger to use for taking data samples at a known point in time. This type of trigger is referred to as a schedule trigger. The trigger can be configured to automatically transfer data based on a time of day transaction type (such as hourly, first and last day of the month, on a specific day of the week, and a specific day of the month). To create a schedule trigger, follow these steps: It is assumed that the Workbench is started and you have logged on. 1. From the Workbench left pane, expand the MESInterface IT node that contains your project. 2. Under the Projects icon, select APProject2. The APProject2 project tab appears as the right pane.

For this example, the tab is empty. However, typically a project tab contains a list of triggers that belong to the project. 3. From the bottom of the project tab, click the New button.

3-2 Creating the schedule trigger

3-5

Creating the trigger

The New Trigger window appears.

4. In the Name box, type MyFirstTrigger as the name for the trigger. A trigger name can be up to 32 characters and include letters, numbers, and the underscore character. Spaces are allowed.

5. From the Trigger Event Type drop down-list, click Schedule.

3-6

3-2 Creating the schedule trigger

Creating the trigger

The Event tab becomes active with input parameters for the default Periodic time of day option.

6. From the Frequency drop-down list, accept Periodic as the time of day option you want to use. The Periodic option sets a trigger to execute continuously at specific millisecond intervals. 7. Under Occurrence, in the Period (milliseconds) box, type a value of 5000. This will set the trigger to execute every 5 seconds. 8. Click the Settings tab.

9. In the Max Pending box, accept the default value. The default indicates that the trigger must complete its processing before another trigger is allowed to start. For more information about the Max Pending parameter, refer to the MESInterface IT User's Guide.

3-2 Creating the schedule trigger

3-7

Creating the trigger

10. In the Max Exec Time (ms) box, type a value in milliseconds for the maximum execution time for the trigger. If the trigger exceeds this value, a warning message is logged in the Exceptions Log (even though Reporting might be set to Off). 11. From the Reporting drop-down list, you can set the trigger reporting to On, Off, On Error, Max Time Exceeded, or On Error or Max Time Exceeded. Reporting provides runtime statistics for the trigger. For more information about reports, refer to the MESInterface IT User's Guide.

3-8

3-2 Creating the schedule trigger

Creating the trigger

3-2-1 Adding the transport map


The next step is to select an action for the trigger. This is the transport map that you created on page 3 (MyFirstTransportMap). 1. From the bottom of the New Trigger window, under the Actions pane, click Add.

The New Action window appears.

2. Expand Enterprise Communication, select Transaction, and then click Add. The right pane changes to accommodate the Transaction action.
3-2 Creating the schedule trigger 3-2-1 Adding the transport map

3-9

Creating the trigger

The transaction is the transport map that you created in Creating the transport map on page 2-3.

3. Use the Transport Map drop-down list to select MyFirstTransportMap. The Input tab becomes populated with the names of the map variables from MyFirstTransportMap.

Notice the names log1, log2, and so forth. These are the map variables you defined when the transport map was created. Also, notice the logical names defined in the transport map appear on the Input tab. This means that the PLC data values are input to the transport map. Refer to Defining the map variables on page 2-6. The next step is to associate the PLCs device variables with the logical names listed in the table.
3-2 Creating the schedule trigger 3-2-1 Adding the transport map

3-10

Creating the trigger

3-2-2 Associating PLC device variables with map variables


Follow these steps to associate the PLC device variables to the logical names listed. 1. From the Input tab, click the right side of the Value column for the log1 variable.

A list of device variables, macros, and other system variables appear.

You will associate a device variable with the log1 variable in the row.

3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

3-11

Creating the trigger

2. Expand Local CPU 1, and then the expand the D to display a list of data registers for that device.

3. Under D, expand [ 0 - 999 ], and then select [8] as the data register for the log1 variable.

The log1 variable is assigned the PLCs device variables data value. Note that the data will be treated as an INT2 when it is read from the PLC and also as an INT2 when it is delivered to its destination.

3-12

3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

Creating the trigger

4. Repeat steps 1 through 4 for log2, log3, and log4, applying the appropriate numeric values for the String. The Input tab will be similar to the following:

For the log5 variable, you will assign $EVENT_TIME which is a system timestamp macro. The macro will provide the time that the trigger executed. 5. From the Input tab, click the right side of the Value column for the log5 variable.

3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

3-13

Creating the trigger

A list of PLC device variables appear.

6. Expand Macros, and then select the $EVENT_TIME. The completed Input tab might look like this:

3-14

3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

Creating the trigger

Each time the trigger executes, the PLC data is inserted into the Table01C table. PLC device variable Local CPU 1.D [8] Local CPU 1.D [9] Local CPU 1.D [14] Local CPU 1.D [19] $EVENT_TIME Database column C01 C02 C03 C04 C05

The trigger also has an Output tab that will contain the resultStatus and resultCount output variables.

When the trigger executes, the resultStatus variable will contain a code indicating whether or not the transaction completed successfully. A zero indicates success. A non zero value translates to the error code returned either by MESInterface IT or by the database vendor. The resultCount is a value returned that indicates the number of rows affected in the database. For this example, the Routing tab is allowed to keep its default values. For more information about routing, refer to the MESInterface IT Users Guide. 7. The trigger is completed, click Validate. 8. A message will tell you that the trigger definition was validated. Click OK. 9. Click Save. The trigger will be added to the project. When the trigger is saved, the Workbench sends the configuration information to the MESInterface IT node who in turn saves it to a persisted store for that project.
3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

3-15

Creating the trigger

When you save a trigger, the name of the trigger is added to the appropriate project tab.

The project tab provides a table format with columns that provide status such as the number of triggers that have successfully completed execution. Typically, you will use the values in the project tab during run time. The project tab also provides a pop-up menu that you can use to start and stop a trigger.

3-16

3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

Creating the trigger

Using the pop-up menu allows you to perform many tasks including creating a new trigger, editing or deleting an existing trigger, and generating a trigger report. The project might be stopped, but you can start the trigger on an individual basis.

3-2 Creating the schedule trigger 3-2-2 Associating PLC device variables with map variables

3-17

Creating the trigger

3-3 Starting and stopping projects and triggers


This section will describe how to start and stop projects and triggers. Keep the following in mind: Project level: Starting and stopping a project and its associated triggers from the project persists the state of the project and each trigger on the MESInterface IT node. This means that whenever the MESInterface IT node is shut down, the state of the project and its triggers is remembered by the MESInterface IT node. As an example, suppose a project has three triggers (Trig1, Trig2, and Trig3). The project is in a started state. Trig1 is started, and the other two triggers are stopped. When the MESInterface IT node is shut down and then restarted, the project and Trig1 keep their started state. The other stopped triggers remain stopped. Trigger level: You can change a stopped trigger to start at any time at the trigger level. However, if the project is in a stopped state and the MESInterface IT node is shut down, when the MESInterface IT node is rebooted, the trigger will not be restarted.

3-18

3-3 Starting and stopping projects and triggers

Creating the trigger

3-4 Performing start operations from the project level


You can set a project to start from the Projects tab. This ensures that the project (and all associated triggers that have a started state) are started whenever the MESInterface IT node is restarted. Before you begin, it is assumed that the Workbench is started and you have connected to the MESInterface IT node that contains the project you want to start or stop. 1. From the Workbench left pane, expand the MESInterface IT node that contains your project. 2. Expand the Projects icon, and then locate the project you want to start. 3. Select the project, and then display its pop-up menu.

4. Click Start. 5. The project icon changes to a started state and a green check mark appears on the project.

3-4 Performing start operations from the project level

3-19

Creating the trigger

In the Projects tab, the State column for the project changes to Started and a green check mark appears.

The state of the project is persisted to the MESInterface IT node. The next time the MESInterface IT node is started, the project is also started. 6. To change the state of a trigger to Start, double-click the project that you just started. The project that contains the trigger appears.

3-20

3-4 Performing start operations from the project level

Creating the trigger

7. Locate the trigger you want to start, display its pop-up menu, and then click Start.

The State column for the trigger changes to Starting and then to Started and a green check mark appears.

When the trigger is executing, the value of the Successes column is incremented.

3-4 Performing start operations from the project level

3-21

Creating the trigger

If there is a problem, the value of the Failures column is incremented. The next time the MESInterface IT node is started, when the project has a started state, the trigger is also started. The state of the project controls all triggers when the MESInterface IT node is restarted.

3-22

3-4 Performing start operations from the project level

Notices

Appendix A

Disclaimers
References in this publication to Mitsubishi Electric products, programs, or services do not imply that Mitsubishi Electric intends to make these available in all countries in which Mitsubishi Electric operates. Any reference to an Mitsubishi Electric licensed program or other Mitsubishi Electric product in this publication is not intended to state or imply that only Mitsubishi Electrics program or other products can be used. Any functionally equivalent product, program, or service that does not infringe on any of Mitsubishi Electrics intellectual property rights or other legally protectible rights can be used instead of the Mitsubishi Electric product, program, or service. Evaluation and verification of operation in conjunction with other products, programs, or services, except those expressly designated by Mitsubishi Electric, are the users responsibility.

Trademarks
The following term is trademark or registered trademark of ILS Technology LLC: deviceWISE The following terms are trademarks or registered trademarks of the IBM Corporation: IBM WebSphere MQ AIX

Appendix A-1

Notices

The following terms are trademarks or registered trademarks of Microsoft Corporation: Microsoft Microsoft SQL Server Windows .NET Framework The following terms are trademarks or registered trademarks of Mitsubishi Electric Corporation: MESInterface IT MELSEC EZSocket The following terms are trademarks of other companies: iconv, Free Software Foundation Intel, Intel Corporation Java, Sun Microsystems javasqlite, Christian Werner libxml2, xmlsoft.org log4j, as originally developed by Apache.org Oracle, Oracle Corporation OpenSSL Toolkit, Open SSL Project, OpenSSL 1998-2008 by the Open SSL Project; This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com) Solaris and Java, Sun Microsystems, Inc. J-Integra is a registered trademark of Intrinsyc Software International, Inc. J-Integra 2010 Intrinsyc Software, Inc and its licensors. All rights reserved.

Appendix A-2

Index
Symbols
$EVENT_TIME 3-13

J
J-Integra trademark 1-2

A
Administration button ix array data types 2-8

L
Load transport at initialization 1-7, 1-11

C
connection timeout 1-9

M
macros 3-14 Map Table button 2-9 map variable create 2-7 create automatically 2-9 definition 2-6 dimension 2-8 naming rule 2-8 Mapping Log check box 1-10 Max Exec Time parameter 3-8 Max Pending parameter 3-7 maximum storage store & forward 1-8

D
D data register 3-12 database Insert operation 2-11 database transport 1-4, 2-5 device variables viii, 3-11

E
Execution timeout 1-9

F
Fail parameter 2-4 From Trigger section 2-7

N
naming rule map variable 2-8 project 3-3 transaction 2-3 trigger 3-6

G
global operations 3-2

I
Inactivity parameter 1-10 Input tab 2-7 Insert operation 2-11

O
On overflow parameter 1-8

Index-1

Index

P
payload add 2-11 PLC device variables 3-11 project creating 3-2 description 3-2 naming 3-3 starting 3-19

R
registered trademarks 1-1 Reporting trigger reports 3-8 resultCount variable 3-15 resultStatus variable 3-15

transport map adding to trigger 3-10 description iv map variables 2-6 name rule 2-3 Transports tab 1-12 trigger action 3-9 create 3-5 description iv device variables 3-11 Output tab 3-15 start 3-18 Trigger Event Type parameter 3-6 Trigger window 3-6 TTL zero value 1-8

S
saving a transport 1-12 schedule trigger create 3-5 description 3-5 shut down the Workbench x spaces project name 3-3 SQL Insert operation 2-11

V
validate transport 1-11 Variables button viii Version Mismatch 2-4

W
Workbench shut down x starting on Windows v

T
timeout parameter 1-9 timestamp macro 3-13 time-to-live 1-8 To Enterprise description 2-4 trademarks 1-1 transaction Fail parameter 2-4 Transaction action 3-9 transport description iii save 1-12

Index-2

"deviceWISE enabled" deviceWISE is a trademark of ILS Technology LLC. Microsoft, Windows, Windows Vista, SQL server, and Visual Studio are registered trademarks of Microsoft Corporation in the United States and other countries. Sun, Sun Microsystems, Java, J2ME and J2SE are either trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Oracle is a registered trademark of Oracle Corporation. Adobe and Acrobat are registered trademarks of Adobe Systems Incorporation. Pentium and Celeron are trademarks of Intel Corporation in the united States and other countries. Ethernet is a trademark of Xerox Co., Ltd. in the United States. CompactFlash is a trademark of SanDisk Corporation. Other company names used in this document are trademarks or registered trademarks of respective owners. The Program may contain some or all of the following third party components: EZSocket Copyright (C) 2008 Mitsubishi Electric Corporation iconv Copyright (C) 2007 Free Software Foundation javasqlite Copyright (C) 2008 Christian Werner libxml2 Copyright (C) 2008 xmlsoft.org log4j as originally developed by Apache.org OpenSSL Toolkit, Open SSL Project, OpenSSL Copyright (C) 1998-2008 the Open SSL Project; This product includes cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com) Jamaica JVM Copyright (C) 2008 Aicas