View real-time data on voltage, current, power, etc.

6 visualizaciones (últimos 30 días)
Héctor
Héctor el 28 de Mzo. de 2023
Respondida: Harsh el 6 de Mayo de 2025
I have to make a program in appdesigner, with the help of matlab where I will put real voltage and current data, from that I will get the rest of the values, but I don't know the programming so that the variable can be seen in a text box, for example of power and its unit of measurement kw, and at the same time it is interspersed between measurements, voltage, current, power and so on, with a timer or something like that.

Respuestas (1)

Harsh
Harsh el 6 de Mayo de 2025
To create a MATLAB App Designer application that processes real-time voltage and current data to compute and display power (in kilowatts) and other electrical parameters, follow these steps:
1. Accessing User Inputs
In your App Designer app, you can use "NumericEditField" components to allow users to input voltage and current values. To retrieve these values within your code, access the "Value" property of the respective components.
2. Display Computed Values in Text Areas
To show results like voltage, current, and power (with units), update a "TextArea" or "Label" using "sprintf". For example -
app.PowerTextArea.Value = sprintf('Power: %.2f kW', power_kW);
3. Real-Time Updates Using Timers
Use a "timer" object to refresh calculations and display regularly. Start the timer with "start(app.myTimer)" and stop it with "stop(app.myTimer)" from UI buttons. In the "updateReadings" function, read input values, compute power, and update displays.
Use the following command to view documentation for "timer"
doc timer

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Productos


Versión

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by