Wonderware inTouch: Linking Serial Data from WinWedge

DDE communication between InTouch and the WinWedge Serial Server can be set up in different ways, depending on the requirements of the application involved. In a typical application, InTouch is used with WinWedge to bring data in from a serial device, display it on a window in InTouch or send a command out to the serial device. The following is a guide that will help you configure WinWedge links which would be best for your application and how to quickly set up these links.

WinWedge Setup:
  1. The MODE of WinWedge must be configured as a DDE Server.
  2. The COM port that will be used to communicate with the serial device needs to be configured. WinWedge requires the normal serial connection configuration – Baud rate, Parity, Data Bits, Stop Bits, Flow Control, and the Buffer size. These will need to be matched to the serial device that is being read. The COM port can be analyzed to determine the type of signal being sent from the serial device. For DDE communication, WinWedge’s topic will be the COM port being used by the serial device.
  3. The Input Record Structure needs to be defined. Since Software Wedge has no way of knowing the type of information it will be receiving from the COM port, it allows you to configure the Start and End of Record Events. Please refer to the WinWedge manual for the different options.
  4. The valid item addresses need to be defined using the Input Record Definition Editor – DDE Server Mode. This dialog will come up in Software Wedge after the Input Structure has been defined. Depending on the number of fields per data record, the valid item addresses are Field(n) where n is the field number defined in Software Wedge.
  5. If it is necessary to send messages out the COM port, an Output Buffer DDE Link will need to be defined. An Output Buffer DDE Link is a one-time write which allows InTouch to act as a server for Software Wedge. The Output Buffer DDE Link would have View as the DDE Application, Tagname as the DDE Topic, and a user defined Tagname in WindowMaker as the DDE Item. The user defined Tagname can either be a memory tag (if it is changed only in InTouch) or a DDE tag (if communication to another program other than Software Wedge is desired).
inTouch Setup

In this case, InTouch is the client (requesting application) and WinWedge is the DDE server. All points read from the serial device via WinWedge Serial server need to be defined as DDE tagnames in InTouch. Valid item names are defined in WinWedge’s Input Record Definition Editor. For example, a typical tag would be defined as follows:

Tagname: Product1
Type: DDE Message
DDE Access name: BarCode
Application / Server name: Winwedge
DDE Topic Name: COM2
Item: Field(1)

When WindowViewer first starts or when this tag is active, InTouch lets the server know that the point needs to be updated. Once initialized, the I/O server will check for the point to change in the serial device and will advise InTouch when its value changes. If the tag is not active in InTouch or if its value does not change in the serial device, the server will not advise InTouch of the point’s value. This makes communication between InTouch and the I/O server very efficient.

Inputting Serial Data into InTouch with WinWedge

In this case, InTouch is the client (requesting application) and the WinWedge is the DDE server. All points read from the serial device via the WinWedge Serial server need to be defined as DDE Tagnames in InTouch.

For DDE communication, the DDE application name for the WinWedge is “WINWEDGE” and the DDE topic will be the COM port that the Wedge is set up for (i.e. COM1, COM2, etc.)

Because the Wedge can parse incoming data records into individual data “Fields” the valid item addresses are “Field(1)” through “Field(n)” where n is the number of the data field as defined in WinWedge.

For example, a typical tag would be defined as follows:

Tagname: Product 1
Type: DDE Message
DDE Access Name: AnyNameYouWant
Application/server Name: WinWedge
DDE Topic Name: COM2
Item: Field (1)

When WindowViewer first starts or when this tag is active*, InTouch lets the server know that the point needs to be updated. Once initialized, the I/O server will check for the point to change in the serial device and will advise InTouch when its value changes. If the tag is not active in InTouch or if the value does not change in the serial device, the server will not advise InTouch of the point’s value. This makes communication between InTouch and the I/O server very efficient.

*Points are active in InTouch when they are:

  • On an open window
  • Historically logged
  • Alarmed
  • In a real-time trend
  • Advised from another DDE Client
  • Used in a script

Contact Us