06-21-2011 02:37 PM
Hello,
I am trying to slow the rate that my simulink model (dll) runs in Veristand. The model was compiled at a sampling rate of 100 Hz and I've been able to slow the speed of the model running in Veristand by reducing the Primary Control Loop rate, although it won't let me reduce it any lower than 10 Hz. My goal is to run the model 100x slower than real-time. Is this possible? If so, how would I do this?
Thank You
Solved! Go to Solution.
06-21-2011 05:19 PM
Hello GriffE,
A rule of thumb regarding simulation models in VeriStand 2009 and 2010 is to run the PCL as slow as possible. With respect to models only, this is the slowest rate evenly divisible by all model rates. (Other parts of the system might require the PCL to run faster.)
For example, say Model A was compiled at 25 Hz, Model B at 75 Hz and Model C at 100 Hz. The lowest rate evenly divisible by all models is 300Hz, so that's what you run the PCL at. The next step, and possibly the answer to your question, is to set the "Decimation" integer for each model in System Explorer. In System Explorer, decimation is always with respect to the PCL. Decimation 1 means 'at the PCL rate'. Decimation 2 means 'every other iteration of the PCL' or 'half the PCL rate'. So decimation for Model A = 12, Model B = 4 and Model C = 3.
The reason for the rule of thumb is that in VeriStand 2009 and 2010, decimated models are required to execute one time step within one iteration of the PCL to be "on time". In the case above, models A, B, and C each have 3.3ms to execute one time step in parallel mode, otherwise they're late.
Steve K