Beruflich Dokumente
Kultur Dokumente
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.
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
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
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
Notice Port = 4444. You will need this port number when creating the transport. 2. Minimize the program.
1-3
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
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-5
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
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.
1-7
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. 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-9
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
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-11
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
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-13
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
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-15
2. On the Projects icon, right-click to display its pop-up menu, and then click New. The Create Project window appears.
1-16
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.
4. From the Projects tab, select the project, display its pop-up menu, and then click Start.
1-17
The project icon changes to a started state and a green check mark appears on the project.
1-18
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-19
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.
1-20
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-21
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
13. From the bottom of the New Trigger window under the Actions pane, click Add.
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-23
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 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.
1-25
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
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
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.