Thread Subject: Xpc Target. Sample rate of 0.2 ?s achievable ??

Subject: Xpc Target. Sample rate of 0.2 ?s achievable ??

From: smar

Date: 15 Aug, 2009 17:00:19

Message: 1 of 4

I have a simulink model with inputs from seven sensors.
The fastest sample rate I can set is 0.001 s ( 1 KHz )

Setting more fast give a CPU overload error.
I have USB and Memory management off in BIOS.

I want to achieve the sample rate of 0.00002 (50 KHz)

Is it achievable?
I do not want to decrease input lines. What else can I do.?
Thanks

Subject: Xpc Target. Sample rate of 0.2 ?s achievable ??

From: Arnaud Miege

Date: 16 Aug, 2009 20:06:19

Message: 2 of 4


"smar " <smar234@yahoo.com> wrote in message
news:h66pj3$ql6$1@fred.mathworks.com...
>I have a simulink model with inputs from seven sensors.
> The fastest sample rate I can set is 0.001 s ( 1 KHz )
>
> Setting more fast give a CPU overload error.
> I have USB and Memory management off in BIOS.
>
> I want to achieve the sample rate of 0.00002 (50 KHz)
>
> Is it achievable?
> I do not want to decrease input lines. What else can I do.?
> Thanks

Do you need the model and/or the inputs/outputs at 50 kHz? You may be able
to get the model to run at 50 kHz and the inputs/outputs at a slower rate
and insert some rate transitions after the inputs / before the outputs.
Other than that, you'll have to either get a machine with a more powerful
CPU and/or simplify your model so that it runs faster. The compiler can also
affect performance. For example, Microsoft Visual Studio (prof. edition) is
generally better than Open Watcom. Which compiler are you using? Try turning
optimizations on.

Good luck,

Arnaud

Subject: Xpc Target. Sample rate of 0.2 ?s achievable ??

From: smar

Date: 17 Aug, 2009 19:21:01

Message: 3 of 4

Thanks for the reply.
I need to log (save) the data from all 7 sensors in real time at 50 KHz (0.0002 s sample time).
I use data logging method (simulink output block) to retrieve the data.
Now setting faster than o.001 sec sample time over load the CPU.

I could not understand how to“insert some rate transitions after the inputs / before the outputs”
I use visual studio.
Thank in advance for further help

Subject: Xpc Target. Sample rate of 0.2 ?s achievable ??

From: Michael

Date: 18 Aug, 2009 07:02:00

Message: 4 of 4

Achieving a sample rate of 50kHz is not simple, even if xPC Target has one of the fastest real-time kernels around. Are the 7 sensors analog-signal based? Or in other words do you use an analog or digital-type of input card? If so which brand and model? I/O latency at 50kHz is crucial, so you have to make sure that you use a fast and lowest-latency I/O card. That you can't get below 1ms points to another problem. What is the chipset and CPU (including clock rate) your target has? It looks like your target machine still issues SMIs even if you may have all sources disabled in the BIOS. This maybe a general issue of your motherboard/BIOS setup. If you once have cured that problem then you should easily be able to get down to say 5-10kHz. Getting to 50 kHz involves a lot more: You need the fastest I/O module and may also be required xPC Target's Polling Mode (data logging still works in
this mode).

"smar " <smar234@yahoo.com> wrote in message <h6cait$cj9$1@fred.mathworks.com>...
> Thanks for the reply.
> I need to log (save) the data from all 7 sensors in real time at 50 KHz (0.0002 s sample time).
> I use data logging method (simulink output block) to retrieve the data.
> Now setting faster than o.001 sec sample time over load the CPU.
>
> I could not understand how to“insert some rate transitions after the inputs / before the outputs”
> I use visual studio.
> Thank in advance for further help

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com