I am having issues trying to run the 'openloop.m' Simulink example in rapid accelerator mode. (runs fine in normal mode).
Initially I received an error due to the use of the 'mexPutVariable' function within the s-function. I commented out the lines that use this function (lines 207-245 in FAST_SFunc.c) and set the variables that were being output within the Simulink model workspace. The Simulink model will now build/compile and run but it only completes for very short simulations. It gets stuck for longer simulations, for example, it will get 20 seconds into a simulation and then hang. No error messages are output. Everything works fine in normal mode.
Have you tested the s-function for use in Simulink's rapid accelerator mode/for code generation?
I am having issues trying to run the 'openloop.m' Simulink example in rapid accelerator mode. (runs fine in normal mode).
Initially I received an error due to the use of the 'mexPutVariable' function within the s-function. I commented out the lines that use this function (lines 207-245 in FAST_SFunc.c) and set the variables that were being output within the Simulink model workspace. The Simulink model will now build/compile and run but it only completes for very short simulations. It gets stuck for longer simulations, for example, it will get 20 seconds into a simulation and then hang. No error messages are output. Everything works fine in normal mode.
Have you tested the s-function for use in Simulink's rapid accelerator mode/for code generation?
Any help is much appreciated!
I am using MATLAB 2020b and Windows 10.