Hi Everyone,
I found this bug in Flowcode 7.3.0.6 during simulation.
I think the pictures say everything from the problem.
Best Regards,
Lagoda
Bug in the Data Recorder (SOLVED:Use the Data Recorder in ICT mode)
Moderator: Benj
Bug in the Data Recorder (SOLVED:Use the Data Recorder in ICT mode)
- Attachments
-
- counter_test.fcfx
- (7.61 KiB) Downloaded 229 times
-
- False Pulse Time.jpg (105.71 KiB) Viewed 4697 times
-
- Incorrect Time Diagram.jpg (138.56 KiB) Viewed 4697 times
Last edited by Lagoda on Mon Feb 26, 2018 6:04 pm, edited 1 time in total.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Bug in the Data Recorder
Hi Lagoda,
I just tried your program here, you have a delay of 1ms and the data recorder shows a delay of just over 3000us or 3ms. This is due to the way Windows does timings and the simulation will never be as reliable as the timings on the real world microcontroller.
The timing function of the data recorder is therefore much more reliable when used with Ghost ICT data rather than simulated data as the timings are much more accurate for ICT data as the pins are sampled on a regular and reliable interrupt tick.
Hi Keith,
PWM waveforms are not currently simulated and so won't appear on the data recorder in simulation. Is this the problem you are having?
I just tried your program here, you have a delay of 1ms and the data recorder shows a delay of just over 3000us or 3ms. This is due to the way Windows does timings and the simulation will never be as reliable as the timings on the real world microcontroller.
The timing function of the data recorder is therefore much more reliable when used with Ghost ICT data rather than simulated data as the timings are much more accurate for ICT data as the pins are sampled on a regular and reliable interrupt tick.
Hi Keith,
PWM waveforms are not currently simulated and so won't appear on the data recorder in simulation. Is this the problem you are having?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Bug in the Data Recorder
Hi Ben,
Thanks for the reply.
I'm sorry that the simulation does not provide a reliable result in this case.
For 100 us, 10us, and 1us delay, the pulse width measured on the RC0 pin is 0.53us according to the simulation.
Is this the same reason?
Best Regards,
Lagoda
Thanks for the reply.
I'm sorry that the simulation does not provide a reliable result in this case.
For 100 us, 10us, and 1us delay, the pulse width measured on the RC0 pin is 0.53us according to the simulation.
Is this the same reason?
Best Regards,
Lagoda
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Bug in the Data Recorder
Hi Lagoda,
Windows provides a 10ms tick time as the absolute minimum amount of timing if you allow the application to hand back to the OS for the delay. Windows is nothing like a real time operating system and this 10ms tick can often become hundreds of milliseconds, nothing is guaranteed.
We therefore use a guestimate to allow the simulation to drive itself timing wise based on the speed of your processor but this is made more difficult because modern CPUs throttle up and down during operation to save power. Combine this with threading complications and you have a right headache.
I don't really know all the ins and outs as my expertise lies in the microcontroller and circuit side of things but I do know we have tried several ways to provide a nice stable and responsive simulation. From what you're saying it looks like microsecond delays may simply not simulate or provides a fixed number of no operations.
Out of interest can you provide some specs on your computer, OS, CPU, etc.
Windows provides a 10ms tick time as the absolute minimum amount of timing if you allow the application to hand back to the OS for the delay. Windows is nothing like a real time operating system and this 10ms tick can often become hundreds of milliseconds, nothing is guaranteed.
We therefore use a guestimate to allow the simulation to drive itself timing wise based on the speed of your processor but this is made more difficult because modern CPUs throttle up and down during operation to save power. Combine this with threading complications and you have a right headache.
I don't really know all the ins and outs as my expertise lies in the microcontroller and circuit side of things but I do know we have tried several ways to provide a nice stable and responsive simulation. From what you're saying it looks like microsecond delays may simply not simulate or provides a fixed number of no operations.
Out of interest can you provide some specs on your computer, OS, CPU, etc.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel