writing values from stateflow chart

1 visualización (últimos 30 días)
Hamza Hamza
Hamza Hamza el 30 de Jul. de 2022
Respondida: Sayan el 5 de Sept. de 2023
Hi ,
I am working currently on a simulink model , to which i added a stateflow chart . The last task in the Stateflow is to type down values i ll get from a sensor . So i wanted to ask , if there is anykind of function that allows to get some measures written for a period of time (20 sec) . I would be very glad for your help .

Respuestas (1)

Sayan
Sayan el 5 de Sept. de 2023
I understand from your query that it is required to write the output data from the "Stateflow" chart for a period of 20 seconds. The possible ways to do that are mentioned below.
  • The sensor output of the stateflow can be written to a ".mat" file. To do this, a To File block can be added, which will store the data in ".mat" format. The datatype of output can be configured in the "Save format" field.
  • The "MATLAB Function" (available at Simulink/User-Defined Functions) block can be used to capture and store sensor measurements for a specified period of time. In this block, the input is the sensor output data that needs to be written. You can write your code here in the function to store the data in the desired format for the specific period of time.
Further details about the above blocks can be found in the following MATALAB documentation:
Hope this helps resolve the query.

Categorías

Más información sobre Stateflow en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by