Test and Measurement Forum

Bug in PS3000con.c driver

Post your C and C++ discussions here

Bug in PS3000con.c driver

Postby physicsfaith » Mon Aug 06, 2007 7:42 pm

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.
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Postby markB » Tue Aug 07, 2007 7:08 am

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

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

Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests