Jump to content
Fourth of July -- Digilent US offices closed ×

attila

Technical Forum Moderator
  • Posts

    6,662
  • Joined

  • Last visited

Posts posted by attila

  1. Hi @kang

    In Wavegen select Synchronized and check Run/Auto.

    image.png.ef1f0a37a6096560e32916b0daa4eb99.png

    The Wavegen trigger output is high while running. A trigger event is the edge of signal so the Scope will trigger only when Wavegen is started or restarted.

    With No Sync or Independent option the channels may drift from each other due to small difference in periods.
    With Sync option and finite Run time the channels are resynchronized periodically.

     

  2. Hi @A-M

    No. The adjustable DIO voltage 1.2-3.3V is the same for all IOs.
    If you are using these only as inputs, you can set it to 1.8V The ~0.8V logic threshold should be good for 1.8-3.3V signals.
    For outputs, depending on your requirements:
    - you could set it to 3.3V and use OD output for 1.8V signals with external pullup
    - or create resistive voltage divider for 1.8V
    - or use external level shifter/translator 

  3. Hi @Alejandro-Dev

    The "Digital_Spi_Dual.py" examples is the following: 
    dwf.FDwfDigitalSpiClockSet(hdwf, c_int(1))  # Clock = DIO-1, Digital Discovery DIO-25
    dwf.FDwfDigitalSpiDataSet(hdwf, c_int(0), c_int(2)) # 0 DQ0_MOSI_SISO = DIO-2, Digital Discovery DIO-26
    dwf.FDwfDigitalSpiDataSet(hdwf, c_int(1), c_int(3)) # 1 DQ1_MISO = DIO-3, Digital Discovery DIO-27

    WaveForms SDK Reference Manual.pdf :

    image.png.87f4f7728eb22d7515e9e87f93a8b4b2.png 
    image.png.f376c65407e23733ccb495b07e0a0708.png

     

  4. Hi @sintech

    Use workspaces instead of projects. The projects are just instrument snapshots.
    A workspace represent a session and the name of the current one is shown in the app title. This contains all the used instruments and device options as well.

    The next version will improve cursor precision (for high position/range rations) and initial place glitch (in case the window is resized during workspace/project loading).

    Changing of byte/word order is not supported, only bit endianness. 

    You can use delayed capture in normal (Repeated mode, like capture 1us a week after the trigger at 10ns precision) and in Record mode expressed in percentage.

    It is supported if you specify the WR signal as Clock for the Bus. The CS as Enable.
    You can add another Bus using the same data lines and different clock, like for RD...

    The next version will have "Add tab with visible data" button.
    This lets you cut chunks from a large capture. This data then can be processed, exported, saved....

    image.thumb.png.a8f9c3722aed8b7ba858a19f160c8415.png

  5. Hi @DurandA

    I don't notice any shutdown with latest WF version 3.16.3 or 3.16.31
    https://reference.digilentinc.com/reference/software/waveforms/start
    https://forum.digilentinc.com/topic/8908-waveforms-beta-download/

    image.thumb.png.7fa5df95701b1f53860e661f4d559677.png

     

    from ctypes import *
    import sys
    import time
    from dwfconstants import *
    
    if sys.platform.startswith("darwin"):
        dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf")
    else:
        dwf = cdll.LoadLibrary("dwf")
    
    hdwf = c_int()
    
    dwf.FDwfParamSet(DwfParamOnClose, c_int(0))
    
    for i in range(10):
        dwf.FDwfDeviceOpen(c_int(-1), byref(hdwf))
        if hdwf.value == 0:
            print("failed to open device")
            szerr = create_string_buffer(512)
            dwf.FDwfGetLastErrorMsg(szerr)
            print(str(szerr.value))
            quit()
    
        dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0))
        dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(1))
        dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(1.0+i/2))
        dwf.FDwfAnalogIOEnableSet(hdwf, c_int(1))
        dwf.FDwfAnalogIOConfigure(hdwf)
        dwf.FDwfDeviceClose(hdwf)

     

    image.thumb.png.bc08782d2d1040f71551f07c2bc10e96.png

    from ctypes import *
    import sys
    import time
    from dwfconstants import *
    
    if sys.platform.startswith("darwin"):
        dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf")
    else:
        dwf = cdll.LoadLibrary("dwf")
    
    
    cDev = c_int()
    dwf.FDwfEnum(0, byref(cDev))
    if cDev == 0:
        print("no device detected")
        quit()
    
    dwf.FDwfParamSet(DwfParamOnClose, c_int(0))
    
    hdwf = c_int()
    
    for i in range(10):
        dwf.FDwfDeviceOpen(c_int(0), byref(hdwf))
        if hdwf.value == 0:
            print("failed to open device")
            szerr = create_string_buffer(512)
            dwf.FDwfGetLastErrorMsg(szerr)
            print(str(szerr.value))
            quit()
    
        dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0))
        dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(1))
        dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(1.0+i/2))
        dwf.FDwfAnalogIOEnableSet(hdwf, c_int(1))
        dwf.FDwfAnalogIOConfigure(hdwf)
        dwf.FDwfDeviceClose(hdwf)

     

  6. Hi @DurandA

    Use the following in all apps and scripts using the device:

    ...
    dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # 0 = run, 1 = stop, 2 = shutdown
    dwf.FDwfDeviceOpen(...
    dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) # 0 = the device will be configured only when calling FDwf###Configure
    ...
    dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(0), c_double(True))
    dwf.FDwfAnalogIOChannelNodeSet(hdwf, c_int(0), c_int(1), c_double(1.20))
    dwf.FDwfAnalogIOEnableSet(hdwf, c_int(True))
    dwf.FDwfAnalogIOConfigure(hdwf)
    ...
    dwf.FDwfDeviceClose...

     

×
×
  • Create New...