0

Setting cycle time and Simulink model step size in IQAN

Veeresh 2 months ago in IQANdesign updated 2 months ago 2

I'm trying to test a timer logic implemented in Simulink model which has step size 10ms, whereas IQAN cycle time is set as 5ms, but the output is not as expected. But this works exactly as expected when i set IQAN cycle time same as Simulink model step size.

What might be the issue? I tried changing Simulink block property 'synchronized' in IQAN but no success.

My further implementation would also be using Simulink top model with 2 reference models of different step size. So, IQAN cycle time = 5ms, Simulink model ref1 = 10ms and Simulink model ref2 =20ms. What should be the approach to ensure timing requirements?  Any help on this would be great.


Thank you in advance.

When running the Simulink model synchronized it will be executed with the IQAN application cycle time, regardless of what the model step size was. If the model step size and the IQAN application do not match, IQANdesign will give a warning


By setting synchronized = No, you run the model asynchronous. 

This could be useful if there is a model that takes a long time time to complete and may need multiple cycles to do so. The slow model should have lower priority for it to be interrupted by the faster model. 

For most cases I think that running synchronized with the same step size in the models is preferred, that is simple and predictable. A suggestion is to measure on the System Information Channel Simulink core utilization, to see if this approach is feasible with the cycle time you need for the main application. 

Thank you Gustav, will try!