Bug in PS3000con.c driver

 
Post new topic   Reply to topic    Pico Technology Forum Index -> C and C++
Author Message
physicsfaith
Advanced User
Advanced User


Joined: 12 Jul 2007
Posts: 10
Location: Manhattan, KS

PostPosted: Mon Aug 06, 2007 7:42 pm    Post subject: Bug in PS3000con.c driver Reply with quote

There is an error in the PS3000con.c driver (as of 8/6/2007) in the function set_defaults. The last argument of ps3000_set_channel is set to unitOpened.lastRange. This is wrong and will cause the data to be collected with the range set to the maximum upper voltage range (probably 20 V) instead of what you have selected. Change this argument to:
unitOpened.channelSettings[PS3000_CHANNEL_A + i].range

This error really had me scratching my head until the found it. The symptoms were that the raw ADC counts were the same no matter what range I selected, but the mV conversion was wrong except at the 20V range.
Back to top
markB
Site Admin
Site Admin


Joined: 27 Mar 2007
Posts: 80
Location: Cambridgeshire,UK

PostPosted: Tue Aug 07, 2007 7:08 am    Post subject: Reply with quote

Your are quite correct. I've modified the example program so it should be fixed in future releases
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> C and C++
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group