MapleSim plots values with a good sample rate (for a sample rate ask of 0.002 second, the plot is well sample to 0.002 second in the MapleSim Gui), but C function is called each model fondamental step time (each 0.0004s). And in a step, the C function is called 3 times.
For example, if I make a simulation of 1 second with a model fondamental step time of 1ms, with a defined sample call to C function at 5 ms, with 10000 points to plot :
The model will make 1000 step for the simulation.
The model must make 200 calls to the C function
The MapleSim graphic result is well sampled to 5ms
the number of calls to C function is of 1000*3 = 3000
while I expect to have only 200 calls, or at worst 600 calls to the C function