1323 views|6 replies

2625

Posts

6

Resources
The OP
 

Pyvisa Dingyang waveform generator simple control [Copy link]

import pyvisa,time
rm = pyvisa.ResourceManager()
# 打印资源名称
print(rm.list_resources())

WaveG=rm.open_resource('资源名称')
#打印资源信息
print(WaveG.query("*IDN?"))
#设置基本波形
WaveG.write("C1:BSWV WVTP,RAMP")
#等待1s
time.sleep(1)
#C1 输出波形
WaveG.write("C1:OUTP ON")

Need to download NI VISA controls in advance

Reference book:

https://www.siglent.com/products-document/sdg2000x/#navs

SDG General Programming Manual

This post is from Test/Measurement

Latest reply

I remember that Keysight's oscilloscope also comes with a 20M waveform generator, which can be set directly in it   Details Published on 2023-9-7 08:50
Personal signature

希望做一些大家觉得好用的东西!

 
 

2625

Posts

6

Resources
2
 
#导入数组的库
import array as arr

import time
#定义测试时间
Times=15
#定义数组
datas=arr.array("i",[])
#使用"a"写入会在 text.txt 后面补上
#使用"w"下次运行会覆盖上次数据
with open("text.txt", "a") as file:
    while Times>0:
        #睡觉1s
        time.sleep(1)
        #将Times 放在数组最后面
        datas.append(Times)
        #将数据转换为 str
        file.write(str(Times))
        #手动回车
        file.write(" Times  \n")
        #时间-1
        Times-=1
#打印数据
print(datas)





With a small piece of code, save the test content to txt

This post is from Test/Measurement
Personal signature

希望做一些大家觉得好用的东西!

 
 
 

2625

Posts

6

Resources
3
 

This post is from Test/Measurement
Personal signature

希望做一些大家觉得好用的东西!

 
 
 

6027

Posts

6

Resources
4
 

This thing still needs external control. There should be a control software inside so that I can just select it directly.

This post is from Test/Measurement

Comments

There is control software, but it is not so easy to use  Details Published on 2023-9-6 20:51
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 
 

2625

Posts

6

Resources
5
 
Qintianqintian0303 posted on 2023-9-6 16:12 This thing still needs external control. There should be a control software inside, so you can just select it directly

There is control software, but it is not so easy to use

This post is from Test/Measurement

Comments

I remember that Keysight's oscilloscope also comes with a 20M waveform generator, which can be set directly in it  Details Published on 2023-9-7 08:50
Personal signature

希望做一些大家觉得好用的东西!

 
 
 

6027

Posts

6

Resources
6
 
xutong posted on 2023-9-6 20:51 There is control software, but it is not so easy to use

I remember that Keysight's oscilloscope also comes with a 20M waveform generator, which can be set directly in it

This post is from Test/Measurement

Comments

Many have built-in waveform generators, and the significance of pyvisa is to automatically collect data  Details Published on 2023-9-7 09:43
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 
 

2625

Posts

6

Resources
7
 
Qintianqintian0303 posted on 2023-9-7 08:50 I remember that Keysight's oscilloscope also comes with a 20M waveform generator, which can be set directly in it

Many have built-in waveform generators, and the significance of pyvisa is to automatically collect data


This post is from Test/Measurement
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list