• 0

Python Script Not Reading Oscilloscope Channel 1 Voltage Correctly


I hope I am posting this in the correct place. I'm confused by the behavior of both my Analog Discovery 2 and Studio that I just purchased. When I use WaveForms and take a sample with the Oscilloscope 1 and 2 I get the correct readings (for both devices). 

When I use any of the Python Example codes that come with the software I get a voltage of 2.7V on channel 1 no matter what dc voltage I attach it to. I haven't tried providing waveforms yet. I am just trying to establish a baseline. Why is it when I use the Python Script I only ever get about 2.7V on channel 1. and channel 2 works just fine. 

This is the case for both my Discovery 2 and Studio. 

Note: when I remove the lead from the voltage supply it drops down to roughly zero volts. In other words, I know it is acknowledging that it is attached to a voltage, its just a matter of the voltage reading being incorrect when its read in from the python script. 

I've attached one of the python example codes. 


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @bhysjulien,

I apologize for the delay; I have moved your question to a more appropriate section of the Forum where the engineer more familiar with the WaveForms SDK material will be able to see and respond to your question, since I'm not sure what the issue might be since you already confirmed that just running the WaveForms GUI directly measures the expected results on the two oscilloscope channels.



Link to post
Share on other sites
  • 0

Hi @bhysjulien

Most probably the voltage is out of range on the selected 5Vpk2pk range.
Set it to 50V like this:
dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(0), c_double(50)) # channel 1
dwf.FDwfAnalogInChannelRangeSet(hdwf, c_int(1), c_double(50))  # channel 2

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now