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

Copy file from target computer to development computer

Syntax

SimulinkRealTime.copyFileToHost(file_name)
SimulinkRealTime.copyFileToHost(target_obj,file_name)

Description

example

SimulinkRealTime.copyFileToHost(file_name) copies file file_name from the default target computer to the development computer.

Note: The SimulinkRealTime.fileSystem object will be removed in a future release. See the release note for file system commands to use instead. These commands use the SimulinkRealTime.openFTP function and the functions for the MATLAB ftp object.

example

SimulinkRealTime.copyFileToHost(target_obj,file_name) copies file file_name from the target computer represented by target_obj to the development computer.

Examples

collapse all

Copy file from current folder on default target computer.

SimulinkRealTime.copyFileToHost('data.dat')

Copy file from full path location on target computer TargetPC1.

tg = slrt('TargetPC1');
SimulinkRealTime.copyFileToHost(tg,'c:\xpcosc\data1.dat')

Input Arguments

collapse all

If the argument is a character vector or string scalar, it must be the name assigned to a previously configured target computer.

If the argument is a variable containing an object, it must be a SimulinkRealTime.target object representing a previously configured target computer.

Example: 'TargetPC1'

Example: tg

Data Types: char | string | struct

If the argument is a file name, the file must be in the current folder on the target computer, as indicated by the function SimulinkRealTime.fileSystem.pwd.

The file is transferred from the target and written with the same file name to the current folder on the development computer.

Example: 'myFile.txt'

Example: 'c:\subDir\myFile.txt'

Data Types: char | string

Introduced in R2014a