Simulink RT - Too much delay with getsignal()

1 回表示 (過去 30 日間)
Nicolas
Nicolas 2023 年 5 月 5 日
コメント済み: Diego Kuratli 2023 年 5 月 10 日
Hello Everyone,
We are facing a delicat situation here. We got a Speedgoat setup that work pretty well curently, that we use to perform HIL test on our ECU.
We are trying to set several fault on ECU, by sending invalid data on various Input thanks to RT Target. However when we want to calculate the detection time (eg : Timestamp when the fault is detected by our ECU - Timestamp when we inject the fault), we need to interrogate the RT Target with the getsignal method, and this method need (after our test) about 50 ms to get the answer, witch is really too long for us ...
Is there any method to perform this kind of test ? Or a way to speed up the getsignal() answer ?
Thank you very much for your help
Regards

採用された回答

Diego Kuratli
Diego Kuratli 2023 年 5 月 8 日
The getsignal call might not be the right one for your use case. There is some overhead because getsignal has to 1) find the signal, 2) send a command to the real-time system, and 3) get the response back from the real-time system.
In your case, I would rather use an instrument object or log the signal.
  2 件のコメント
Nicolas
Nicolas 2023 年 5 月 9 日
Thanks for the reply ! We think too that log signal could be a good solution, but I don't know how to get the value of a logged signal inside a .m script, is there a possibility to get that ?
I'm not familiar with the real time instrument object, but if I can get the value of my signal inside a .m script, we will probably use this solution
Thank for your help !
Diego Kuratli
Diego Kuratli 2023 年 5 月 10 日
You can create the instrument object, and then call it from a M file. Here you can find an example for an app, but essentially the same code can be reused in a MATLAB script:

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by