-
Posts
6,662 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by attila
-
-
-
-
Hi @Steve_3
In v3 one analog-out run is performed for each analog-in capture. Having FDwfAnalogOutRepeatTriggerSet-1 each analog-out run will wait for trigger (analog-out capture).
After each analog-in reading by the software (FDwfAnalogInStatus) a new capture is started which also initiates a new analog-out run.
This is why the analog-out repeat is set to infinite (FDwfAnalogOutRepeatSet-0).
Adding wait to analog-out would delay the signal relative to the analog-in start, shift the signal to the right in the capture.
To shift it left (or right), to start the analog-out before (or after) the capture left-most sample use a positive (or negative) secDelay parameter. -
-
-
-
Hi @jaejoo14
Contact the support for replacement.
The relay on oscilloscope channel 1 is stuck on high range, so the reading is probably correct only with 1V/div and higher.
Toggling the relay a few times, like changing between 500mV/div and 1V/div, should have removed temporary stuck, contact issue, oxidation.You could try the following to make sure all application settings are reset, but don't expect to help.
/Applications/WaveForms.app/Contents/MacOS/WaveForms -safe-mode(For nicer app interface you could use Settings/ Options/ Style : Fusion)
-
Hi @jaejoo14
2 hours ago, attila said:2. The input range relay may be stuck or remain in bad position due to certain software settings.
Try toggling Channel 1 Range between 500 mV/div and 1V/div
Does it solve the problem ? Can you hear it clicking like it is for Channel 2 ?For warranty and replacement contact the support.digilent @ ni.com specifying the Date of Purchase, Seller and Purchase Order/ Web order Number.
-
Hi @jaejoo14
1. Make sure the attenuation is set to 1 X
2. The input range relay may be stuck or remain in bad position due to certain software settings.
Try toggling Channel 1 Range between 500 mV/div and 1V/div
Does it solve the problem ? Can you hear it clicking like it is for Channel 2 ?
3. If you have calibrated the device (WaveForms/Settings/Device Manager/Calibrate), make sure the Scope 1 Gains are low values, or select Reset/Load Factory. -
Hello,
In AD3 the system frequency (ADC, DAC, DIO) is adjustable between 50-125MHz, so the sample rate can be set up to 8ns.
The oscilloscope device buffer can up to 64k samples.
The capture rate is limited by USB latency and can be up to about 2000 captures / second, when capturing up to 256 samples. -
Hi @Loic VINET
Could you attach or send me the script ?
-
-
Hi @dmangione
A device can be controlled by one application/script at a time.
If you want to control it from script/custom app, make sure to close the WaveForms app or connect with it to a Demo device. -
-
Hi @ryangill
No, currently we have no T&M device with LVDS.
You can find devices with LVDS IOs among the development boards, like Zmod connectors on Eclypse Z7, USB104 A7:
https://digilent.com/reference/programmable-logic/eclypse-z7/start
https://digilent.com/reference/programmable-logic/usb104a7/start -
You can use the analog-in trigger position:
dwf.FDwfAnalogInTriggerPositionSet(hdwf, c_double(acqTime / 2 + sec_delay)) -
Hi @Kuz
Internally in the application for each channel a persistence 2d array is computed, from this rgb images generated and drawn/overlaid in the Persistence view.
Exporting the image is not suitable for you ? -
Hi @Steve_3
The SamplingDelay is only for external sampling clock, when using a trigger input edge to validate sampling.
You can use the AWG/AnalogOut Wait to delay the signal output relative to the trigger. -
Hi @Alessandro
Are you using the latest sw version ?
Do you see the same behavior with WaveForms application ? It is easier to use the app for troubleshooting, modify settings and see the result. -
Hi @Steve_3
It comes to mind now, to have consistent capture phases trigger the AWG on Scope.
dwf.FDwfAnalogOutTriggerSourceSet(hdwf, c_int(ChNum), trigsrcAnalogIn)
dwf.FDwfAnalogOutConfigure(hdwf, c_int(0), c_int(1))
dwf.FDwfAnalogInConfigure(hdwf, c_int(1), c_int(1))You can also set:
AnalogOutRepeatSet 0 infinite
AnalogOutRepeatTriggerSet 1
This way, new generator outputs are automatically performed by the device for each capture. There is no need to reconfigure the Scope or AWG in the loop, just read the captures:
def trigger_and_read_ch0(rgdSamples,numSamp):
while True:
dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts))
if sts.value == DwfStateDone.value:
break
dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples, numSamp) # get channel 1 data
y = 0
return y -
Hi @Steve_3
The fundamental problem is that the sampling is not synchronized.
The Scope with decimate sampling for 1MHz stores every 100th ADC conversion, but this sampling is not synchronized with the AWG output, so consequent captures can have 100 phases. This Scope sampling start can not be synchronized with any trigger source. The only option would be using 100MHz sampling, but the AD2 is limited up to 16ki samples with the 2nd device configuration. -
Hi @Alessandro
See the following:
from ctypes import * from dwfconstants import * import math import time import matplotlib.pyplot as plt import sys import numpy if sys.platform.startswith("win"): dwf = cdll.dwf elif sys.platform.startswith("darwin"): dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf") else: dwf = cdll.LoadLibrary("libdwf.so") #declare ctype variables hdwf = c_int() version = create_string_buffer(16) dwf.FDwfGetVersion(version) print("DWF Version: "+str(version.value)) dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # 0 = run, 1 = stop, 2 = shutdown #open device print("Opening first device") dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf)) if hdwf.value == hdwfNone.value: szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(szerr.value) print("failed to open device") quit() dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) # 0 = the device will only be configured when FDwf###Configure is called sts = c_byte() sampling_frequency = 10000 #500000 hzAcq = c_double(sampling_frequency) nSamples = 300 rgdSamples1 = (c_double * nSamples)() rgdSamples2 = (c_double * nSamples)() rgwDigital = (c_uint16 * nSamples)() cAvailable = c_int() cLost = c_int() cCorrupted = c_int() fLost = 0 fCorrupted = 0 sampling_time = 1 / sampling_frequency ############ set up acquisition ################ dwf.FDwfAnalogInChannelEnableSet(hdwf, c_int(0),c_int(1)) # the acquired channel is the scope 1+,1- dwf.FDwfAnalogInFrequencySet(hdwf, hzAcq) dwf.FDwfAnalogInBufferSizeSet(hdwf, c_int(nSamples)) dwf.FDwfAnalogInTriggerPositionSet(hdwf, c_double(0.5*nSamples/hzAcq.value)) ############ set up trigger ###################### dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcExternal1) # trigsrcDetectorAnalogIn ################# ACQUISITION ######################### sts = c_byte(0) rgdSamples1 = (c_double * nSamples)(0) rgdSamples2 = (c_double * nSamples)(0) rgwDigital = (c_uint16 * nSamples)(0) print("Starting oscilloscope") # dwf.FDwfAnalogInConfigure(hdwf, c_int(0), c_int(1)) dwf.FDwfAnalogInConfigure(hdwf, c_int(True), c_int(True)) iSample = 0 while True: if dwf.FDwfAnalogInStatus(hdwf, c_int(1), byref(sts)) != 1: szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print("Error:") print(szerr.value) quit() if sts.value == DwfStateDone.value : break time.sleep(0.1) dwf.FDwfAnalogInStatusData(hdwf, 0, rgdSamples1, nSamples) # get channel 1 data dwf.FDwfAnalogInStatusData(hdwf, 1, rgdSamples2, nSamples) # get channel 2 data print("Acquisition done") if fLost: print("Samples were lost! Reduce frequency") if fCorrupted: print("Samples could be corrupted! Reduce frequency") rgdSamples1 = numpy.array(rgdSamples1, dtype=float) rgdSamples2 = numpy.array(rgdSamples2, dtype=float) plt.plot(numpy.fromiter(rgdSamples1, dtype = numpy.float)) plt.plot(numpy.fromiter(rgdSamples2, dtype = numpy.float)) plt.show()
-
Hi @Steve_3
You are generating 4.33MHz sine and capturing it with 1MHz, so you are only capturing an alias of the output. Is this what you want ?
-
Hi @Steve_3
Are you using low voltages and setting the input range to low, 5Vpk2pk ?
FDwfAnalogInChannelRangeSetYou could send me or attach the script.
Adjust Digital IO system frequency in Python API
in Test and Measurement
Posted
Hi @Steve_3
Here two periods are generated for each capture: test_undersampling_v4.py
Analog-in: trigger-wait-run-wait-run-done
I set the wait to 2ms to fit in the 8ms capture, but you can adjust the analog-in trigger position (secDelay) as you need it.