Jump to content

attila

Technical Forum Moderator
  • Posts

    6,469
  • Joined

  • Last visited

Posts posted by attila

  1. Hi @CAM C

    The record mode uses data streaming. Since it doesn't know when the trigger will arrive it starts streaming immediately and stop after the given 'length'. This is why the samples collected in the software buffer need to be aligned at the end, see AnalogIn_Record_Trigger.py example. With position 0 the streaming starts with the trigger.
    The acqmode single returns a buffered aligned capture, up to maximum sample rate and device buffer size.

  2. Hi @fahiz @Fausto

    Why are you limited to 0.2 sec ? with 1.5M samples and 1.5MHz capture rate the span in 1sec
    If you are interested in peaks you can use min/max sampling mode (FDwfAnalogInChannelFilterSet), less samples and lower frequency.

    The sampling rate should be at least 4 times than signal frequency, otherwise you see aliasing.
    https://www.ni.com/docs/en-US/bundle/labwindows-cvi/page/advancedanalysisconcepts/aliasing.html

    image.png

    image.png

  3. Hi @AndayLe

    The above should work.
    Make sure the device opening succeeded, the function return is 0 and/or hdwf is not 0.
    What are you doing after starting the generator ? If your the program quits the device is closed and outputs are by default stopped. Use software wait or use: dwf.FDwfParamSet(DwfParamOnClose, c_int(0)) # continue running after close

  4. Hi @philip.mcconnell

    You can use the Script tool or View/Logging for this purpose.

    image.png

    Scope.single();
    Scope.wait();
    var ch1 = Scope.Channel1.fftmagnitude;
    var ref = Scope.Ref1.fftmagnitude;
    var hz = Scope.Ref1.fftfrequency;
    var c = ref.length;
    clear();
    for(var i = 0; i < c; i++){
        if(ch1[i] > ref[i]+2.0) print(hz[i],ch1[i],ref[i]);
    }

     

  5. Hi @jostikas

    The I2C master (with clock stretching) and slave mode is implemented using state machine, 'ROM logic' feature of Pattern Generator.
    Since both the clock and data lines are inputs for machine, these need to use the least significant bits, up to the log2 of Patterns device buffer size.
    The default configuration for AD3 allocates 2k samples for Patterns so DIO 0 to 10 can be used.
    With the 5th configuration 32k samples and DIO 0 to 15 can be used for I2C.

    The no clock stretching implementation is not recommended since it simply generates clock/data pattern, is is kept for backward compatibility, since this was the first implementation.

    image.png

  6. Hi @Ayesha Zaman

    Make sure the acquisition time / sample rate is not more than the device buffer size, 8192 for AD2, otherwise it will try to use record/data streaming which is limited to a few MHz for AD2.

    Time (s) - mso/1    Amplitude (V) - mso/1    
    0    3.97984m    
    10n    3.97984m    
    20n    3.97984m    
    30n    -10.8283m    
    40n    7.68187m    
    50n    -14.5303m    
    60n    3.97984m    

    image.png

×
×
  • Create New...