
Can a signal go to a server ? in simulink
2 views (last 30 days)
Show older comments
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 Comments
Answers (2)
Anay
on 5 Feb 2025
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 Comments
Anay
on 6 Feb 2025
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
on 19 Feb 2025
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.

See Also
Categories
Find more on String in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!