Wonderware XML send and receive

Tnorman

Member
Join Date
Oct 2014
Location
Michigan
Posts
23
All,

I am up a creek and not only did I lost my paddle, but the creek is on fire.

What I am attempting to do is to connect Wonderware System Platform with my company's inventory software.

The inventory software, has Web Services' SOAP to interface with. Unfortunately this feature is version 1 for the company and is about 85% correct.

What is happening is the inventory software is sending ABCDE elements. However it only expecting ABC in return. If DE are filled in, it faults out. Using SOAP UI, and modify the XML and send it. The response is fine.

I thought using System Platform's Web services would work great for this application. However, System Platform doesn't allow to edit the actual XML file.

Does anyone know of a driver, or a gateway or a method or whatever to connect Wonderware to a web service?
 
I should mention, that having the inventory software fix the Web Services is on there to do list, most likely in 2021
 
Hi All,

I figured I would place my own answer down for what I did, that way the next poor sap in a similar situation might find it helpful.

When I was goofing around with Wonderware’s web services I found that the REST node has a “JSON/XML format Body” in the configuration. Reviewing Wonderware’s documentation: “Wonderware Operations Integration - Supervisory WEBSVC OI Server G-2.1 (Version 1.0) Help” and watching Wonderware’s “How to Configure the Wonderware Web Service Client OI Server”, I found that the body for a REST connection can be configured. Meaning that I could type my XML into a string and send it through the tag provided. To accesses this data tag the default name is $op$ww.post.body.

By using a script inside the object, the XML command can be formed with simple string. To pass the actual data along, follow standard Quick .net string’s for example: “This info is:” + variable;. Just remember to add the appropriate header to the beginning of the XML. In my case it was : "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/"" xmlns:ker=""yyyyyyyyyyyyy "">". Also, make sure that the entire XML command is added into the body tag.

This led to the next problem. Wonderware System Platform limits the string to 1024 bytes or 1024 characters. That is not a lot of characters to work with if you have poorly written XML command that the Web Services is expecting. There is a work around to this limit! According to Microsoft the max for C is double that amount, which means a whopping 2,048 bytes. To access this amount, it gets interesting.

To gain the 2,048 bytes, a user define object needs to be created. Then a sting attribute with IO turned on. The strings attribute needs to be entered under the device integration object (in my case using the DDE Suite link client) and the item reference needs to be entered. Deploy the device integration object. Now back in the user define object’s script, click the display attribute browser, find the device integration object, and the attribute name. Select it. There should be the long name of the string object. Now going through the typical string assignment, assign the XML command to it. For example: DDESuiteLinkClient_Name.Topic_Name.UserDefineObject_Name.Attribute_Name = "<soapenv:Envelope xmlns:soapenv=""http://schemas.xmlsoap.org/soap/envelope/""…etc;”

With most device drivers, the user sets the topic update interval within the System Management Console. However, with web services, if the driver has 0 in the update interval column then the program can be used to command the update. To command the update an associated attribute needs to be configured to the “Post.run” of the device driver. With that setup, the program will just need to write a 1 to this tag, and the driver will execute the XML body.

When writing directly to the DDE Suite Link, a delay is needed to allow time for the string variable to update. This time delay is a complete cycle of the Engine. After writing the XML to the attribute body name, create a Boolean instance to toggle on. This bit will trigger a simple script on the next scan. The script turns off the bit, and then turns on the “Post.Run”. Once this is done, the XML that is loaded into XML body, will be sent to the Web Service Host. And after the sent command is sent, the driver will turn off the “Post.Run”.
 

Similar Topics

I have a CompactLogix (v19), 3 Kinetix300 servos and an industrial PC with Wonderware. I am trying to create an alarm screen to display the servo...
Replies
1
Views
3,038
Hi guys, I have experience with PLC to Excel etc...just starting on using intouch scada screens. I have an Excel sheet that uses mainly...
Replies
1
Views
126
Hello everyone, Recently, my Archestra IDE shut down while I was editing. After restarting the IDE, I noticed warning symbols under my opened...
Replies
1
Views
95
Good morning all. I'm working on a rehab where they had a standalone InTouch 2014 HMI that they called a SCADA, but it's really basic stuff. The...
Replies
4
Views
170
Hi, We are setting up an Aveva Plant SCADA node with the intention to connect it to a Wonderware Historian node. Everywhere I look online I see...
Replies
1
Views
160
Back
Top Bottom