How to configure OPS SQL WWDDE Interface to create CSV files from WonderWare InTouch.
Before attempting to configure OPS SQL WWDDE, there are a few steps that must be done first:
1. Ensure WonderWare InTouch is archiving data. Historical data is stored in files with extension .LGH. Find these files - which you need to know later. Next, go into WonderWare and look up tagnames in the Tagname Dictionary.
2. When running InTouch, open Configure -> Access Names and either Add a new name or modify existing name if you have one already for HISTDATA.EXE. Enter HistData for Application, a Topic Name without spaces or special characters, and select DDE as shown below:
3. Set up at least one variable in OPS SQL. Open OPS SQL client, click Setup -> Edit/View Variable and select the Interface tab. Enter a Name, the Tag exactly as it appears in WonderWare, and select a Statistic.
4. Ensure that OPS SQL WWDDE is installed on the same computer as WonderWare InTouch, and can communicate with OPS SQL client database. NOTE: the WWDDE will require someone logged on to keep the service running - it does not run like a normal system service due to the fact it uses DDE technology.
5. Ensure DDEX.OCX file is loaded onto the computer where OPS SQL WWDDE is located and register it (see article Q11687)
1. Run OPSSQL_WWDDE
Run the OPSSQL_WWDDE program and the following screen will appear. Notice that none of the settings will be correct for your system, all of them need to configured.
2. Configure OPS SQL Facility
Click the Add Facility button to add your OPS SQL facility. The following screen will appear where you can click the drop down arrow and select your facility. Click the OK button after making a selection.
3. Configure Link Topic
Looking at the bottom half of the display, we see several settings to fill in. When you move the mouse pointer over the title of a setting, a hint will be displayed.
Move the mouse pointer over the words Link Topic and you will see the hint displayed below:
In WonderWare, you must set up a Topic Name for HISTDATA.EXE as shown in the Pre-Configuration steps. Enter the same name you typed for the Topic Name - it must be exactly the same.
4. Configure Historical Data Folder
The next setting down asks for the location of the historical data files, this is the LGH files. Notice the elipse button to the far right, click on it.
On the next screen click the drop down for Filter Types: and select *.lgh option.
Now navigate through the system until you can see .LGH type files.
In a typical WonderWare installation and configuration using the demo, these reside at:
5. Configure InTouch Application Folder
The next setting down is asking for the location of the Application Folder. If we look at the hint, we see that the application it refers to is the 'Tagname' library. Again, notice the elipse button to the far right, click on it.
On the next screen click the Filter Type: drop down and select Tagname*.*.
Now navigate through the system and find tagname files. In our demo we found them in the same place as the .LGH files.
In a typical WonderWare installation and configuration using the demo, these files reside under:
6. Configure HISTDATA.EXE Folder
The next setting down asks for the location of the HISTDATA.EXE program. Looking at the hint, we see that the application it refers to is the file named "histdata.exe". Click on the elipse button to the far right of this option.
On the next screen we want to filter what files pop up on the right hand side, select the drop down Filter Type and look for histdata.exe
Now navigate through your system until you find the histdata.exe program.
In a typical WonderWare installation and configuration, this file resides under:
7. Configure Output Folder
This setting is optional. We can see from the hint that if you leave this setting blank, it has a default:
The WWDDE program will create a "Cache" folder under the same folder it is installed. Notice in our example we chose a different drive. You can use any drive including mapped shared drives.
8. ERROR: Unable to submit request thru DDE. Check Settings.
If any of the settings have not been accomplished according to these procedures or if they are wrong, you will see this error message:
Double check all pre-configuration steps have been done, and all settings are correct. This program has been thoroughly tested on a WonderWare system running version 7.1.
9. Import Schedule to Run
NOTE: In order for this schedule run to create CSV files automatically, a user must always be logged in.
Set the Import Schedule to Run time to whatever time of the day you wish for it to create CSV files automatically. The time is in military format so hours afternoon are that time plus 12 (i.e., 1 PM is 13:00)
In our example, we want WWDDE to request CSV files from HISTDATA at 3:05 PM (15:05). Note the Last Ran box shows the last time the service ran. The first time this will automatically default to 14 days prior to the current day. This can be changed in the INTERFACE.INI file after settings have been saved.
10. Save Settings
Now that everything is properly configured, click the Save Settings button to save your current settings.
11. Start Service
If you can click Create File with a good response in the status bar, then you are ready to run the service.
Click on the menu option Services -> Start
If you did not save settings or you made any changes to the settings, you will see the following options:
- YES - Save settings and start service
- NO - Do not save settings, but start service - use previously saved settings
- CANCEL - Do nothing and return to display
You will see the Service Status button change from red to green: