Skip to Main Content Skip to Search
Product Documentation

xpctarget.ftp - Create file transfer protocol (FTP) object

Synopsis

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:

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

 

TCPIP

Specify TCP/IP connection with target computer.

 

RS232

Specify 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

Constructor of an FTP object (xpctarget.ftp Class). The FTP object represents the file on the target computer. You work with the file by changing the file object using methods.

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

file_object=xpctarget.ftp

If you have multiple target computers in your system, or if you want to identify a target computer 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 computer 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
  


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