Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export MATLAB variable into Stateflow parameter

Status
Not open for further replies.

brfe

Electrical
Apr 17, 2008
5
DE
I've created a MATLAB code that communicate via TCP/IP with another software and I need to get the message recieved by MATLAB to eventually change a state in Stateflow. The problem is that this message is composed of numbers and letters. I could already send a message composed only of numbers, send it to Simulink and further sending this value to Stateflow using the function

set_param('Crane_Test2/Gain','Gain',msg)

where the first Gain is the name of my Simulink block, the second one is the name of the value of this block and msg is my variable received by the TCP/IP connection.

So, my problem is to send a message composed of numbers and letter to Stateflow. I thought about setting a parameter of Stateflow with the same function that I used to set the Gain parameter. But I always get an error message telling that my chart block does not have a parameter called parameter.

Can you help me with this issue?

Thank you.
 
Replies continue below

Recommended for you

Already found the solution
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top