Confused about calculus time step
Posted: Sat Nov 07, 2009 6:27 am
I am using calculus time step to try to understand what load the processor is running at. What I have found is odd.
For a simulation time configured as 1E-5, I varied the sample time of an ADC block that was just converted to binary and the LSB used to drive a digital line (model attached). The outputs of the calculus time step block are T and PR1. My PIC is configured at 40MIPS. I was sampling Calculus Time Step at 100Hz and using the TX_Labview_Matlab block for serial output. My results were:
ADC sampling at 10Hz PR1=400 T=106
ADC sampling at 1000Hz PR1=400 T=104
ADC sampling at 100000Hz PR1=400 T=82
The PR1 of 400 makes sense (40M/100K=400), but I would have expected that at 100kHz the T would be MUCH MUCH greater than at 10Hz. What am I missing? Is my processor really running at 25% load at 10Hz ADC sampling and 20% load at 100,000Hz?
For a simulation time configured as 1E-5, I varied the sample time of an ADC block that was just converted to binary and the LSB used to drive a digital line (model attached). The outputs of the calculus time step block are T and PR1. My PIC is configured at 40MIPS. I was sampling Calculus Time Step at 100Hz and using the TX_Labview_Matlab block for serial output. My results were:
ADC sampling at 10Hz PR1=400 T=106
ADC sampling at 1000Hz PR1=400 T=104
ADC sampling at 100000Hz PR1=400 T=82
The PR1 of 400 makes sense (40M/100K=400), but I would have expected that at 100kHz the T would be MUCH MUCH greater than at 10Hz. What am I missing? Is my processor really running at 25% load at 10Hz ADC sampling and 20% load at 100,000Hz?