Is there a way to pass variables from SimEvents to Simulink while the simulation is running?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Teresa Hubscher-Younger
am 12 Okt. 2015
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.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete-Event Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!