Test and Measurement Forum

Picoscope AC Coupling error with SDK & Python (+Attachment)

Post general discussions on using our drivers to write your own software here

Picoscope AC Coupling error with SDK & Python (+Attachment)

Postby andreas.schuster » Thu Mar 15, 2018 6:24 am

Hello

I am using latest Picosdk from
https://github.com/picotech/picosdk-pyt ... er/picosdk

Picoscope : 5444B
Connect following ports on Picoscope directly:
AWG:GEN <---> Osci CH:A
AWG is generating a sine wave with pk2pk of 200mV, with a offset of 1V

Goal: Measure this signal AC-Coupled

The first shot of the measured signal is not perfectly AC Coupled - but also not perfectly DC Coupled. Looks like some transitional state of the signal.
Attachments
myblock1.zip
(1.36 KiB) Downloaded 83 times
andreas.schuster
Newbie
 
Posts: 0
Joined: Thu Mar 15, 2018 6:15 am

Re: Picoscope AC Coupling error with SDK & Python (+Attachme

Postby Martyn » Thu Mar 15, 2018 7:41 am

That would be the expected behaviour as you will have just switched in the DC blocking capacitor, and this will take a short time to charge up to provide the full block at the desired level. The same effect will be seen if you change the DC component during a capture.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 3217
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope AC Coupling error with SDK & Python (+Attachme

Postby andreas.schuster » Mon Mar 19, 2018 10:25 am

Hello Martyn

I understand the need for switching the DC blocking capacitor and the settling time required therefore.

But in my example code there is following sequence [myblock2.py]:
  • 1. set_simple_trigger -> disabling trigger
  • 2. set_channel -> setting coupling to AC
  • 3. delay of 1 second
  • 4. collect_segment (is calling run_block internally)


For the sequence above i would expect that this switching from DC to AC coupling procedure takes place directly at point 2 (set_channel) giving the DC blocking capacitor time to settle, but the current state looks like if the coupling is switched at point 4 (collect_segment / run_block) which is in my opinion too late.

Note: a delay of 10 seconds does not change anything
Attachments
myblock2.zip
Python example using SDK
(1.38 KiB) Downloaded 75 times
andreas.schuster
Newbie
 
Posts: 0
Joined: Thu Mar 15, 2018 6:15 am

Re: Picoscope AC Coupling error with SDK & Python (+Attachme

Postby Martyn » Mon Mar 19, 2018 1:42 pm

The settings will only be written to the device when the RunBlock command is issued, which is why 1 second and 10 second delays show the same response.

The simple work around would be to apply the settings, do a dummy collection, then run the actual collection.
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 3217
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests