Set constant value in a constant block from gui to simulink (working with f28335 target)

2 views (last 30 days)
Hi, I have a trouble using gui with simulink. It consists in the impossibility to send one constant value from gui to simulink usign one constant block and then send it to f28335 target througth SCI. The constant value (gui) is established in the constant block (simulink) correctly, but it is not sent to the target f28335 during the simulation. The value is sent only when I make a mouse click in the simulink window. Is there any matlab command to activate the constant block from gui? For example: simulating the "ok" button of the constant block.
Thank's
Best regards.

Answers (1)

Andrew Schenk
Andrew Schenk on 17 Jun 2015
To update Simulation workspace variables while External mode is running, add the following code to your GUI callback function:
set_param(bdroot,'SimulationCommand','update')

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!