Jump to content

RajatDas

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by RajatDas

  1. Hi, I am saving a .csv file using this below command, Network.Export("/home/pi/"+(Network.Frequency.taken.toISOString().replace(':','.').replace(':','.'))+".csv","Channel2"); Using this command I am able save it. Next do I need to close this .csv file after the writing is complete or something similar to that ?
  2. Thank you @attila. So I am using below command Network.Export("/home/pi/"+(Network.Frequency.taken.toISOString().replace(':','.').replace(':','.'))+".csv","Channel2"); But the time stamp is not the system time (2023-09-26T08.23.44.395Z.csv)? How to change it to system time ?
  3. Hi, I want to save the Network Analyzer channel 2 data in different scan and filename should be current date-time. Network.Export("/home/pi/"+(Network.Time.taken.toISOString().replace(':','.').replace(':','.'))+".csv","Channel2"); Using this above command, but it is giving error, "TypeError: Result of expression 'Network.Time' [undefined] is not an object." Kindly help.
  4. Really thanks a lot @attila for your prompt support and help. Just on more question, I have a Java script file which simple set some parameters of the Network analyser and collect magnitude response data and save it to a CSV file. It does not do any further calculation. This javascript file is saved. So when I want to run this javascript file to collect the Network analyser data is it mandatory that Network GUI window needs to be opened for visualization? Or simple by running the javascript I can collect the data ?
  5. Hi I need to do multiple impedance scan and parameters will also be same. So do I need write the following codes in every scan ? dwf.FDwfAnalogImpedanceReset(hdwf) dwf.FDwfAnalogImpedanceModeSet(hdwf, c_int(0)) # 0 = W1-C1-DUT-C2-R-GND, 1 = W1-C1-R-C2-DUT-GND, 8 = AD IA adapter dwf.FDwfAnalogImpedanceReferenceSet(hdwf, c_double(reference)) # reference resistor value in Ohms dwf.FDwfAnalogImpedanceFrequencySet(hdwf, c_double(start)) # frequency in Hertz dwf.FDwfAnalogImpedanceAmplitudeSet(hdwf, c_double(amplitude)) # 1V amplitude = 2V peak2peak signal dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(1)) # start
  6. Ok. Thanks @attila. So when I am saving Java script project, it is generating a .dwf3script file. Is it possible somehow I can run this script from the Ubuntu terminal so that the script input parameters can be directly fetched by the GUI and the output is saved as csv or text file ?
  7. Ok, Thank you @attila. So if I want to run the same sweep multiply times, then the below section do I need to execute it in every scan iteration ? for i in range (noOfScan): dwf.FDwfAnalogImpedanceReset(hdwf) dwf.FDwfAnalogImpedanceModeSet(hdwf, c_int(0)) # 0 = W1-C1-DUT-C2-R-GND, 1 = W1-C1-R-C2-DUT-GND, 8 = AD IA adapter dwf.FDwfAnalogImpedanceReferenceSet(hdwf, c_double(reference)) # reference resistor value in Ohms dwf.FDwfAnalogImpedanceFrequencySet(hdwf, c_double(start)) # frequency in Hertz dwf.FDwfAnalogImpedanceAmplitudeSet(hdwf, c_double(amplitude)) # 1V amplitude = 2V peak2peak signal dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(1)) # start time.sleep(2) dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(0)) # stop dwf.FDwfDeviceClose(hdwf) end
  8. Hi @attila thank you, but what to do with the reference resistance value ? I dont's require that.
  9. clear() if(!('Network' in this)) throw "Open the Network Analyzer instrument"; var nScan = 10 var Mag = [] var Phase = [] Network.run() Network.Frequency.Start.value = 100000 Network.Frequency.Stop.value = 1000000 Network.Frequency.Samples.value = 500 Network.Wavegen.Amplitude.value = 1 Network.Wavegen.Channel.text = "WaveGen1" Network.Wavegen.Settle.value = 0.04 Network.Channel1.Range.values = 3 Network.Channel1.SampleMode.text = "Constant" for(var iScan = 0; iScan < nScan; iScan++){ print(iScan+1) if(!Network.wait()) throw "Stopped"; Mag = Network.Channel2.magnitude Phase = Network.Channel2.phase } Network.stop() Not able to control the source, Mode, Scale ? With respect to the GUI there is a checkbox called Magnitude, how to get control on that ? I want to check the "Relative to Ref" and Units in gain (X).
  10. Please guide me. Is these are the correct steps I need to do?
  11. Hi I have written the sudo code as well as the corresponding Java script, kindly guide me. ### FOR LOOP 100 times #To start Network Analyzer #Start Freqeucy = 100KHz #Stop Frequency = 1MHz #Steps = 1k #Source = Wavegen Ch1 #Voltage = 2V #Offset = 0V #Scale = Linear #Wavegen Settle value = 200ms #Reference Channel 1 (gain X) #Get Channel1 attenuation value #Get Channel2 attenuation value # Get Channel2 Magnitude responce in gain(x) # Get Channel2 phase response # save the data ### END #Stop Network Analyzer for (var i = 0; i < 1000 ; i ++){ Network.Frequency.Start.value=100e100 Network.Frequency.Samples.value=1k Network.Wavegen.Channel.text=1 Network.Wavegen.Amplitude.value=2 Network.Wavegen.Offset.value=2 Network.Wavegen.Settle.value=200 (in ms) Network.Channel1.Range.values = 1 Ch1Att = Network.Channel1.Attenuation.value Ch1Att = Network.Channel2.Attenuation.value Ch2Mag = Network.Channel2.magnitude Ch2Phase = Network.Channel2.phase }
  12. Thank you. In the Script section is there any example available for Network Analyzer ?
  13. Hi, Is there any java script commands/program to access the network analyzer of AD2, where I can sweep the frequency and save the Magnitude and phase response of the DUT ? This sweep should run in a continuous mode. I want to plot them and save them as a csv file. Kindly help.
  14. In AnalogNetwork_Analyzer.py SDK example, dwf.FDwfAnalogImpedanceReset(hdwf) dwf.FDwfAnalogImpedanceModeSet(hdwf, c_int(0)) # 0 = W1-C1-DUT-C2-R-GND, 1 = W1-C1-R-C2-DUT-GND, 8 = AD IA adapter dwf.FDwfAnalogImpedanceReferenceSet(hdwf, c_double(reference)) # reference resistor value in Ohms dwf.FDwfAnalogImpedanceFrequencySet(hdwf, c_double(start)) # frequency in Hertz dwf.FDwfAnalogImpedanceAmplitudeSet(hdwf, c_double(amplitude)) # 1V amplitude = 2V peak2peak signal dwf.FDwfAnalogImpedanceConfigure(hdwf, c_int(1)) # start It is in impedance analyzer mode, but I want it into network analyzer mode as shown in the below figure. Here Filter is our test device. Required your help .
  15. Need some help in python programming. The GUI setting I want implement it in python. Basically in network analyser mode I want to generate sweep sine wave using wavegen1 for circuit excitation and the same sweep signal I want to give it to channel 1 as input for reference. Next the circuit response output I want to give it to channel 2. Finally I want to capture the magnitude response of channel 2. Need some help.
  16. Thank you @attila. So via USB connection it is possible to acquire AD2 data (mainly I want to capture the magnitude response of a circuit in 1 MHz range) in RPi4 for further processing ?
  17. I have a Analog Discovery 2 and Raspberry pi 4. For connection and package installation I am following this link "https://digilent.com/reference/test-and-measurement/guides/getting-started-with-raspberry-pi". In Rpi-4 I have installed Adept and waveform software. Now I want to run Analog Discovery 2 in Network Analyzer mode from Rpi4 with these following specifications : 1. start frequency of 100 KHz 2. stop frequency at 1 MHz 3. no of point around 1 K. and few others. Is this kind of control or operation is possible from RPi4 using SDK python ? For Analog Discovery 2 and Raspberry pi 4 connection what kind of cable/wire I required ?
×
×
  • Create New...