S-function works in normal mode but doesn't in external mode
Show older comments
I'm trying to implement a simple s function builder ode solver for a rlc circuit, it is suposed to return the value of the capacitor voltage.
While it works fine in normal mode.

when deployed to TI TMS320F28379D the response remais at 0, it simply doesn't work. It builds and deploys fine.
.png)
Any help is aprecciated.
Answers (3)
Venkatesh Chilapur
on 26 Feb 2019
0 votes
Hi,
When deploying the model on target we configure it for Fixed step disctere solver as the controller runs in discrete amount of time. It also depends on the step time your model is configured to run. If the model is configured to run fast, then the external mode may not work.
HTH,
Venkatesh C
1 Comment
Arthur Nascimento
on 26 Feb 2019
Venkatesh Chilapur
on 27 Feb 2019
0 votes
Can you do a crtl+j and send the snap of Sample Time Legend that pop's up as below.

1 Comment
Arthur Nascimento
on 27 Feb 2019
Edited: Arthur Nascimento
on 27 Feb 2019
Venkatesh Chilapur
on 4 Mar 2019
0 votes
Hi,
Could run the model in external mode and could recieve only zero.
I have not debugged the S-Function, but I can recommend to start with simple model and see if that works.
I could see a sample time of 0.2sec in your attached model. You may try to run at this rate.
Regards,
Venkatesh C
1 Comment
Arthur Nascimento
on 11 Mar 2019
Categories
Find more on Texas Instruments C2000 Processors 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!
