xpctargetping - Test communication between host and target PCs

Syntax

MATLAB command line

xpctargetping
xpctargetping('mode', 'arg1', 'arg2')

Arguments

mode

Optionally, enter the communication mode:

 

TCPIP

Enable TCP/IP connection with target PC.

 

RS232

Enable RS-232 connection with target PC.

arg1

Optionally, enter an argument based on the mode value:

 

IP address

If mode is 'TCPIP', enter the IP address of the target PC.

 

COM port

If mode is 'RS232', enter the host COM port.

arg2

Optionally, enter an argument based on the mode value:

 

Port

If mode is 'TCPIP', enter the port number for the target PC.

 

Baud rate

If mode is 'RS232', enter the baud rate for the connection between the host and target PC.

Description

Pings the target PC from the host PC and returns either success or failed. If you have one target PC, or if you designate a target PC as the default one in your system, use the syntax

xpctargetping

If you have multiple target PCs in your system, use the following syntax to identify the target PC to ping.

xpctargetping('mode', 'arg1', 'arg2')

If the xPC Target kernel is loaded, running, and communication is working properly, this function returns the value success.

This function works with both RS-232 and TCP/IP communication.

ans =
success

Examples

Check for communication between the host PC and target PC.

xpctargetping

If you have a serial connection with the target PC you want to check, use the following syntax.

xpctargetping('RS232', 'COM1', '115200')

See Also

The xPC Target procedure Testing and Troubleshooting the Installation

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS