Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Using python to get screen shot of frequency group/RF frequency sweep

Post Reply
rolfarley
Posts: 1
Joined: June 22nd, 2017, 11:52 am
Country: United States

Using python to get screen shot of frequency group/RF frequency sweep

Post by rolfarley » June 22nd, 2017, 11:57 am

Hi,

I would like to get a screenshot of a frequency sweep (with RF, Freq/span, ampl, bw set) using the frequency group
on the Tektronix MDO3054 scope - I have the below to get a screenshot for channels one and three in the Vertical group,
but haven't figured out how to turn 'ON' the frequency/RF. Any help, pointers would be much appreciated

Thanks,
Richard

import visa
import pylab as pl
import numpy as np

rm=visa.ResourceManager()
res=rm.list_resources()
print(res)
# Below is Tektronix oscilloscope
# USB0::1689::1032::C016707::0::INSTR
scope=rm.get_instrument('USB0::1689::1032::C016707::0::INSTR')
print scope.ask('*IDN?')
scope.write('*cls') # clear ESR

raw_input("""
ACTION:
Connect probe to oscilloscope Channel 1 and the probe compensation signal.

Press Enter to continue...
""")
scope.write('*rst') # reset
scope.write('SELECT:CH3 0') # -- turns off display for ch 3
scope.write('SELECT:CH3 1') # -- turns on display for ch 3
scope.write('SAVE:IMAG:FILEF PNG')
scope.write('HARDCOPY START')
raw_data = scope.read_raw()
fid = open('my_image.png', 'wb')
fid.write(raw_data)
fid.close()
print 'Done

Jeffrey M
Tektronix Applications
Tektronix Applications
Posts: 22
Joined: August 3rd, 2016, 10:21 am
Country: United States

Re: Using python to get screen shot of frequency group/RF frequency sweep

Post by Jeffrey M » June 23rd, 2017, 10:55 am

This isn't entirely clear in the programmer's manual, but the command that you're looking for is SELect:RF_NORMal 1. This will enable the RF trace, while an argument of 0 will disable it. Note that this enables the normal RF trace. If you want min, max, or min/max hold, you'll have to use a different SELect command.

Post Reply

Return to “Programming Support”

Who is online

Users browsing this forum: No registered users and 3 guests