Is there a way to pass variables from SimEvents to Simulink while the simulation is running?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Teresa Hubscher-Younger
il 12 Ott 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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Discrete-Event Simulation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!