Writing File with xPC Target using xPC Target format
2 views (last 30 days)
Show older comments
Hi everyone, I'm trying to save a file on target pc hard drive using xPC Target Tool.
At first, by mean of "Xpc Target From File" block, I'm able to load file, from target HDD, then by the unpacking block extract all data and use them in my model; at the end of simulation, some data will be changed, so I need to save, on the same target hdd, the file with same properties, (name... and so on) only changing some data, in order to load the new saved data when the application restart.
I didn’t find any block to do it.
How can I fix my issue?
Thanks in advance
0 Comments
Answers (1)
Rajiv Ghosh-Roy
on 2 Jul 2014
When the application is stopped, you can transfer the new file (with the same name) before starting the application. If you are using R2014a, you can use the API SimulinkRealTime.copyFileToTarget or otherwise the xpctarget.ftp object to do the transfer.
You can also transfer using the Simulink Real-Time Explorer (or xPC Target Explorer in older releases).
0 Comments
See Also
Categories
Find more on Target Computer Setup in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!