Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Save and Read Data on xpc target

Subject: Save and Read Data on xpc target

From: Qi

Date: 18 Feb, 2013 09:32:05

Message: 1 of 2

I made an xpc target model. There is a data (one demension vector with 500 elements) always need to be

read and saved(overwritten). I'm using "xpc target scope"(type file) to save the data to memory of

target pc and through a script to upload it to workspace of host pc. Then I can use "from workspace"

in my model to download the data from host to target again.

Now I have some problems.

1. When I set the time spacing to 0.01s, file scope will save all the data from start to end every

0.01s. Those mid data can be used to check the process, but most important is the last data. In my

case I always have to copy and paste the last row of variable in host workspace, which is created by

my script, and then download it to xpc target model again. But this is complex and takes too long,

what I really want is to only direct read that end data from xpc memory to my xpc model on start

running the next time without anything to do on host pc. Is there any way to realise it?

2. File scope saved always the data(500 elements) and the time(0.00,0.01,0.02,0.03...) as the last

term so there is 501 terms in all in host pc workspace. How can I save or read only the 500 elements

data without that time, best upon solution of 1. problem?

Subject: Save and Read Data on xpc target

From: Kantilal Hirani

Date: 10 Mar, 2014 03:00:20

Message: 2 of 2

"Qi " <wq13579@hotmail.com> wrote in message <kfssel$j$1@newscl01ah.mathworks.com>...
> I made an xpc target model. There is a data (one demension vector with 500 elements) always need to be
>
> read and saved(overwritten). I'm using "xpc target scope"(type file) to save the data to memory of
>
> target pc and through a script to upload it to workspace of host pc. Then I can use "from workspace"
>
> in my model to download the data from host to target again.
>
> Now I have some problems.
>
> 1. When I set the time spacing to 0.01s, file scope will save all the data from start to end every
>
> 0.01s. Those mid data can be used to check the process, but most important is the last data. In my
>
> case I always have to copy and paste the last row of variable in host workspace, which is created by
>
> my script, and then download it to xpc target model again. But this is complex and takes too long,
>
> what I really want is to only direct read that end data from xpc memory to my xpc model on start
>
> running the next time without anything to do on host pc. Is there any way to realise it?
>
> 2. File scope saved always the data(500 elements) and the time(0.00,0.01,0.02,0.03...) as the last
>
> term so there is 501 terms in all in host pc workspace. How can I save or read only the 500 elements
>
> data without that time, best upon solution of 1. problem?



Hey Qi,

First of all i wanted to know that how can you able to save the data using file scope. I have tried to save the data using file scope, the target monitor showing the error, "Error -29 Drive not ready". Do you what could be the reason for this error. Also, is it required to have perticular formated type HDD or memory stick on target. if yes than can you please guide me.??

I would like to thank you in andavnce.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us