Can a signal go to a server ? in simulink

조회 수: 11 (최근 30일)
john
john 2025년 2월 1일
댓글: john 2025년 2월 20일
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.
  댓글 수: 1
john
john 2025년 2월 20일
thanks, I used a different aproach with a matlab function.

댓글을 달려면 로그인하십시오.

카테고리

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