Jump to content

Domme

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Domme

  1. 18 hours ago, Fausto said:

    Hello @Domme.

    Please confirm that your target system is using a previous version (v7.8.2) of DT Open Layers library for the DT9857E.

     

    Disconnect your microphones and loop the analog output directly to the five analog input channels.  Please test and reply with screen capture(s) and comments.

    Regards,

    Fausto

     

    Hello Fausto,

    thanks for your answer. I am using DT Open Layers v7.8.2. Just to clarify: I have not used 5 microphones for that example diagram, but did 5 separate (identical) measurements on the same input channel to compare sample deviation from measurement to measurement. Looping back the output to input channel 1 for 5 executions of readwrite gives the following signals on the input channel:

    sync_problems2.thumb.png.4270c3aa75158b2aadc6233bc510f4ad.png

    As can be seen, the output signal starts before the input channel is ready, resulting in additional phase between input and output. Also, the output ends a few samples before it should:

    sync_problems2b.thumb.png.142f46977374cff3c57189fa56361103.png

    In summary, a part of the signal is missing. This could be "fixed" by adding silence to the beginning, looping back, subtracting the latency and so on, but it would be a kind of ugly workaround and I would need to sacrifice an input and an output channel. I hope that there is a better solution.

    Kind regards,
    Domme

  2. Hello,

    I have been using the DT9857E for a while now, mainly for multi-channel microphone input reading, but I just recognized that the input/output operations are not being performed synchronously while trying to measure impulse response. Instead, there is a little lag which differs from measurement to measurement. This makes correct measurements of phase impossible.

    I attached a script to show the problem. The figure below shows how the input is captured at different samples for 5 separate readwrite executions in an otherwise identical setup.

    sync-problems.thumb.png.a44f83182635c00a56fc75a3b0eef69d.png

     

    Is there a possibility to synchronize input and output channels using software-sided triggers? Or do I have to sacrifice an input and an output channel each for a loopback?

    Kind regards,
    Domme

    sync-problems.m

  3. On 3/21/2024 at 7:57 AM, jesusvaquerizo said:

    Hello, Fausto

    Yes, I'll explain you better. We are going to use our DT to pick up 3 microphone signals. Also, at the same time, we will use the DT to generate a sweepsine signal. That's why I was asking if there was an app or UI. There is one thing I don't understand, you tell me that ''The DT9847 is supported in MATLAB via MATLAB's Data Acquisition Toolbox and the Data Acquisition Support Package for Data Translation Hardware'', but you also tell me that ''Data Translation/MCC/Digilent devices are not supported in MATLAB's Analog Input Recorder toolbox app''. So, I guess it's all limited to the use of commands. If so, please, do you have a doc where I can see the commands needed to create the necessary routine for the setup I need?  

    Thanks,

    Jesús

    Hello @jesusvaquerizo,

    I am using the DT9837C and DT9857E in MATLAB, also for microphone input and sweep output. While the Analog Input Recorder toolbox app does not work with these interfaces, you can use it in MATLAB nonetheless but you will have to manually program your signal processing.

    I attached some very basic sample scripts that I just wrote last week to introduce a coworker to our interfaces. I bet you can easily adjust it for the DT9847 as well. Feel free to ask if you have any questions.

    Kind regards,
    Domme

    DTIO_Example.m DTIO_Setup.m

  4. Hello,

    I would like to generate sine waves in MATLAB and send them to an external amplifier via DT9837C. This is the code I am using:

    d = daq('dt');
    
    % Define Channels
    
    % Microphone
    in0 = addinput(d, "DT9837-C(00)", "0", "IEPE");
    in0.Range = [-1 1];
    in0.TerminalConfig='SingleEnded';
    in0.Coupling='AC';
    in0.ExcitationCurrentSource='Internal';
    in0.ExcitationCurrent = .002;
    
    % Distance sensor
    in1 = addinput(d, "DT9837-C(00)", "1", "Voltage");
    in1.Range = [-10 10];
    in1.TerminalConfig='SingleEnded';
    in1.Coupling='DC';
    
    % Output Feedback
    in2 = addinput(d, "DT9837-C(00)", "2", "Voltage");
    in2.Range = [-10 10];
    in2.TerminalConfig='SingleEnded';
    in2.Coupling='DC';
    
    % Output
    out = addoutput(d, "DT9837-C(00)", "0", "Voltage");
    
    % Measurement parameters
    duration = 2;
    samplerate = 96000;
    freq = 200;
    d.Rate = samplerate;
    
    
    
    % Generate output signal
    dt = 1/samplerate;        % s / Sample
    t = (0:dt:duration)';            % s
    outputdata = 1*sin(2*pi*freq*t);
    
    [data,time] = readwrite(d,outputdata,"OutputFormat","Matrix");

    The sine waves look fine if I check with 'plot(time, outputdata)'. However, the signal coming out of the DT9837A does not sound like a sine wave. If I feed the output channel signal back into input channel 2 and plot it using 'plot(time, data)'  it gives a diagram which looks like the pictures attached to this post. The frequency is correct, but the shape of the signal does not represent a sine wave at all. Instead, it is composed of asymmetrical small bursts of 48kHz (which is half of my sampling rate).

    read_data.png

    Zoomed in below

    read_data_zoomed.png

    If I use QuickDAQ with otherwise same setup, it generates a clean sine wave. But not in MATLAB. What am I doing wrong here?

    Kind regards,
    Domme

  5. Hello Fausto,

    I tried the following:

    • Copying the 'daqmlconverter.dll' from another MATLAB installation into the directory which is being referred to in the error message. I get the same error message.
    • Complete reinstall of MATLAB and all neccessary add-ons as described in your recent post. I now do have a genuine 'daqmlconverter.dll' in the directory, but I still get the same error message.
    • Running the script on the machine where I borrowed the DLL from did do the trick and lead me to another error. This could be fixed with some adjustments to internal addon .m files which you described here.

    Still baffled why it won't work on my machine. I really need to get it running on this machine as well.

    Kind regards,
    Domme

  6. 13 hours ago, Fausto said:

    In your MATLAB 'Add-On Manager', please verify the installed packages includes 'Data Acquisition Toolbox' and 'Data Acquisition Toolbox Support Package for Data Translation Hardware'.

    Which DT device are you using?

    Are you only using MATLAB R2021a on that system?

    Please verify that the 'daqmlconverter.dll' file is in the C:\Program Files\matlab2021a\toolbox\daq\daqsdk\bin\win64\' folder.

    Hello Fausto,

    thanks for your answer.

    • Both add-ons appear in the Add-On Manager (Version 4.3 and 1.1, respectively).
    • I am using a DT9837C right now. I also have a DT9857E but I think the missing DLL will be a problem there as well.
    • There is only one installation of MATLAB R2021a on this system.
    • The DLL is missing from that directory. Where can I get it from?

    Kind regards,
    Domme

  7. Following the instructions in the linked document "UMDAQAdaptor.pdf" I encountered a new problem: When trying to perform an output operation -as described on page 31- I receive the following error:

    Quote

     

    queueOutputData(s,outputSignal1);

    File not found:C:\Program Files\matlab2021a\toolbox\daq\daqsdk\bin\win64\daqmlconverter.dll

     

    Am I missing another package or does this have to do with the combination of my software versions? And how can I fix this? I don't want to download the missing DLL from a sketchy untrusty source. Even if I wanted to, I don't have admin rights on my workplace machine so I would need to ask our admin to copy it and he will most likely demand a DLL from a trusted source.

    Kind regards,
    Domme

  8. Hello,

    I have a DT9837C and a DT9857E and would like to interface these using MATLAB, Python or at least something that is not QuickDAQ. I tried to follow the documentation "Data Acquisition Toolbox -> Get started" but it only leads me to the following result:

    Quote

    >> daqvendorlist

    ans =

      1×4 table

         ID               FullName              AdaptorVersion      DriverVersion  
        ____    ____________________________    ______________    _________________

        "ni"    {'National Instruments(TM)'}    "4.3 (R2021a)"    "20.0.0 NI-DAQmx"

     

    >> d = daqlist("mcc")


    d =

      0×0 empty table

    I am using MATLAB R2021a with DAQ Toolbox 4.3. The DOT (DT9837C) is shown in the device manager as "DT9837a", driver version is 7.0.0.9. However, MATLAB seems to struggle finding it. What am I doing wrong?

    What other possibilities are there to interface the DT9837C/9857E?

    Kind regards,
    Domme

×
×
  • Create New...