C

Asked • 05/25/19

C sfunction & RTLAB?

I wrote a C sfunction and used it as a simulink block.It was OK.the answer is OK with the error about 10^-14 (in matlab enviroment)... Now I want to connect to RT_LAB, to run my model real time. To execute a simulink model in RT_LAB, we have 3 steps: 1. compile the model. 2. load it. 3.execute the model. So if you have an invalid model U should have errors in 1st step (as I had before completing my model), my model compiles with no errors now, I load it, but when I execute it, the answers are not valid (there is no error but not a valid answer either). When RT_LAB compiles a model, it translates the model to C codes. I think maybe there is something wrong with this part, generating wrong C code. Is any one here who used RT_LAB? How can I find the problem?

1 Expert Answer

By:

Chad E. answered • 05/26/19

Tutor
4.8 (226)

Software Engineer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.