Skip to Main Content Skip to Search
Product Documentation

xpctargetping - Test communication between host and target computers

Synopsis

MATLAB command line

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

Arguments

mode

Optionally, enter the communication mode:

    Note   RS-232 Host-Target communication mode will be removed in a future release. Use TCP/IP instead.

 

TCPIP

Enable TCP/IP connection with target computer.

 

RS232

Enable RS-232 connection with target computer.

arg1

Optionally, enter an argument based on the mode value:

 

IP address

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

 

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 computer.

 

Baud rate

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

Description

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

xpctargetping

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

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

This function returns success if the xPC Target kernel is loaded and running and communication is working between host and target.

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

ans =
success

Examples

Check for communication between the host computer and target computer.

xpctargetping

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

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

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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