View Single Post
  #513  
Old 16-01-2017, 02:28 AM
luka's Avatar
luka
Unregistered User

luka is online now
 
Join Date: Apr 2007
Location: Perth, Australia
Posts: 1,136
Rowland, thanks for the tip. Any ideas are greatly appreciated as we seem to be stuck. Mosfet switching is not likely to be the cause as, at the moment, I am not using any cooling and mosfet is off.

Gilles, I rewrote the ftdi_read_data function to use timeouts instead of a fixed number of loops. Check out my pull request on github.
I have set the timeout to 3 seconds as normal image reading should take about 2 seconds. Anything much over 2 seconds is bad and indicates problems.

Note how no data arrives for about first 1000ms and then we usually get all of it. The image may still contain lines indicating data corruption but no data loss. But if data is missing (blocks in image) we will get timeout.

Also I read somewhere that latency of 1 should not be used as it can lead to data loss. I changed the default values to 2 but it did not make any difference.

Then, what is 1 second delay (usleep ( 1000*1000 )) in readframe() doing (line 349)? I could not see any difference when I removed it. It is quite a long delay.

I tried 2x2 binning and it took lots of attempts but I got one line (on PC). So the problem is still there but less data to transfer means less chance for the problem to show itself.
When doing binning I noticed message
grabimage width=3000 height=1000 BPP=16
If we are doing 2x2 binning, why is the width still 3000?


Anyway, the problem is evident on Windows and Linux. Linux may be caused by drivers or our bugs and is worse but Windows... don't know. I noticed the same as Pat on Windows, longer reading time when there are lines or blocks. It seems to be machine dependent. I have one old laptop which has lines in 50% of the images (on Windows). Good for testing :-)

I am more convinced that there is either a bug in the FTDI drivers or in the Cam86 software/firmware. I mean at least under Windows the cam should work properly. I may need to join the Ukrainian forums and ask the guys there. It is weird how nobody there complained about the lines but we all are...

Filip, did you see any image corruption on your Cam86?
Reply With Quote