xpctarget.ftp - Create xPC Target™ FTP object

Syntax

MATLAB® command line

file_object = xpctarget.ftp('mode', 'arg1', 'arg2')

Arguments

file_object

Variable name to reference the FTP object.

mode

Optionally, enter the communication mode:

 

TCPIP

Specify TCP/IP connection with target PC.

 

RS232

Specify 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

Constructor of an FTP object. The FTP object represents the file on the target PC. You work with the file by changing the file object using methods.

If you have one target PC object, or if you designate a target PC as the default one in your system, use the syntax

file_object=xpctarget.ftp

If you have multiple target PCs in your system, or if you want to identify a target PC with the file object, use the following syntax to create the additional file objects.

file_object=xpctarget.ftp('mode', 'arg1', 'arg2')

Examples

In the following example, a file object for a target PC with an RS-232 connection is created.

f=xpctarget.ftp('RS232','COM1','115200')

f =
	xpctarget.ftp

Optionally, if you have an xpctarget.xpc object, you can construct an xpctarget.ftp object by passing the xpctarget.xpc object variable to the xpctarget.ftp constructor as an argument.

>> tg1=xpctarget.xpc('RS232','COM1','115200');
>> f2=xpctarget.ftp(tg1)
 
f2 =
 
	xpctarget.ftp
  


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