-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying sample times #50
Comments
APparently it was pretty simple - I just had to put the |
@bemilio Currently blockfactory allows implementing unit blocks that provide an instantaneous output (if needed, with an internal memory). Under this assumption, the sample time of the simulation is not passed to the blocks, and there isn't yet an unified way to distribute this information. There's a specific issue that tracks specifically this requirement #8. There are cases where we need to know the sample time (e.g. the real-time synchronizer block). In that case we pass the sampling time as a mask parameter. It goes under the assumption that blockfactory only support models simulated with a fixed step.
Your solution is not very clear to me, can you argument it a bit more in detail? |
here are two screenshots of the setup (one is just a zoom). Blocks and signals have different colors depending on the sample time at which they run. The yellow blocks are the |
@bemilio I think you are among the first ones to use different sampling rate within the same model (maybe with @CarlottaSartore). I was not aware of the existence of those blocks for the transition. As far as I knew, an alternative solution is to put all the blocks with a different sampling rate in another subsystem, and then configure the subsystem's step size. Probably in this way you don't need any additional blocks. Though, I'm not sure what is their actual effect. |
Adding to that, I noticed that Simulink has some problems setting the dimensionality of the signals when using these |
I think I can close this, the solution seems to work |
I was wondering if and how it is possible to specify the sample time at which a blockfactory Simulink block is executed
@diegoferigo @traversaro
The text was updated successfully, but these errors were encountered: