How can I have a variable sample time for logging data in simulink?
I have a model in simulink which controls a real time application. I have a predefined testplan, which is basically a table, which is processed line by line with a stateflow chart. In some of the steps it is very important to log in very small time steps to see the details of how the application is coping with the input. For other steps in the testplan it is not very important to log this many steps, because I have to condition my test rig again or something similar. The “variable sample-rate” can be a multiple of the base sample rate for the model. Is there a way to log this data with different sample times for each of the lines? The testplan could look like in the picture below. For every line in the command there is the matching sample time. In my stateflow chart I use the the value in every single line to send something to my test rig. And in a feedback loop it will go to the next line in the testplan if the requirements are met. that the targetvalue is reached.