|
Technical Support
TCP-Wedge is almost identical
to WinWedge except that instead of providing an interface to a serial
port, TCP-Wedge communicates through a TCP/IP network port address. Like
File Wedge and the WinWedge, TCP-Wedge is extremely powerful because it
allows you to take data from any TCP/IP network data source and feed
that data directly into any Windows application and works by either
converting the data to keystrokes or by passing the data through DDE
links. TCP-Wedge has the ability to parse, filter, format, translate
data and to write data to a disk file instead of another program.
TCP-Wedge provides full two way I/O capabilities thereby allowing you to
send and receive data to any device connected over a TCP/IP network,
including an Intranet or the Internet!
Note: TCP-Wedge is provided with
the 32 bit version of the WinWedge only.
To use TCP-Wedge, you must have the
TCP/IP network protocol installed in your PC. You can install the
TCP/IP network protocol by selecting the Network icon in the Window
control panel.
Since there are very few
differences between TCP-Wedge and WinWedge you can use the WinWedge
Users Manual for both products. The differences between the two
products are discussed below.
Differences Between TCP-Wedge
and WinWedge
Since TCP-Wedge communicates
through a TCP/IP port address and not through a serial port, instead
of allowing you to select any serial communications parameters,
TCP-Wedge allows you to specify an IP address and port number. When
you select "Settings" from the PORT menu in TCP-Wedge, the following
dialog box will appear:

TCP-Wedge can operate as a TCP/IP
Client or as a TCP/IP server. If you choose the option to set up
TCP-Wedge as a TCP/IP Client, then you will need to enter the IP
address ("Remote Host IP Address") and the Port number ("Remote Port")
of the TCP/IP Server that you want TCP-Wedge to connect to.
When you set up TCP-Wedge as the
client, TCP-Wedge will be responsible for establishing the
connection to the Remote IP Address and Port number that you specify.
The connection to the remote IP Address will occur when you activate
TCP-Wedge by selecting either "Test Mode" or "Normal Mode" from the
ACTIVATE menu or when you open the "Analyze" window by selecting "Analyze"
from the PORT menu.
If you choose to set up TCP-Wedge
as a TCP Server, then TCP-Wedge will use the IP address of the
computer that you are using as the "Local IP Address" however you
will need to specify a "Local Port" number that you would like to
use. In this case, the remote client will be responsible for
initiating the connection to TCP-Wedge using the Local IP address
for your PC and the Local Port number that you specify. When you
select the option "This PC Will Act as TCP Server" in the TCP Wedge
Port Settings dialog box, the Local IP Address for your computer
will be displayed in gray text in IP Address text box. If your PC
does not have the TCP/IP network protocol installed or if your PC
does not have an IP Address assigned to it, you will not be able to
select the option to set up TCP-Wedge as a TCP Server. If you set up
TCP-Wedge as a TCP Server, after you activate TCP-Wedge in either
Test or Normal mode, it will simply wait for another computer on the
network to establish a TCP/IP connection to it using the Local IP
Address of the PC where TCP-Wedge is running and the Port Number
that you specified.
TCP-Wedge is functionally identical
to the WinWedge except for a few minor differences. Since TCP-Wedge
does not communicate over a serial port you will not be able to
select any options that are specific to a serial port. For example,
when you define serial output strings or hot keys and hot key
actions in TCP-Wedge you will not find any options or hot key
actions that relate specifically to serial ports. This includes the
ability to set the states of any serial port hardware handshaking
lines like RTS and DTR. Otherwise, TCP-Wedge is identical to
WinWedge.
To communicate with TCP-Wedge using
Dynamic Data Exchange (DDE), use the DDE Application Name
TCP-Wedge and set the DDE Topic to the IP Address that you
entered in the TCP-Wedge Port Settings dialog box. If TCP-Wedge is
set up to be a Server, the DDE Topic would be the IP Address of the
PC that TCP-Wedge is running on. In Excel VBA this would look like:
chan =
DDEInitiate("TCPWedge", "123.45.67.89")
The DDE Item names available in
TCP-Wedge are the same as in the Software Wedge (i.e. Field(1),
Field(2), etc., RecordNumber and DateTime)
There are a number interesting ways
that you could use TCP-Wedge including sending and receiving data
over an Intranet or the Internet directly from within any Windows
program like Excel or Access. Several network hardware companies
also sell protocol converters that convert from RS232 to an Ethernet
connection. Using one of these devices, you could connect an
instrument with an RS232 output directly to a TCP/IP network. You
could then run TCP-Wedge in any PC on the network to communicate
with the serial device. Using an RS232 to TCP/IP converter, you
would not need to install a complete networked PC at the location
where the device is at. You could simply install a network
connection and the RS232 to TCP/IP converter and then use TCP-Wedge
on any other PC in the network to communicate with the device.
If you have a PC with a network
connection near your RS232 devices you can use
TCP-Com
software to convert the RS232 to TCP/IP (or TCP/IP to RS232).
Problem Setting the Focus to
TCP-Wedge
After adapting code
examples (found in the WinWedge manual for launching WinWedge with a
saved configuration file) for TCPWedge you find that, although
TCPWedge launches correctly, it is necessary to click on it (give it
focus) before the TCP connection is established and data can be
collected.
Solution:
We are still researching the cause
of this problem, however here is a simple workaround:
Modify the Shell command in
your code to supply the optional windowstyle argument
vbNormalFocus:
RetVal = Shell("C:\Winwedge\TCPWedge.exe
C:\Mydocu~1\config.tw3", vbNormalFocus)
When the windowstyle argument is
ommitted, the default value of vbMinimizedFocus is assumed
and while the description of this option sounds like it should give
the program focus, you would still need to click on TCPWedge
manually. If you want TCPWedge to run minimized simply check the "Minimize
on Activation" option under the Activate Menu.
For more information on the Shell
command refer to the online Help in VBA or Visual Basic. |