siggeneration function

Post discussions on applications you are writing
Post Reply
royhersh
Newbie
Posts: 0
Joined: Tue Nov 13, 2018 5:40 pm

siggeneration function

Post by royhersh » Tue Nov 27, 2018 5:34 pm

Code: Select all

status["SetSigGenBuiltIn"] = ps.ps2000aSetSigGenBuiltIn(chandle, 0, 2000000, wavetype, 10000, 10000, 0, 1, sweepType, 0, 0, 0, triggertype, triggerSource, 1)
assert_pico_ok(status["SetSigGenBuiltIn"])

# Pauses the script to show signal
time.sleep(10)
hello all,
I am using picoscope from 2000a series. I am writing a pyton script that can produce a sound for limited time,
for this use i found this sweeping function which can sweep on frequency range, according to some variables.
The problem is that when it gets to the end of this range it will not stop by himself, it will remain on the last frequency until new order will come (close unit, new sweeprange). which will be after the sleeping will be completed.
I need a way to make it stop producing output. This feature is very important for me! is there any function that will silent the Picoscope's output?

thanks in advance,
roy.

Martyn
Site Admin
Site Admin
Posts: 3372
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: siggeneration function

Post by Martyn » Mon Dec 03, 2018 8:11 am

The simplest way to do this would be to set the signal generator to a DC signal with an offset of 0V
Martyn
Technical Support Manager

royhersh
Newbie
Posts: 0
Joined: Tue Nov 13, 2018 5:40 pm

Re: siggeneration function

Post by royhersh » Wed Dec 05, 2018 12:40 pm

thanks!
like this?

Code: Select all

dc_voltage = ctypes.c_int16(5) #PS2000_DC_VOLTAGE
        sweepType = ctypes.c_int32(0)
        triggertype = ctypes.c_int32(0)
        triggerSource = ctypes.c_int32(0)
        zero = 0.03
        status["SetSigGenBuiltIn"] = ps.ps2000aSetSigGenBuiltIn(chandle, 0, 2000000, dc_voltage, 
                        zero, zero, 0, 0.5, sweepType, 0, 0, 0, triggertype, triggerSource, 1)
        assert_pico_ok(status["SetSigGenBuiltIn"])

Post Reply