Jump to content

Fausto

MCC Staff
  • Posts

    1,410
  • Joined

  • Last visited

Posts posted by Fausto

  1. Hello @Ludger Breil.

    What is your buffer size?

    Is it (2AIN + 1DIN) * 640,000 samples/sec = 1,920,000 samples/sec?

    Is the data processed on a different thread during the acquisition?

    Is the acquisition running continuously 24*365 or does the acquisition stop and restart periodically during each day?  If the acquisition stops periodically during the day, is restarting the application an option?

    It is not possible to determine the root cause of your issue, since the error is sporadic.  Based on the error message, the buffers are not cleared fast enough before the new data comes in, hence the overrun.  Try increasing the number of buffers to 10.

     

    Regards,

    Fausto

  2. Hello @GSAS - Karthick.

    All analog input channels of the four DT9857E devices can be synchronized using the Sync Bus. Note that the RJ45 cables connecting the Sync Bus on each device must be less than 1 foot in length.  Therefore, all four devices should be at the middle point between compartments.

    All cable lengths between all four DT9857E devices to their connected sensors should be the same length.

    All channels will acquire data simultaneously at the set sampling rate.

    What is the application's sampling rate requirement?

    Given the number of analog input channels and high sampling rate capability, a new robust Windows system (i.e. latest processor, high RAM, minimum background processes running, USB 3.x) and a custom application developed with the Open Layers API is recommended.  The maximum achievable sampling rate is dependent on the ability of the host system to process the data.

    What are the sensors to be used?  Please provide their datasheets.

     

    Regards,

    Fausto

  3. Hello @Ludger Breil.

    Are you using the same PC model and configuration for all installations or are the problematic systems using a different PC configuration?  

    Is the error predictable or sporadic?

    Are there background processes, i.e. virus scan, running during the acquisition?

    Are Windows hibernation/sleep options enabled?

    How many input channels are used?

    What is the sampling rate?

    Try adding more buffers and/or increasing the buffer size.

     

    Regards,

    Fausto

  4. Hello @Christian Pichler.

    Please confirm the wiring connections of all four DT9857E modules.  The image below is from page 110.  Only devices 1 and 4 have the termination option enabled in the Open Layers Control Panel applet.

    image.png

     

    Not setting the sync bus termination will not damage the modules.

    Please reply with screen captures from the Control Panel and QuickDAQ settings.

     

    Regards,

    Fausto

  5. @bsee,

    You have an existing application with the DT9812-10V, which is still available.  How is the DT9812 used in the existing application, i.e. number of channels, sampling rate, subsystems?  This information is necessary to match to an equivalent MCC device.

    Note that moving over to a MCC device will require rewriting your application with the MCC Universal Library.  

  6. Hello @bsee.

    The DT9812-10V (Digilent SKU: 6069-410-131) is still available for purchase. 

    The MCC Universal Library for Windows software does not support Data Translation (DT) devices.

    DT devices use DT-Open Layers library (OMNI Software).  The DT9812-10V supports event counting, as do various MCC devices if the decision is to migrate over to other devices and API library.

    Which DT API was used to develop the application, DataAcq SDK or DT-Open Layers for .NET?

     

    Regards,

    Fausto

  7. Hello @metalhouse.

    The USB-2416-4AO can sink up to 150 mA max (per eight channel DIO bank) and supports a voltage level of +15 V.

    Take a look at the following solid-state relay (SSR).

    https://www.phoenixcontact.com/en-us/products/solid-state-relay-module-emg-17-ov-ttl-24dc2-2943259?type=pdf 

    https://www.phoenixcontact.com/en-us/products/solid-state-relay-module-emg-17-ov-ttl-24dc2-2943259

    The +5 output terminal 35 can source 10 mA max. for the SSR.

     

    Regards,

    Fausto

  8. Hello @Przemek.

    Please investigate what changes were made recently to your application, i.e. OS update/upgrade, new host PC, updated DT software, IT changes to PC.

    What type of environment is the DT9805 module in during operation, to suspect a broken connection?

    Please test the DT9805 with Data Translation's QuickDAQ application on that system.  Any issues?

    Please test the DT9805 with a different PC and Data Translation's QuickDAQ application.  Any issues?

    If you have a backup DT9805 module, please swap the modules and retest.

    Please swap out the USB cable and retest.

    If you use a USB hub, retest with an externally powered USB hub or connect the DT9805 directly to the target system.

     

    Regards,

    Fausto

  9. Hello @msmith.

    The MCC USB-3101FS has a low output impedance of 0.1 Ohms and an output update rate up to 100 kS/s per channel.

    The MCC PCIe-DAS1602/16 has an input impedance of 10 MOhms and an aggregate sampling input rate of 100 kS/s, since the analog inputs are multiplexed to the ADC.

    What is the output rate and output range of the signals from the MCC USB-3101FS channels?

    Configure the analog input channels on the MCC PCIe-DAS1602/16 board for differential mode.

    What is the input range of the analog input channels on the MCC PCIe-DAS1602/16 board?  Choose a narrow range.

    Regards,

    Fausto

  10. Posted for @fahiz.

    I am currently developing a custom GUI with Qt, which includes an oscilloscope. I'm utilizing the ADP 3450. My task involves plotting waves with a frequency of 1 million Hz and an amplitude of 1 Vpp. Additionally, it operates in burst mode with a trigger interval of 1 second. Currently, I'm employing FDwfAnalogInAcquisitionMode as scanmodeshift.

    I'm encountering below issues:

    The time range is very limited (currently at 0.2 seconds), which prevents me from observing more than one wave bunch. Ideally, I would like to visualize multiple pulses over a couple of seconds.

    Another issue lies in the plot amplitude, which doesn't reach 0.5 V and -0.5 V. but, increasing the frequency allows it to touch the peaks.

    Could you advise on how to address these issues and suggest the correct method for plotting in such cases?
    I am adding one screenshot also with this.

     

    image.png

     

    I am using the SDK (C++) provided by Waveform, and the Qt version is 5.15.3. I am generating and plotting with the same device (ADP 3450). I also attempted generating from another source. I am providing the header file and source file of the basic Qt code (I am using QCustomPlot for plotting).

    Header (mainwindow.h):

     

    #ifndef MAINWINDOW_H
    #define MAINWINDOW_H
    
    #include <QMainWindow>
    #include "qcustomplot.h"
    #include <digilent/waveforms/dwf.h>
    #include <unistd.h>
    
    namespace Ui {
        class MainWindow;
    }
    
    class MainWindow : public QMainWindow {
        Q_OBJECT
    
    public:
        explicit MainWindow(QWidget *parent = nullptr);
        ~MainWindow();
    
        void setupRealtimeDataDemo(QCustomPlot *customPlot);
    
    private slots:
        void realtimeDataSlot();
    
    private:
        Ui::MainWindow *ui;
        QTimer dataTimer;
        HDWF hdwf;
        STS sts;
        double hzAcq = 1500000;
        const int nSamples = 2000000;
        QVector<double> rgdSamples;
        int cValid;
        char szError[512];
        double sinAmplitude;
        double sinFrequency;
        double wf_run_time;
        double wf_wait;
    };
    
    #define Wait(ts) usleep((int)(1000000*ts))
    
    #endif // MAINWINDOW_H

     

    Source code (mainwindow.cpp):

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include <fstream>
    
    MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
        ui->setupUi(this);
        setGeometry(400, 250, 542, 390);
        setupRealtimeDataDemo(ui->customPlot);
        connect(&dataTimer, SIGNAL(timeout()), this, SLOT(realtimeDataSlot()));
        dataTimer.start(100); // Adjust the interval based on your preference
    }
    
    void MainWindow::setupRealtimeDataDemo(QCustomPlot *customPlot) {
        rgdSamples.resize(nSamples);
    
        if (!FDwfDeviceOpen(-1, &hdwf)) {
            FDwfGetLastErrorMsg(szError);
            return;
        }
    
        FDwfDeviceAutoConfigureSet(hdwf, 0);
    
        // Setup sine wave generation parameters
        sinAmplitude = 1.0;
        sinFrequency = 1000000.0;
        wf_run_time = 0.2;
        wf_wait = 0.8;
    
        // Configure Digilent Analog Out for sine wave generation
        FDwfAnalogOutNodeEnableSet(hdwf, 0, 0, 1);
        FDwfAnalogOutNodeFunctionSet(hdwf, 0, 0, 1); // Sine function
        FDwfAnalogOutNodeFrequencySet(hdwf, 0, 0, sinFrequency);
        FDwfAnalogOutNodeAmplitudeSet(hdwf, 0, 0, sinAmplitude);
        FDwfAnalogOutRunSet(hdwf, 0, wf_run_time);
        FDwfAnalogOutWaitSet(hdwf, 0, wf_wait);
        FDwfAnalogOutRepeatSet(hdwf, 0, 0);
        FDwfAnalogOutConfigure(hdwf, 0, 1);
    
        // Configure Digilent Analog In for data acquisition
        FDwfAnalogInChannelEnableSet(hdwf, 0, 1);
        FDwfAnalogInChannelRangeSet(hdwf, 0, 5);
        FDwfAnalogInAcquisitionModeSet(hdwf, 1); // acqmodeScanShift
        FDwfAnalogInFrequencySet(hdwf, hzAcq);
        FDwfAnalogInBufferSizeSet(hdwf, nSamples);
        FDwfAnalogInConfigure(hdwf, 1, 0);
    
        Wait(2);
    
        FDwfAnalogInConfigure(hdwf, 0, 1);
    
        // Setup the QCustomPlot for visualization
        customPlot->addGraph();
        customPlot->graph(0)->setPen(QPen(QColor(40, 110, 255)));
        customPlot->axisRect()->setupFullAxesBox();
        customPlot->xAxis->setRange(0, nSamples);
        customPlot->yAxis->setRange(-2.5, 2.5);
        connect(customPlot->xAxis, SIGNAL(rangeChanged(QCPRange)), customPlot->xAxis2, SLOT(setRange(QCPRange)));
        connect(customPlot->yAxis, SIGNAL(rangeChanged(QCPRange)), customPlot->yAxis2, SLOT(setRange(QCPRange)));
    }
    
    void MainWindow::realtimeDataSlot() {
        // Fetch data from the Digilent WaveForms device
        FDwfAnalogInStatus(hdwf, 1, &sts);
        FDwfAnalogInStatusSamplesValid(hdwf, &cValid);
        FDwfAnalogInStatusData(hdwf, 0, rgdSamples.data(), cValid); // Get channel 1 data
    
        // Convert QVector<double> to QCPGraphDataContainer
        QCPGraphDataContainer dataContainer;
        for (int i = 0; i < rgdSamples.size(); ++i) {
            dataContainer.add(QCPGraphData(i, rgdSamples[i]));
        }
    
        // Update the plot
        QSharedPointer<QCPGraphDataContainer> dataContainerSharedPointer = QSharedPointer<QCPGraphDataContainer>::create(dataContainer);
        ui->customPlot->graph(0)->setData(dataContainerSharedPointer);
        ui->customPlot->replot();
    }
    
    MainWindow::~MainWindow() {
        delete ui;
    }

     

    I hope this helps! Let me know if you need further details.

  11. Hello @STuson.

    All MCC DAQ HAT boards are compatible with the Raspberry Pi 5.  

    Follow the instructions below to install the MCC daqhats software branch (beta version 1.5.0.0) for RPi 5 modules. 

    https://github.com/mccdaq/daqhats/tree/pi5

    1. $ cd daqhats

    2. $ sudo ./uninstall.sh

    3. $ git pull

    4. $ git checkout pi5

    5. $ sudo ./install.sh

    6. $ pip install daqhats (manually add Python support)

    You can switch back to the released library by uninstalling the library, running “git checkout master”, and then installing the library.

    Use the installed MCC DAQ HAT Manager utility application to verify communication with the MCC 118/MCC 128 or use terminal commands.

    $ sudo daqhats_read_eeproms

    $ daqhats_list_boards

    Do the MCC DAQ HATS work?  Verify the address jumper is in place if required.

    Reply with screen captures and images of your hardware if the issue is not resolved.

    Regards,

    Fausto

×
×
  • Create New...