lharri73 / PySimlink

Compile, run, and interact with Simulink models natively in Python. https://lharri73.github.io/PySimlink/
GNU General Public License v3.0
15 stars 4 forks source link

Incomplete documentation on data i/o and states #22

Open djsmith1000 opened 1 month ago

djsmith1000 commented 1 month ago

I cannot figure out from the documentation how to supply signal data to root level inports and log data from root level outports prior to each step.

I also cannot tell how to save and restore model states.

Can you please provide documentation and/or an example on these critical features?

Thanks, Dan

lharri73 commented 1 month ago

This is not a supported feature. You can read the signal that drives the outport, but not the outport itself. You also cannot change inports, but you can change the signals that the inports drive by replacing the inport with a constant (see here).

iirc it would require variadic function calls and more dynamic code generation which was more of a pain than just changing the signal for my use case.

djsmith1000 commented 1 month ago

Thanks for your prompt response on these issues. Do you have any plans to expand the interface to a wider feature set?