Is there a way to pass variables from SimEvents to Simulink while the simulation is running?
5 ビュー (過去 30 日間)
古いコメントを表示
I was wondering if there is a way to pass variables from a SimEvents based system to a Simulink based system. Right now I have a two separate systems which use a set of shared global variables. But these are not adjustable once the simulation starts running. Is there a way to define variables in the SimEvents system and pass them into the Simulink system so that I can change certain variables during the simulation?
1 件のコメント
Teresa Hubscher-Younger
2015 年 10 月 12 日
I might not be understanding exactly what you want to do. But if I had some global variables that I wanted to use in the SimEvents system and the pass them into the Simulink system. I would assign them to attributes and pass them out to Simulink as attributes. You would use the Set Attributes block to assign the value and then the Get Attributes block to pull it out and send it as a signal to Simulink, which then can change the variables. But if you already have it as an attribute, you can manipulate it in SimEvents, including by using the MATLAB Attribute Function block. I'm not sure if this is what you were looking for, but I thought it couldn't hurt to throw out an idea.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Discrete-Event Simulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!