| Products > Test Equipment |
| Rigol HDO1000 and HDO4000 12bit oscilloscopes launched in China |
| << < (250/258) > >> |
| Frunse:
Very Nice and thanks alot :) I will try it by sure. Robert Installed all. But already the first Command don't Work :( import pyvisa --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Cell In[4], line 1 ----> 1 import pyvisa ModuleNotFoundError: No module named 'pyvisa' Also tried this: import PyVISA Same Error: Not sure why I am Installed all on C: with the Default Values the Installation Rutine gave me.... Installed Python 3 than Anaconda and as last NI_VISA all on C: Jupiter starts and i open an Notebook session but it wont't work :( So not sure whats going on Also this way i Checked it: (base) C:\WINDOWS\system32>py -m pip install --upgrade pip setuptools wheel Requirement already satisfied: pip in c:\users\frunse\appdata\local\programs\python\python312\lib\site-packages (24.1.2) Requirement already satisfied: setuptools in c:\users\frunse\appdata\local\programs\python\python312\lib\site-packages (70.3.0) Requirement already satisfied: wheel in c:\users\frunse\appdata\local\programs\python\python312\lib\site-packages (0.43.0) (base) C:\WINDOWS\system32>py -m pip install PyVISA Requirement already satisfied: PyVISA in c:\users\frunse\appdata\local\programs\python\python312\lib\site-packages (1.14.1) Requirement already satisfied: typing-extensions in c:\users\frunse\appdata\local\programs\python\python312\lib\site-packages (from PyVISA) (4.12.2) (base) C:\WINDOWS\system32> May be something is wrong with the PATH Variable on Windows ??? Found Help need to instal pyvisa this way on Conda Shell: conda install -c conda-forge pyvisa Now it looks like this but something didn't work also no massages whats going on here??? See attached picture. Anaconda Shell tells that!!! [I 2024-07-11 13:32:00.389 ServerApp] Connecting to kernel d89653e5-2b7f-4a61-a3fc-ac3fdfc1d611. [I 2024-07-11 13:32:00.389 ServerApp] Restoring connection for d89653e5-2b7f-4a61-a3fc-ac3fdfc1d611:70119777-695e-4c42-bc23-ee2fd58194cb 0.00s - Debugger warning: It seems that frozen modules are being used, which may 0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off 0.00s - to python to disable frozen modules. 0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation. It seems realy slow here now i gott all Informations and it works like suggested! So Kommunication with Generator works also ;) generator=rm.open_resource('TCPIP0::192.168.0.103::INSTR') generator.read_termination = '\n' print(generator.query('*IDN?')) Got this: Siglent Technologies,SDG2122X,0123456789,2.01.01.38R4 If i am right i need to do this next: Commands for Generator to start an sweep between Start and Stop Frequencies with @ specified Voltage Commands for Scope to get the recordet Values from SCOPE ADC after DUT (Filter or anything like this) on specified Channel (Triggering ?) Commands to Plot an Graph from transfered Values. Easy ....LOL ....NOT Realy ;) Colected some Commands that works so far with my Generator as Example: Preparation for Sweeping Wave: generator.write('C1:SWWV STATE,ON') generator.write('C1:SWWV TIME,30S') generator.write('C1:SWWV STOP,20000HZ') generator.write('C1:SWWV START,20HZ') generator.write('C1:SWWV CARR,AMP,0.5V') generator.write('C1:SWWV CARR,OFST,0.1V') generator.write('C1:SWWV CARR,PHSE,20') generator.write('C1:SWWV STATE,OFF') Output Aktivation Settings: generator.write('C1:OUTP LOAD,50') generator.write('C1:OUTP ON') generator.write('C1:OUTP OFF') Bassis Wave Command: generator.write('C1:BSWV MAX_OUTPUT_AMP,2') More next days ;) Robert |
| zrq:
Noise of a hacked DHO1000 (actual bandwith conservatively estimated to be >500 MHz) with input terminated with 50Ohm. Note that in the one with 500 uV/div, the scope seems to apply a 250 MHz bandwidth limit which can not be disabled. And DSOX3034T at work for comparsion (forgot turning off 50 Ohm though). |
| vokars:
"More next days" ;) I have created a simple Bode Plot script blueprint. Is a starting point and can be modified for personal needs: # Script Initialization import pyvisa, time, math import numpy as np import matplotlib.animation as animation %matplotlib inline #%matplotlib notebook import matplotlib.pyplot as plt rm = pyvisa.ResourceManager() print(rm) fg=rm.open_resource(<Your function generator VISA string here>) fg.read_termination = '\n' # See programming manual for your function generator print(fg.query('*IDN?')) scope=rm.open_resource(<Your scope VISA string here>) scope.read_termination = '\n' print(scope.query('*IDN?')) # Bodeplot Scan Method # Only 1 channel. Final version should use a ref channel from the function generator without DUT and substract the log amp. # If you wanna see the progress live, use Python animation framework # For test run without DUT but just 1 channel function generator uncomment the function generator amp model creation # ********** Config *********** gl_points_per_decade = 2.0 gl_decade_start_log = 2 # Min 2, otherwise Autoset unstable gl_decade_stop_log = 7.2 y_axis_is_dB = False # choose between dB or vpp y axis scaling here # ***************************** lc_f_log = gl_decade_start_log f_log_list = [] dB_list = [] vpp_list = [] scope.timeout = 5000 fg.timeout = 5000 scope.write("*WAI;:MEASure:ITEM VPP,CHANnel1") scope.write("*WAI;:MEASure:STATistic:RESet") # Loop: Set function generator frequency and measure amp with scope while lc_f_log <= gl_decade_stop_log: lc_f_Hz = pow(10.0, lc_f_log) # function generator set frequency lc_str = "SOURce1:FREQuency " + str(lc_f_Hz) # for Tektronix AFG 3022B; exchange if other function generator fg.write(lc_str) # time.sleep(1.0) # Settlement Time for function generator fg.query("*OPC?") """ # Only Test # Function Generator emulates DUT, use comments for real DUT lc_amp = 5.0/lc_f_log # Model #lc_amp = 5.0 * (gl_decade_stop_log + 0.5 - lc_f_log) / (gl_decade_stop_log - gl_decade_start_log) lc_str = str(lc_amp) #print(str(round(lc_amp,2))) lc_str = "SOURce1:VOLTage:LEVel:IMMediate:AMPLitude " + lc_str fg.write(lc_str) #time.sleep(1.0) # Settlement Time for function generator fg.query("*OPC?") """ scope.write(":AUToset") # scope.query("*OPC?") # Not working: ToDo Rigol Firmware Update time.sleep(3.0) # Workaround that wastes time. Would be better to query if Autoset is ready. Change value if read errors occur # scope measure amp # ToDo: Average instead of current value for higher precision. In this case increase sleep for settlement lc_vpp = float( (scope.query(":MEASure:STATistic:ITEM? CURR,VPP,CHANnel1")).strip() ) # store log f if lc_vpp < 1E3: # check for read errors f_log_list.append(lc_f_log) vpp_list.append(lc_vpp) dB_list.append(20.0 * math.log10(lc_vpp)) print("*", end="") else: print("!", end="") lc_f_log += 1.0/gl_points_per_decade # Show result print() plt.title("Bode Plot", fontsize=14, pad=12) plt.xlabel("log(f) / log Hz") plt.grid() if y_axis_is_dB: plt.ylabel("dB Vpp") # With second Ref channel this becomes real frequency dependend attenuation plt.plot(f_log_list, dB_list) else: plt.ylabel("Vpp / V") plt.plot(f_log_list, vpp_list) plt.show() |
| skander36:
Congratulations for your work! With DHO1000XHD and SDG2000X the script work in the limits you mentioned. The command "%matplotlib inline" is not working on mine(SyntaxError: invalid syntax). Need to be commented for the script to run. I'm running the latest version of Python. |
| Frunse:
Hello and thanks, Yeah thats will help a lot!!! I got yesterday my DSLogic U3Pro32 so i was playing with it around. Big Problem is my Computer is on the other Side of my little room and the USB3 Connection is realy Short. An 5 Meter USB3 Kabel was not working (LA was only in USB 2 Mode recogmnised) so i need to rethink / Rework my little Lab LOL Also need to Settup all Ethernetconnection for my Measument devices for Remotecontrol ;) Neare all new Equipment has Ethernet LOL . Now i will check youre Script. Dude, that would took me half a year to get such a scrpit running i guess ;) But i never give up .....LOL My little Main Project right now (Picture attached) ;) Robert |
| Navigation |
| Message Index |
| Next page |
| Previous page |