Skip to main content
WinWedge and TCP-Wedge can be used to collect data from multiple devices simultaneously. There are several ways to do this, but perhaps the easiest is to run two instances of WinWedge (or TCP-Wedge) and also have two VBA macros defined in Excel where you have each instance of WinWedge call it’s own macro: When configuring WinWedge or TCP-Wedge, you would select “DDE Server” from the Mode menu and then use the following settings in the Window that appears:

Configuring WinWedge or TCP-Wedge

WinWedge DDE server settings

Remember to set WinWedge up in DDE Server Mode. For further assistance See the DDE Server Mode Setup Guide. For the first instance of WinWedge, you would configure it using the following parameters after you select the “DDE Server” option from the Mode menu, DDE Application Name: Excel DDE Topic: System DDE Command: [RUN(“GetDevice1Data”)] For the second instance of WinWedge, you would use the following parameters: DDE Application Name: Excel DDE Topic: System DDE Command: [RUN(“GetDevice2Data”)] Note: If you are running WinWedge Professional Edition, the “DDE Command” option will not appear in the “DDE Server” options window and instead, it will appear as “Field Postamble DDE Command” entries in the last window of the “Input Record Definition Editor” window. To get to this window, you select Define – Input Data Record Structure and then click the Continue button in each window that appears until you get to the last window with the window caption “Input Record Definition Editor”. If you have more than one data field defined, you would click the “Next Field” button until you get to the last defined data field and enter the command in the Field Postamble DDE Command textbox. You only need to enter the command in the Field Postamble DDE Command textbox for the very last data field that you have defined. All other Field Postamble DDE commands should be left blank.

Setting up Excel macros

Excel instructions

*Important Note: Because we are collecting data from multiple devices, each device will have its own Excel macro and it’s own instance of WinWedge. When following this guide for setting up WinWedge, be sure to first map out each Excel macro to a specific WinWedge Instance (active COM port). The DDE Command in WinWedge and the target COM port in the Excel macro will need to be customized for each device. Create or edit a macro module in Excel and enter the following code in the module: (To create a new module click on Insert > Module from the Menus in the Visual Basic Editor Window.)

Creating a second macro for the second device

The following code is almost identical, but it opens up com 2 and writes to the next column over.
Basically what happens is that when the first instance of WinWedge receives data, it triggers the macro GetDevice1Data which writes the data to column A. The second instance of WinWedge will trigger the macro GetDevice2Data which will write that data to column B.
Last modified on November 3, 2026