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

2 次查看(过去 30 天)
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.

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Block Libraries 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by