You are on page 1of 39

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-804Q007-A0 First edition BAD-804Q007-A1 Correction Section 1.3 Section 1.4 Section 1.6 BAD-804Q007-A2 Correction Section 1.3 Section 1.4 Section 1.5 Section 1.6 Section 1.7 BAD-804Q007-A3 Correction Section 1.4 Section 1.6

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
Chapter 1: Your very first trigger
1-1 1-2 1-3 1-4 1-5 1-6 1-7 Assumptions ........................................................................................................... 1-2 Step 1: Starting the TCP Receiver Client ............................................................... 1-3 Step 2: Defining the TCP transport ........................................................................ 1-4 Step 3: Building the transport map ......................................................................... 1-9 Step 4: Creating a project ..................................................................................... 1-16 Step 5: Creating a schedule trigger ....................................................................... 1-19 Step 6: Reviewing the payload ............................................................................. 1-28

Index

Contents

Contents

ii Contents

Your very first trigger

Chapter 1

This booklet provides the process for creating a simple trigger to demonstrate the communication between the newly installed MESInterface IT module and a simulated enterprise TCP application. You will be able to test the messages generated by the trigger using the TCP Receiver Client program that was installed when the Workbench was installed. No protocol licensing is required. The following is provided: Step 1: Starting the TCP Receiver Client on page 1-3. Introduces the TCP Receiver Client program. Step 2: Defining the TCP transport on page 1-4. Walks you through creating a TCP transport using the IP address of the computer where the TCP Receiver Client resides. Step 3: Building the transport map on page 1-9. Describes how to create a transport map using the TCP transport you created in Step 2. Step 4: Creating a project on page 1-16. Before you can create a trigger, you must have a project that the trigger will belong to. Step 5: Creating a schedule trigger on page 1-19. Describes how to create and then start a trigger that uses your computers built-in TCP protocol. You will assign the transport map that you created in Step 3. Step 6: Reviewing the payload on page 1-28. You will review the results of the trigger action in the TCP Receiver Client program.

1-1

Your very first trigger

1-1 Assumptions
Before you begin, make sure the following has occurred: You installed an MESInterface IT module on the rack of a supported programmable logic controller. You installed the Workbench on a computer that has TCP connectivity to the MESInterface IT module. The Workbench was previously started and you have a user ID and password.

1-2

1-1 Assumptions

Your very first trigger

1-2 Step 1: Starting the TCP Receiver Client


When you install the Workbench, you also installed the TCP Receiver Client. The TCP Receiver Client is a program that lets you display output messages from a trigger event. The program uses standard TCP/IP network protocol as the transport. A trigger configured with a TCP transport must be started in order to use the program. To start the TCP Receiver Client: 1. From the Windows Start menu, click All Programs > MESInterface IT > Workbench > Viewers > TCPReceiver. The TCP Receiver Client window appears.

Notice Port = 4444. You will need this port number when creating the transport. 2. Minimize the program.

1-2 Step 1: Starting the TCP Receiver Client

1-3

Your very first trigger

1-3 Step 2: Defining the TCP transport


Transmission Control Protocol/Internet Protocol (TCP/IP) is the most popular protocol and the basis for the Internet. Its routing capabilities provide maximum flexibility in an enterprise-wide network. The TCP protocol is included free with each MESInterface IT module. Other protocols such as relational databases and message queuing systems are turned on using a licence activation key. Before you begin to create a TCP transport, the following is assumed: The TCP Receiver Client program is running on your local computer. The Workbench is started and you have logged on.

You can create a transport that contains an IP address and port number that a message is sent to. For this example, the TCP Receiver Client program on your local computer is the enterprise application. 1. From the Workbench left pane, expand the MESInterface IT module that you want to associate the new transport with.

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

1-4

1-3 Step 2: Defining the TCP transport

Your very first trigger

3. In the Name box, type MyTCPTransport. 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.

This window defaults to the TCP transport type and the Parameters tab. 4. In the Host box, type the IP address or host name of the computer where you want the messages sent. For this example, this is the IP address where the TCP Receiver Client program is running. 5. In the Port box, type the port number of the computer where you want the messages sent. For this example, use the port number 4444. 6. In Mode box, accept the default connection-oriented. For more information, refer to the Enterprise Connectivity Users Guide. 7. Select the Load transport at initialization check box to have the transport connect to the host as soon as the MESInterface IT module boots up. 8. Make sure the Include header in payload check box is selected. This check box is selected to allow the TCP application to receive a 4-byte header as part of the data. By default, a transport is down until it processes a transaction.

1-3 Step 2: Defining the TCP transport

1-5

Your very first trigger

The Create Transport window also provides two other tabs.

Adding timeout values


The Timeout tab provides values that affect connection times.

Accept the default value for each Timeout parameter. 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 TCP program is running). If the connection is not made in the specified time period, an error message is sent to the exception log. This connection is tested when you click Validate. The Execution timeout parameter defaults to 5 seconds and specifies the amount of time the MESInterface IT module should wait (once the connection is made) for a TCP transaction to complete. The time value should be the outer limit for how long you expect a typical transaction to take using a transport.

1-6

1-3 Step 2: Defining the TCP transport

Your very first trigger

Creating custom payloads


The Custom Payloads tab lets you specify a predefined Java application program to use for a custom payload format.

When you select Allow Custom Payloads check box to enable a TCP transport to use a custom payload, you must specify the name of the jar file and class name. For more information, refer to the Enterprise Connectivity Users Guide.

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. 9. From the bottom of the Create Transport window, click Validate. The Workbench tests the connection to the TCP Receiver Client. 10. A message will tell you whether or not the validation was successful. Click OK.

11. If no errors are received, click Save.

1-3 Step 2: Defining the TCP transport

1-7

Your very first trigger

The new transport is saved to the MESInterface IT module and added to the Transports tab. The next step is to build the transport map.

1-8

1-3 Step 2: Defining the TCP transport

Your very first trigger

1-4 Step 3: Building the transport map


A Transaction 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. The transport map for this example is comprised of its name, a previously defined TCP transport, an input map and payload.The transport map will be specified within a trigger as a Transaction action to be executed whenever the schedule event occurs. Before you begin to build the transaction, the following is assumed: The TCP transport was defined. The Workbench is started and you have logged on.

1. From the Workbench left pane, expand the MESInterface IT module that you want to add the transaction to.

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

1-4 Step 3: Building the transport map

1-9

Your very first trigger

The Transport Map window similar to the following 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. From the Transport drop-down list, select the transport you created on page 1-4. For this example, MyTCPTransport.

1-10

1-4 Step 3: Building the transport map

Your very first trigger

The following shows the To Enterprise section of the Transport Map window when a TCP transport is selected.

Now that you have specified the transport, you can add the payload.The first step when adding a payload is to identify the format of the message. 4. Under the To Enterprise section, click the Format down-arrow, and then select ASCII.

5. The Field Delimiter box defaults to a comma that is used to separate each ASCII string element in a message. Accept the default comma. The Array Delimiter box defaults to an underscore ( _ ) character that is used to separate an array of numbers. Accept the default underscore. After you specify ASCII as the format, you must create the map variables, and then specify the ASCII payload values.

1-4 Step 3: Building the transport map

1-11

Your very first trigger

6. Go to the Input tab at the top of the Transport Map window.

7. Click Add. The New Item window appears.

8. In the Name box, type CompleteMessage 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. 9. Click the Type down-arrow to display a list of supported data types, and select the data type that you want assigned to the name. For this example STRING.

1-12

1-4 Step 3: Building the transport map

Your very first trigger

The New Item window changes to accommodate the string data type.

10. In the Length box, change the value for the string to 16. 11. 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. 12. Click Add. A row appears on the Input tab with the information you added.

1-4 Step 3: Building the transport map

1-13

Your very first trigger

You can repeat the steps to add all required map variables appropriately. For this example, there is only one map variable. The next step is to create the payload.You must associate the map variable from the Input tab with a data item (or macro if appropriate) for the payload. 13. Go to the To Enterprise section of the Transport Map window.

14. Click Add. The first row in the table becomes active.

15. Under Field, click the column to display a drop-down list, and then select the appropriate map variable (for this example, CompleteMessage). 16. Under Details, click the column to display a drop-down list, and then select the appropriate data type (for this example, string).

1-14

1-4 Step 3: Building the transport map

Your very first trigger

The completed To Enterprise section might look like this.

17. When you complete the transport map, click Validate. A window will appear that shows a representation of the payload.

18. Click OK, and then click Save. The new transport map is saved to the current MESInterface IT module, and the name is added to the Transport Maps tab.

The final step is to create a trigger and associate the map variable in the trigger action definition. However, before you can create a trigger, you must create a project.

1-4 Step 3: Building the transport map

1-15

Your very first trigger

1-5 Step 4: Creating 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. 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 module that you want to add a project to.

2. On the Projects icon, right-click to display its pop-up menu, and then click New. The Create Project window appears.

1-16

1-5 Step 4: Creating a project

Your very first trigger

3. Type MyFirstProject 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. The name and new icon is added under the Projects icon (on the Workbench left pane.

The project name is also added to the Projects tab.

The next step is to start the project.

4. From the Projects tab, select the project, display its pop-up menu, and then click Start.

1-5 Step 4: Creating a project

1-17

Your very first trigger

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

You are ready to create the trigger.

1-18

1-5 Step 4: Creating a project

Your very first trigger

1-6 Step 5: Creating a 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). It is assumed that the Workbench is started and you have logged on. To create a schedule trigger, follow these steps: 1. From the Workbench left pane, expand the MESInterface IT module that contains your project. 2. Under the Projects icon, select MyFirstProject. The MyFirstProject tab appears as the right pane.

For this example, the tab is empty because no trigger has yet been created. However, typically the tab contains a list of triggers that belong to the project. 3. From the bottom of the project tab, click the New button.

1-6 Step 5: Creating a schedule trigger

1-19

Your very first 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.

1-20

1-6 Step 5: Creating a schedule trigger

Your very first 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. 10. From the Reporting drop-down list accept the Off default value.

1-6 Step 5: Creating a schedule trigger

1-21

Your very first trigger

11. 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). 12. The Editor mode drop-down list provides the way you create and edit actions for the trigger.

List lets you manually select an action from a list. For each possible output of an action, you select a route Canvas lets you drag and then drop an action on a drawing area. For each possible output of an action, you draw connectors between actions by dragging the mouse. User preference remembers the last editor mode you set.

The next step is to select an action for the trigger. This is the transport map that you created on page 9 (MyFirstTransportMap).

1-22

1-6 Step 5: Creating a schedule trigger

Your very first trigger

13. From the bottom of the New Trigger window under the Actions pane, click Add.

The New Action window appears.

14. Expand Enterprise Communication, select Transaction, and then click Add. The bottom right pane of the New Trigger window changes to accommodate the Transaction action. The transaction is the transport map you created in Step 3: Building the transport map on page 1-9.

1-6 Step 5: Creating a schedule trigger

1-23

Your very first trigger

15. Use the Transport Map down arrow to select MyFirstTransportMap.

The Input tab becomes populated with the name of the map variable from MyFirstTransportMap. The next step is to associate the map variable with a predefined macro. 16. From the Input tab, select the first row in the table.

17. Under the Value heading, click the right side of the Value column.

1-24

1-6 Step 5: Creating a schedule trigger

Your very first trigger

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

1 2 1 Notice the Local CPU 1. This entry verifies that the runtime license was installed, and the MESInterface IT module is started. Click the plus sign to see the device variables on the CPU. 2 Notice the Constant. You will associate the map variable in the row with this Constant. 18. Select Constant. The Constant window appears.

19. Type Hello World, and then click OK.

1-6 Step 5: Creating a schedule trigger

1-25

Your very first trigger

The Input tab will be similar to the following:

20. The trigger is complete, click Validate. 21. A message will tell you the trigger was validated. Click OK. 22. Click Save. When you save a trigger, the name of the trigger is added to the project tab. You are ready to start the trigger.

1-26

1-6 Step 5: Creating a schedule trigger

Your very first trigger

23. From the project tab, select the trigger you just created, display its pop-up menu, and then click Start.

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

When the trigger is executing, the value of the Successes column is incremented. If there is a problem, the value of the Failures column is incremented. For this example, the trigger is running, and you should be receiving messages on the TCP Receiver Client window.
1-6 Step 5: Creating a schedule trigger

1-27

Your very first trigger

1-7 Step 6: Reviewing the payload


Maximize the TCP Receiver Client program. You should see the message Hello World.

Congratulations! A message will appear every 5 seconds in the viewer. You can also view the Successes count being incremented every 5 seconds in the project tab.

If you stop the TCP Receiver Client program, the trigger will fail and you will see the Failures count incremented in the project tab.

1-28

1-7 Step 6: Reviewing the payload

Index
A
Allow Custom Payloads 1-7 ASCII format transport map 1-11 TCP transport 1-5

L
Load transport at initialization 1-5 Local CPU 1 1-25

C
connection timeout 1-6 custom payload TCP transport 1-7

M
map variable dimension 1-13 naming rule 1-12 Max Exec time (ms) parameter 1-22 Max Pending parameter 1-21 MyTCPTransport example transport 1-5

D
device variable on CPU 1-25

E
Execution timeout parameter 1-6

N
naming rule map variable 1-12 project 1-17 transport map 1-10 trigger 1-20

F
Field Delimiter parameter 1-11

G
global operations 1-16

P
payload example 1-28 project create 1-16 naming 1-17

H
Host parameter TCP transport 1-5

I
Include header in payload 1-5 IP address

R
Reporting trigger reports 1-21

Index-1

Index

S
saving a transport 1-7 schedule trigger create 1-19 description 1-19 spaces project name 1-17 transport map name 1-10 transport name 1-5 trigger name 1-20 start trigger 1-27

transport map 1-15 trigger 1-26

T
TCP protocol description 1-4 TCP Receiver Client description 1-1 port number 1-3 starting 1-3 TCP transport create 1-4 Host parameter 1-5 timeout parameter 1-6 To Enterprise transport map 1-14 Transaction action 1-23 transport Name box 1-5 transport map ASCII format 1-11 create 1-9 name rule 1-10 validate 1-15 trigger action 1-22 create 1-19 Transaction action 1-23 validate 1-26

V
validate TCP transport 1-7

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

You might also like