
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?
0 个评论
回答(2 个)
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
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.
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 Center 和 File Exchange 中查找有关 String 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!