Azzera filtri
Azzera filtri

Calling a Simulink Function Block from GUI

1 visualizzazione (ultimi 30 giorni)
Micah Mungal
Micah Mungal il 5 Mar 2016
Good Day everyone,
I am fairly new to Matlab and would like some assistance and guidance. I have to create predefined batteries for a power system. The batteries need to be created using a Three Phase Generator (used to generate power when the battery should be discharging) and Three Phase Load (used to act as a load when the battery should be charging). So I have created the battery in Simulink using the generator and load as well as a Matlab Function block and two three phase breakers. The Matlab function block has the code to operate which breakers are closed or opened. In this way when the battery is connected to the main circuit, it either acts as a load or generator so that I can perform a load analysis. Now I have included this battery model in a Simulink Function block and connected to the circuit. Check the attached simulink file(Test_Load_Flow). Now I created a GUI using Guide and when the user presses Simulate, I would like to call the Simulink Function to initialise the battery and as well as pass values from an excel file containing different load values. How do I call the Simulink Function block. Attached is the Simulink File (Test_Load_Flow), and the GUI(NewGUI1.fig and NewGUI1.m). I would like some advice on how to call the Simulink Function or whether there is a much simpler way to design my predefined battery.

Risposte (0)

Categorie

Scopri di più su Simulink Functions 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!

Translated by