Tech Note 595 Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen

8/22/13 Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC Tech Note 595 Setting Up Wond...
Author: Alicia Morton
7 downloads 0 Views 4MB Size
8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

Tech Note 595

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLCs All Tech Notes, Tech Alerts and KBC D documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information. Topic#: 002351 C reated: April 2009 Updated: February 2011

Introduction This technote provides demonstration in Setting up Wonderware client application such as IAS, InTouch®, or even WWClient to receive unsolicited messaging from an Allen Bradley PLC such as PLC5, SLC500 or Controllogix PLCs. The Wonderware Technical Support team have been testing unsolicited messaging and are now able to consistently and successfully send unsolicited messages from the PLC to a client application in both local and network environments. We are glad to share our knowledge in this Tech Note with our customers and distributors. Since sending unsolicited messages from the PLC is done from the PLC side, it is crucial to understand PLC logic and to correctly configure the message block. The first section of this Tech Note provides detailed steps to create and set up the basic message block and programming logic in the PLC. Please use our demo only to reference the very basic method to generate the unsolicited message data, and keep in mind there are much more elaborate and sophisticated logic to accomplish the same goals in different programming and design levels. Note: This technote provide information for generating unsolicited messages from a ControlLogix PLC. For PLC5 or SLC500 PLCs, refer to the specific User Guildes for PLC5 or SLC500 PLCs for programming logic with regards to the Message Instructions.

Application Versions Wonderware Application Server 3.1 and later DASABCIP 4.0 Controllogix PLC Family with Firmware 15 and 16

Setting up the Basic PLC Logic to Generate Unsolicited Messages This section provides basic instructions for setting up the ControlLogix PLC program logic to generate unsolicited messages and send the unsolicited data to a specific, listening HMI or AppServer client application. First, we create all the necessary items in the PLC database. The following list provides the minimum items needed to generate an unsolicited message instruction: A Message Control Item with Message data type. In this example, it is called Uns_Test. This item is where the configuration information is created and stored. Each unsolicited message instruction needs a unique message word for its message configurations. Source Element items. For this example, the items are called Uns_Tag1, Uns_Tag2… and so on. Note that you can send multiple data values to a listener in a group of separated items, or in an array of multiple elements. These items are where the unsolicited data is stored, and are the data sources that are broadcasted by the PLC message instruction. Destination Element Tags. For this example they are called Item1, Item2… etc. These items are the destination locations where the unsolicited data will end up. These items have to be created and monitored in the HMI client application database. An Unsolicited message trigger tag. In this example, it is called Uns_Trigger. This item is used to activate and deactivate the unsolicited PLC programming logic, so the unsolicited data will be sent only at the activation of the PLC rung instruction. See display of the PLC program rung logic in Figure 7. Figure 1 (below) shows creating the Uns_Test tag with the Message data type item.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

1/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 1: UNS_TEST TAG WITH MESSAGE DATA TYPE Figure 2 (below) shows creating the Source Element items.

F IGURE 2: C REATING THE SOUCE ELEMENT TAG AND ITEMS Figure 3 (below) shows that a new rung has been added to the PLC logic, where a message instruction (MSG) is inserted.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

2/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 3: NEW LADDER RUN WITH MESSAGE INSERTION 1. In the Message Control field, type the name of the message control tag (Uns_Test), and click the Ellipsis ( ... ) button. The Message Configuration dialog box appears (Figure 4 below). 2. Select the Message Type from the list. In this example, we are using ControlLogix PLC so the correct message type is CIP Data Table Write.

F IGURE 4: MESSAGE C ONFIGURATION WITH CIP DATA TABLE WRITE 3. Select CIP Data Table Write to change the Message Configuration Window as shown in Figure 5 (below).

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

3/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 5: MESSAGE C ONFIGURATION OPTIONS 4. In the Message Configuration window (Figure 5), type Uns_Tag1 in the Source Element field. Note that if Uns_Tag1 is defined as an array, you will need to enter it in the array data format – with Uns_Tag1(0) as the first element of the array. 5. Specify how many elements will be generated for broadcasting – if there are 10 elements in the array then you can specify up to 10 in this field. In our demo, we only send on single register, so type 1. 6. For the Destination Element, you must use the syntax of Topic.Destination_element where the topic is defined in the client application interface. In the case of DASABCIP, this is the device group name that is designated to receive the unsolicited data. Our device group is called Test (Figure 9 below). So the appropriate entry for this parameter is Test.Item1 where Item1 is previously-defined as the destination element. Note: When using ABCIP DIObjects, the topic name is a concatenation of the PLC DIObject name and the Scan Group name defined within that PLC DIObject. For example, if you have a PLC DIObject named CLX, and a Scan Group named Slow, the Destination Element for the Message Configuration in this case would be CLX_Slow.Item1 . Figure 6 (below) shows defining the communication path. Use the Browse button to find the gateway device (Ethernet module) where the data would be sent to the data client, in this case ENB5.

F IGURE 6: LOCATING THE GATEWAY DEVICE/ETHERNET MODULE You can see details in Figure 7 (below) regarding each component of the path definition. ENB5 is the physical Ethernet Interface Module, it can be browse and automatically displayed as the first part of the path. The number 2 next to the ENB5 is the next part of the path, representing the Port number on the Ethernet card will be used to send the data. The channel number is fixed and it is always a 2 – a designated channel to send unsolicited messages. The last group of number (10.2.81,73) is the IP address of the target node where the message is sent to, in this case will be where the DAServer ABCIP is installed. Keep all the default settings.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

4/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 7: DETAILED PATH DEFINITION This completes the Message Instruction configuration for the PLC.

Setting up the Wonderware DASever to Receive Unsolicited Messages This section describes setting up the DASABCIP server to receive unsolicited messages from the PLC.

Assumptions You have already installed the Wonderware DASABCIP server. You are familiar with the basic configuration structures of this DAServer. 1. Create the ControlLogix PLC object in the DAServer under the appropriate hierarchies.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

5/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 8: C REATE THE C ONTROLLOGIX OBJECT 2. In the new ControlLogix object window, click the Device Group tab and go to the Device Group configuration window as shown in Figure 9 (below). 3. Create a new device group that is dedicated to the unsolicited messaging, and change the Update Interval to 0. The unsolicited message does not follow the Update Interval polling cycle. Instead, it updates instantaneously whenever the unsolicited message is sent from the PLC. An unsolicited message can very well be sent to a device group using a regular update interval, and the destination item will be updated whenever the unsolicited message is sent, as well as every regular polling cycle. There is no way to tell whether the update was unsolicited or polled. For that reason, if it is important for you to keep track of the unsolicited data update, then it becomes necessary for all the unsolicited items to be assigned to a separate device group with an Update Interval of 0. This means that the Device Group polls only the very first connection to the PLC, and never again. All the data updates are coming from the unsolicited message sent by the PLC.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

6/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 9: SET THE UPDATE INTERVAL TO 0 4. Highlight the device group for the unsolicited message, right-click and select Edit to modify the Device Group Parameters (Figure 10 below).

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

7/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 10: EDIT THE TEST DEVICE GROUP 5. Click the Support Unsolicited Messages option (Figure 11 below).

F IGURE 11: SUPPORT UNSOLICITED MESSAGES FOR TEST DEVICE GROUP 6. Click OK, save your changes, and close the Object Editor. This completes the configuration of DASABCIP server.

Setting up the Wonderware Application Server Client Application to Receive Unsolicited Messages There are options in using Wonderware client applications to receive unsolicited data messages from the PLC. For this Tech Note, we use the IAS Application Client proxy object as our data client.

Assumptions You are familiar with basic steps in setting up the IAS configuration; The demo galaxy contains:

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

8/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC The minimum of the GR node plateform The AppEngine that hosts the client objects A client proxy DI object of DDE\SuiteLink type, where the DDE\SuiteLink object points to the Standalone DASABCIP server - our interface to the PLC. 1. Create a new galaxy New_test in node XILIC4.

F IGURE 12: NEW _TEST GALAXY

ON

NODE XILIC4

F IGURE 13: DDESUITELINKC LIENT OBJECT 2. Ceate a topic that matches the unsolicited device group name in the DASABCIP (Figure 14 below).

F IGURE 14: TOPIC MATCHES DASABCIP DEVICE GROUP NAME

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

9/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC 3. Create an item under the UDA tab, or in any independent application object (Figure 15 below). For this Tech Note, we created an item called Uns_Item.

F IGURE 15: NEW UDA 4. Assign the input (and/or output) source to the new item, as shown in Figure 16 (below). The input source must contain following components: • The item name where the unsolicited message is sending to. This item name is defined in the PLC DB. For this demo it is named Item1 (see Figure 5 above). • For this demo, the correct path includes the DI object DDESuiteLinkClient_001 and its unified Topic name Test (Figure 5, Figure 10 and Figure 14).

F IGURE 16: ASSIGN INPUT SOURCE DEFINED IN THE PLC DATABASE 5. Deploy the galaxy (Figure 17 below).

F IGURE 17: DEPLOY GALAXY 6. Then point to the DDESuiteLinkClient DI object and right-click it. 7. Select Object Viewer. 8. Locate Uns_Item from the DDESuiteLinkClient object, and add it to the AttributeReference pane (Figure 18 below).

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

10/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 18: ADD UNS_ITEM TO THE OBJECT LIST 9. To verify the unsolicited data is successfully configured and received, go back to the PLC RSLogix software and generate a data change in Uns_Tag1 of the PLC database source (Figure 19 below).

F IGURE 19: TRIGGER A DATA C HANGE FOR ITEM1 The data change will not be received by the WAS client right away, because the PLC logic has not yet been triggered to send the unsolicited data. As shown in Figure 20 (below), the message instruction in the PLC logic is only activated if the control bit Uns_Tigger is TRUE. 10. To send the unsolicited data, toggle the Uns_Trigger bit in the PLC logic. The rung is activated or deactivated by toggling the trigger bit item Uns_Trigger.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

11/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

F IGURE 20: TOGGLE THE UNS_TRIGGER BIT Once you toggle the control bit to true, the message instruction is executed once to send the unsolicited data to Item1 in the Device Group/Topic called Test. Figure 21 (below) shows the data has been received by the WAS client in the Object Viewer.

F IGURE 21: DATA RECIEVED

Troubleshooting - Why Can't I Receive Unsolicited Messages? The following is a list of possible causes for not receiving unsolicited data updates. Incorrect device group name, or syntax regarding the Destination Elements (Figure 5) Incorrect Ethernet Path, Port number or Destination IP address (Figure 6) and (Figure 7) Forgetting to select the option to support the unsolicited messaging (Figure 11) RSLinx is running at the same time: if RSLinx is installed on the same node as the DASABCIP, and RSLinx contains the same topic name (Test), the PLC message instruction will not be able to send the data correctly to either RSLinx or DASABCIP. We have found in this situation, even when we shut down the RSLinx, the unsolicited message still was not received. We had to reboot the computer and make sure the RSLinx is not running as a server so it would not start after reboot. Incorrect starting order of all involved components: DAServer must be started and activated first, before the IAS DDE\Suitelink object is deployed. The destination register has to be registered in the client application in order to receive the unsolicited data. Accomplish this by Subscribing the item in the application object, the script, displaying in the View application or to the object viewer directly.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

12/13

8/22/13

Setting Up Wonderware Application Server to Receive Unsolicited Messaging From Allen Bradley Controllogix PLC

Click the following icon to view this file in .pdf format:

A. C haque Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest, C A 92630. There is also technical information on our software products at Wonderware Technical Support. For technical support questions, send an e-mail to [email protected].

Back to top ©2013 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, broadcasting, or by anyinformation storage and retrieval system, without permission in writing from Invensys Systems, Inc. Terms of Use.

https://wdnresource.wonderware.com/support/kbcd/html/1/t002351.htm

13/13