Python can't send value to simulink constant block
Show older comments

This is my simulink. I want to send the value from my python to constant block of u1 and u2, then the x1 and x2 will send the output to my python. Please ignore u2, cuz still in testing phase.

this is part of my python code, the set control action is used to send the value to u1 and u2 in simulink. This is the issue where the simulink cant access to the value sent from python. The output dont have issue.

Here is the output, as shown above the output x1 is showing 1.0 which shows that the constant block is not deliver the input values from python.
SO is there anyway to solve this issue? anything i need to check or set in the simulink? or any website or code I can refer to? any help or recommendation will be appreaciate. Thank you very much.
Accepted Answer
More Answers (1)
Yeow Yu Leong
on 8 Jul 2024
0 votes
Categories
Find more on Call MATLAB from Python 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!