Bug in PS3000con.c driver

Post your C and C++ discussions here
Post Reply
physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Bug in PS3000con.c driver

Post by physicsfaith »

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.

markB
Site Admin
Site Admin
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Post by markB »

Your are quite correct. I've modified the example program so it should be fixed in future releases
Regards

Mark

Post Reply