This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

SimulinkRealTime.openFTP

Provide FTP access to folders and files on target computer

Description

The SimulinkRealTime.openFTP object provides FTP access to folders and files on the target computer.

Creation

ftp_object = SimulinkRealTime.openFTP() constructs and returns the FTP object corresponding to the default target computer. If you have only one target computer or if you designate a target computer as the default target computer in your system, use this form.

ftp_object = SimulinkRealTime.fileSystem(target_object) constructs and returns the file system object corresponding to the target computer that is accessible by target_object.

ftp_object = SimulinkRealTime.fileSystem(target_name) constructs and returns the file system object corresponding to the target computer that is accessible by target_name.

The SimulinkRealTime.openFTP function accepts these arguments:

  • target_object — Object representing target computer.

    Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink® Real-Time™ kernel and apply the required Ethernet link settings.

  • target_name — Name assigned to target computer.

  • ftp_object — Object representing the target computer for FTP access.

    FTP object created by using the SimulinkRealTime.openFTP creation function.

    The FTP object supports FTP access to the target computer file system. You work with the target computer file system from the development computer by using FTP methods.

Properties

No properties.

Examples

collapse all

Create an ftp object for the default target computer, select an FTP folder, and list the contents of the current folder

TargetPC1Drive = SimulinkRealTime.openFTP();
cd(TargetPC1Drive, 'C:\');
dir(TargetPC1Drive)
 
KERNEL.SYS      E100BODI.COM    ODIPKT30.COM    USBVIEW.EXE     BOUNCIN1.DLM    logs            
COMMAND.COM     E1000ODI.COM    PASSWORD.TEL    $RECYCLE.BIN    new_data.dat    rundir0         
FDOS            FTPBIN.EXE      RTTBOOT.COM     dos.sg          nwr_tmp         loggingdb.json  
AUTOEXEC.BAT    IPXODI.COM      RUNFTP.BAT      xpcboot.com     data.dat        sc3Integ.dat    
FDCONFIG.SYS    LISTDEVS.EXE    SERDRV.SYS      xpmtgo.rtb      data1.dat       fLogData.dat    
CONFIG.TEL      LPT1USB.SYS     TELPASS.EXE     XPCKRNL.RTB     slrtst.dat                      
DEVLOAD.COM     LSL.COM         TERMIN.COM      xPCTrace.csv    sc1Integ.dat                    
DOSUSB.COM      NET.CFG         USBDISK.SYS     sc2Integ.dat    private                         
 

Create an FTP object for target computer by object tg, select the C:\ drive on the target computer, and return current folder information.

tg = SimulinkRealTime.target('TargetPC1');
TargetPC1Drive = SimulinkRealTime.openFTP(tg);
cd(TargetPC1Drive, 'C:\');
cd(TargetPC1Drive)
ans =

    'C:\'

Create an FTP object for target computer by name TargetPC2, select the C:\ drive on the target computer, and return current folder information.

TargetPC2Drive = SimulinkRealTime.openFTP('TargetPC2');
cd(TargetPC2Drive, 'C:\');
cd(TargetPC2Drive)
ans =

    'C:\'

See Also

| | | | | | | | | | |

Introduced in R2018a