From: Daniel on
Hello all,

I want to implement the following task and I'm not sure if Simulink is thought to be used that way:

The idea is to steer and control, but as well do some measurements on a test bench. We have sensors on it, which can be accesed via Simulink - Blocks, but only by one block at the same time.

We would like to implement a model, which provides the data from the sensors at about 5kHz and writes it to the workspace. Another model should now access the data in the workspace and do some measurements (maybe at lower frequency) and control the test bench. Everything should take place on runtime.

I tried it with S-functions and Embedded Matlab Functions with the commands "assignin" and "set_param" to force the blocks in the measurement model to continously update the values from the workspace - but it works ways to slow.

Does anybody have another idea how to manage this task or how to make it faster?

Thanks a lot,
Daniel
From: us on
"Daniel " <dliermann(a)hotmail.com> wrote in message <htln1p$s96$1(a)fred.mathworks.com>...
> Hello all,
>
> I want to implement the following task and I'm not sure if Simulink is thought to be used that way:
>
> The idea is to steer and control, but as well do some measurements on a test bench. We have sensors on it, which can be accesed via Simulink - Blocks, but only by one block at the same time.
>
> We would like to implement a model, which provides the data from the sensors at about 5kHz and writes it to the workspace. Another model should now access the data in the workspace and do some measurements (maybe at lower frequency) and control the test bench. Everything should take place on runtime.
>
> I tried it with S-functions and Embedded Matlab Functions with the commands "assignin" and "set_param" to force the blocks in the measurement model to continously update the values from the workspace - but it works ways to slow.
>
> Does anybody have another idea how to manage this task or how to make it faster?
>
> Thanks a lot,
> Daniel

a hint:
- did you look at these tbxs...

http://www.mathworks.com/products/sigprocblockset/

http://www.mathworks.com/products/daq/

us
From: Daniel on
Hey us,

thanks for responding that fast. Actually I'm using these toolboxes for logging the data (eg. with the signal to workspace block), but I didn't figure out how to write my incoming signal to the workspace to make it accessible to other models running on the same time. It should look like this:

1st model:
Analog Input -> Digital Input -> write currently measured value to workspace (only one, which is overwritten all the time) (e.g. 5kHz frequency)

2nd model for example:
access measured value from workspace -> log or plot values (e.g. 1kHz frequency)

How would you implement this?

Thanks for your help,
Daniel