×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Export MATLAB variable into Stateflow parameter

Export MATLAB variable into Stateflow parameter

Export MATLAB variable into Stateflow parameter

(OP)
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.

RE: Export MATLAB variable into Stateflow parameter

(OP)
Already found the solution

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources