xPC Target | ![]() ![]() |
Connecting the Web Interface Through RS-232
If the host PC and target PC are connected with a serial cable instead of a network cable, you can still connect the target application on the target PC to a Web browser on the host PC. xPC Target includes a TCP/IP to RS-232 mapping application. This application runs on the host PC and writes whatever it receives from the RS-232 connection to a TCP/IP port, and it writes whatever is receives from the TCP/IP port to the RS-232 connection. TCP/IP port numbers must be less than 216 = 65536.
Before you connect your Web browser on the host PC, you must load a target application onto the target PC. The target application does not have to be running, but it must be loaded. Also, your Web browser must have JavaScript and StyleSheets turned on.
22222
, type the following:
*--------------------------------------------------------------* * xPC Target TCP/IP to RS-232 gateway * * Copyright 2002 The MathWorks * *--------------------------------------------------------------* Connecting COM to TCP port 22222 Waiting to connect
If you did not close the MATLAB to target application connection, then xpxtcp2ser
displays the message Could not initialize COM port
.
The gateway application has a handler that responds to Ctrl-C by disconnecting and shutting down cleanly. In this case, Ctrl-C is not used to abort the application.
If you did not close the gateway application, MATLAB displays the message
To correct this problem, you must close MATLAB and then restart it.
Syntax for the xpctcp2ser Command
The syntax for the xpctcp2ser
command is
The options are described in the following table.
![]() | Connecting the Web Interface Through TCP/IP | Using the Main Page | ![]() |