Can a signal go to a server ? in simulink

2 次查看(过去 30 天)
In simulink, I want some incoming signals to be delayed before reaching their final destination. Because I want to have knowledge about how many signals are being delayed and other statistics, I want to use a server instead of a delay block to use its statistics option. Can a signal pass through a entity server? Any ideas?

回答(2 个)

Anay
Anay 2025-2-5
Hi John,
Yes, it is possible to pass signals to an “Entity Server” block. The signals will be delayed by the amount in “Service time value” parameter of the Entity Server. Entities are discrete items which can be defined in a discrete-event simulation.
So, the signals you want to pass to the entity server must be discrete. You must use an “Entity Generator” block to generate entities for your signals before passing them to the Entity Server.
Here is an example Simulink model for your reference to pass signals to an Entity Generator:
To replicate the example, add the following blocks to your Simulink model: Entity Generator Block, Entity Server Block, Simulink Function Block, and Scope Block. Connect them as depicted in the reference image. Configure the Simulink Function Block to output your desired signal.
However, keep in mind that if the Entity Server's capacity is less than the number of entities generated during its service time, it may lead to missed entities.
You can refer to the documentation of Entity Server block from the below attached link.
I hope this clarifies your query.
  3 个评论
Anay
Anay 2025-2-6
Hi John,
As I mentioned, you have to convert the signals to entities before passing them to the “Entity Server” block. You can convert the output entities from the Entity Server back to signal using a “Simulink Function” block.
Following is the implementation of Simulink Function block which implements the function “sig_output” used to convert entities to signal for your reference:
In the Block Parameters dialog of the Entity Server block under the “Events action” tab, call the function implemented by the Simulink Function block.
This will make the Entity Server call the Simulink Function block every time it services an entity. Output of this Simulink Function block is the delayed signal.
john
john 2025-2-6
I dont understand, sorry. I want the signal coming from enabling the number of entites departed from the entity server's block statistics to somehow generate a new entity. At the beginning of the mode I have an entity generator that provides entities to a server but from that entities I want to make some others from the signal generated.

请先登录,再进行评论。


Laurent Royer
Laurent Royer 2025-2-19
Hi John,
Does the attached example fit your need? Run the simulation and open the Data Inspector to compare the server block and the delay block approaches.

类别

Help CenterFile Exchange 中查找有关 String 的更多信息

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by