Jump to content

attila

Technical Forum Moderator
  • Posts

    6,589
  • Joined

  • Last visited

About attila

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

15,180 profile views

attila's Achievements

  1. This seems to be USB cable contact issue, at least the same error is generated on disconnect. Do you see device re-connect event in the system when this error shows up ? Have you tried to use a different port, cable ? I've never seen problem related to this, but I'll try to rebuild the configuration with stricter communication constrains for the next software version.
  2. I also tried 2 DDs but I can't reproduce it. In 3.22.20 direct trigger on any DIO/DIN was added to the device configuration. If it was a timing issue, it should show up at higher frequencies, but it seems to work even overclocked to 125MHz. This frequency adjustment is useful if you want to generate or capture at high rate which is not derivable from 100MHz, like to generate 40, 48MHz... use 80MHz or 96Mhz or capture at 640MHz and not at 800, 400MHz...
  3. Hi @Mohamad Idris I don't know where did you find some of the functions used in you script, but these are not valid in WaveForms application. See the Help tab for more information:
  4. Hi @Maxpfeiff There are multiple issues in your script: - I don't know why are you setting output enable for DIO-1 but in comments mention DIO-0. The digital-io setting would override digital-out function for the driven channel. - you are reconfiguring the same digital-out DIO-0 twice - FDwfDigitalOutTriggerSourceSet has 2 arguments not 3 - FDwfDigitalOutConfigure has 2 arguments not 1 - I don't know what you want with FDwfDigitalOutRepeatTriggerSet - there is one digital-out instrument in the device, but you are including it in your channel loop like digital-out channels could be controlled separately - FDwfDeviceTriggerSet channel argument like all indices in the API are 0 based, there is not trigger #2 only #0 and #1 See the following example which configures all digital-out channels for each connected device to output 1kHz clock. DigitalOut_Devices.py The 'first' device outputs TriggerPC on Trigger2 (#1) and each device starts on T2. It also configures the 'first' device to output reference clock on T1 (#0) and others use this as reference clock input. This is supported by newer devices AD3, ADP223, ADP3X50 You can further use FDwfDigitalOutWaitSet and DwfParamFreqPhase to tune trigger and reference clock signal wire delays between devices. """ DWF Python Example Author: Digilent, Inc. Revision: 13/6/2024 Requires: """ from ctypes import * from dwfconstants import * import math import time import sys 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") version = create_string_buffer(16) dwf.FDwfGetVersion(version) print(f"DWF Version: {version.value}") dwf.FDwfParamSet(DwfParamOnClose, 0) # continue running after device close cDevice = c_int() dwf.FDwfEnum(0, byref(cDevice)) print(f"Found {cDevice.value} devices") print("Connect trigger lines between devices for reference clock and triggering") hdwf = c_int(0) hdwfMaster = c_int(0) dwf.FDwfParamSet(DwfParamExtFreq, 10000000) # reference clock frequency dwf.FDwfParamSet(DwfParamFrequency, 100000000) # system clock frequency # Open device for iDevice in range(cDevice.value): dwf.FDwfDeviceOpen(iDevice, byref(hdwf)) if hdwf.value == 0: continue dwf.FDwfDeviceAutoConfigureSet(hdwf, 0) # the instruments will only be configured when FDwf###Configure is called if hdwfMaster.value == 0: hdwfMaster.value = hdwf.value dwf.FDwfDeviceParamSet(hdwf, DwfParamClockMode, 1) # reference clock output on Trigger 1 dwf.FDwfDeviceTriggerSet(hdwf, 1, trigsrcPC) # Trigger 2 outputs TriggerPC else: dwf.FDwfDeviceParamSet(hdwf, DwfParamClockMode, 2) # reference clock input on Trigger 1 print(f"Configure Device {iDevice +1}") dwf.FDwfDigitalOutTriggerSourceSet(hdwf, trigsrcExternal2) hzSys = c_double() dwf.FDwfDigitalOutInternalClockInfo(hdwf, byref(hzSys)) cChannel = c_int() dwf.FDwfDigitalOutCount(hdwf, byref(cChannel)) for iChannel in range(cChannel.value): dwf.FDwfDigitalOutEnableSet(hdwf, iChannel, 1) # DIO-0 dwf.FDwfDigitalOutDividerSet(hdwf, iChannel, int(hzSys.value / 1e4 / 2)) # prescaler to 2kHz, SystemFrequency/1kHz/2 dwf.FDwfDigitalOutCounterSet(hdwf, iChannel, 1, 1) # 1 tick low, 1 tick high dwf.FDwfDigitalOutConfigure(hdwf, 1) print("Triggering to start generators...") dwf.FDwfDeviceTriggerPC(hdwfMaster) dwf.FDwfDeviceCloseAll() Captured 2 DIOs from 2 devices with a 3rd device:
  5. Hi @Ody101 I don't think it's that important. Turns on some FETs to discharge internal and user rails. Probably for the safety of later ones.
  6. Hi @ilkeryelbay As I was about to add access to it, I noticed that it was already implemented after an earlier request :)
  7. Hi @ilkeryelbay These averages are not available from script but can be calculated like this: Scope.run(); const cnt = 100; var sum = 0; for(var i = 0; i < cnt; i++){ Scope.wait(); sum += Scope.Math1.measure("Custom"); } Scope.stop(); print(sum/cnt);
  8. Hi @sijie Could it be caused by the different on/off resistance? Try a lower frequency.
  9. Hi @alexplcguy A. Use longer Run time in Pattern Generator which generates trigger for AD2s. B. Use trigger source: "Logic" instead "Logic Detector". The first one only fires when a Logic Analyzer capture is performed and not on every trigger event. Set higher Update rate, like 200ms, under top-right COG The Scope has HoldOff option but this, depending on trigger sequence, may not make the captures of multiple devices synchronized.
  10. Hi @Jonyy Set a Trigger IO to output 'Scope Detector'. Which is here hooked back to C2.
×
×
  • Create New...