Continuous data acquisition and analysis in real time

Hi all,
This is a VI for the continous acquisition of an ECG signal. As far as I understand the DAQmx Analog read VI needs to be placed inside a while loop so it can acquire the data continously, I need to perform filtering and analysis of the waveform in real time. The way I set up the block diagram means that the data stays int the while loop, and as far as I know the data will be transfered out through the data tunnels once the loop finishes executing, clearly this is not real time data processing. 
The only way I can think of fixing this problem is by placing another while loop that covers the filtering the stage VIs and using some sort of shift registeing to pass the data to the second loop. My questions is whether or not this would introduce some sort of delay, and wether or not this would be considered to be real time processing. Would it be better to place all the VIs (aquicition and filtering) inside one while loop? or is this bad programming practice. Other functions that I need to perform is to save the data i na file but only when the user wants to do so. 
Any advice would be appriciated. 
Solved!
Go to Solution.

You have two options:
A.  As you mentioned, you can place code inside your current while loop to do the processing.  If you are clever, you won't need to place another while loop inside your existing one (nested loops).  But that totally depends on the type of processing you are doing.
B.  Create a second parallel loop to do the processing.  This would decouple the processes to ensure that the processing does not hinder your acquisition.  See here for more info.
Your choice really depends on the processing that you plan to perform.  If it is processor-intensive, it might introduce delays as you mentioned.  
I would reccomend you first try to place everything in the first loop, and see if your DAQ buffer overflows (you can monitor the buffer backlog while its running).  If so, then you should decouple the processes into separate loops.
Regarding whether or not "this would be considered to be real time processing" is a loaded question.  Most people on these forums will say that your system will NEVER be real-time because you are using a desktop PC to perform the processing (note:  I am assuming this is code running on a laptop or desktop?).  It is not a deterministic system and your data is already "old" by the time it exits your DAQ buffer.  But the answer to your question really depends on how you define "real-time processing".  Many lay-people will define it as the processing of "live data" ... but what is "live data"?

Similar Messages

  • Can I acquire and analyse in real time with regular Labview?

    I have to acquire samples (which vary cyclically in a roughly sinusoidal fashion) from a sensor, and check every sample to see if it is the minimum (the valley) of a cycle. If it is, and it does not fall within an expected range, I have to take a corrective action that involves rejecting the part that was just measured as well as a 30 more parts (to make sure that the defective part has been rejected). The signal from the sensor is not very noisy, but beause of the nature of the measured object, there could be local minima and maxima. To guard against that, a point is considered to be a valley only if subsequent readings deviate above that point by a certain amount. If a part is indeed defective,
    a digital out put has to issued to reject that part.
    Can all these be done using regular Labview (not RT)? I tried it out with a proto-type VI, using DAQmx vis, continously acquiring samples, but reading one sample at a time from within a loop (the VI I used is attached with this question). The result has been disappointing, since each time the loop executes there is a delay that keeps building up. Finally, even after the part feed has been turned off I can see Labview processing signals from parts that have long since gone past the measuring head.
    Another perplexing thing I found is that the time taken to execute the while loop in the vi is not consistent; it takes anything from 6 to 50ms to execute.
    I will need atleast 8-12 samples from a part to build its profile, and the feed rate is about 3000 parts per minute. I am using Labview 7.0 with an NI-6013 card in a Windows 2000 environment.
    Thanks for any suggestions / recommendations.
    Attachments:
    find_trough_2.vi ‏378 KB

    Hello,
    Thank you for your suggestions; I had already resigned myself to going for a Real Time system, your answer convinced me to commit myself to it!
    That said, your reply leads to a couple of (related) questions...
    1. Your point regarding the use of Local Variables is well taken; I have been repeatedly told at various training sessions how the necessity of updating the LVs during each loop iteration slows the computation time. However, what alternative do we have when there are several controls to which we have to write AND read data multiple times during a loop iteration, and perform different computations based on the value held by these controls? (You have seen the VI I attached with the original question). Some of these conditional
    computations further change the value of the controls. Does Labview have any other mechanism to store and manipulate the intermediate value from a computation?
    2. I did a simple experiment to determine the average loop time, and the results were surprising. I placed the entire content of the VI I used (Find the Valley in cycle.vi) in a stacked sequence structure, and wired the index counter "i" to a control to count the number of iterations the loop executes. I placed a frame before this with a tick count instruction to get the start time of the loop, and a frame after this to get the end time of the loop. Dividng the difference of these with the number of iterations, I got the average loop time to be around 1.2ms! Am I interpreting my results incorrectly?
    Thnaks once again for your response. I would really appreciate your views on the questions I have raised in this comment
    Regards
    Arun P. Madangarli

  • How to continuous data acquisition and save to an excel file using vc++

    Hi,
    I’m trying to build an MFC application with MSVC++6, where I would continuously acquire
    samples from 2 channels of a USB-6289. I’m using the DAQmx C functions.  I use the following codes to continuously get data:
    DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0,Dev1/ai1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
    DAQmxErrChk(DAQmxReadAnalogF64(taskHandle,1000,-1,DAQmx_Val_GroupByChannel,data,2000,&read,NULL));
            DAQmxErrChk
    (DAQmxRegisterEveryNSamplesEvent(taskHandle,DAQmx_Val_Acquired_Into_Buffer,1000,0,EveryNCallback,NULL));
            DAQmxErrChk (DAQmxRegisterDoneEvent(taskHandle,0,DoneCallback,NULL));
     static int32 EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
        int32       error=0;
        char    errBuff[2048]={'\0'};
        static int  totalRead=0;
        int32       read=0;
        float64     data[1000];
        // DAQmx Read Code
        DAQmxErrChk(DAQmxReadAnalogF64(taskHandle,1000,-1,DAQmx_Val_GroupByChannel,data,2000,&read,NULL));
       if( read>0 ) {
        fflush(stdout);
            Error:
        if( DAQmxFailed(error) ) {
            DAQmxGetExtendedErrorInfo(errBuff,2048);
            DAQmxStopTask(taskHandle);
            DAQmxClearTask(taskHandle);
                return 0;
    static int32 CVICALLBACK DoneCallback(TaskHandle taskHandle, int32 status, void *callbackData)
        int32   error=0;
        char    errBuff[2048]={'\0'};
        // Check to see if an error stopped the task.
        DAQmxErrChk (status);
    Error:
        if( DAQmxFailed(error) ) {
            DAQmxGetExtendedErrorInfo(errBuff,2048);
                //MessageBox("errors in DoneCallBack");
            DAQmxClearTask(taskHandle);
            //MessageBox(errBuff);
        return 0;
    I have two questions:
    1. how to save the data into an excel file? Can anyone show me some sample codes please?
    2.Are
    the data acquired from the two channels simultaneously? If I set the
    starting time at 0, sample frequency 1khz, can I directly multiply the
    sample number by 0.001 to calculate time (as shown below)?
    Time    channel1  channel2
    0.001    d11           d21
    0.002    d12           d22
    Thank you! 

    You aren't going to get much help with Visual C++ programing when asking questions in the LabVIEW forum. 
    Try the Measurement Studio for Visual C++ forum.
    Message Edited by Ravens Fan on 12-05-2008 04:24 PM

  • Is vision development module in labview 8.6. sufficient for real-time image acquisition and analysis using a webcam

    Hi, 
    I'm new to labview and trying to develop an eye-tracker using labview 8.6. It has the vision development module and i was wondering if this was sufficient for real-time image acquisition and processing or would i be needing any other software tools.
    Solved!
    Go to Solution.

    Hello, certainly it is possible and sufficient for real-time tracking!
    About eye tracking - if you need an example, you can find the code here:
    https://decibel.ni.com/content/blogs/kl3m3n/2013/10/08/real-time-face-and-eye-detection-in-labview-u...
    The code uses OpenCV functionalities along with the LabView UI (and some other functions like overlay).
    Hope this helps a bit.
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • Data acquisition with highly accurate GPS time stamping (hh:mm:ss:sss UT)

    A research group has developed a data acquisition system dedicated to daily observations of solar phenomena at radio waves using high time resolution (5-100 ms).
    First, the analog signal from the antenna (1000-2500 MHz) is sent to a spectrum analyzer (HP8559-A). After that, the analog signal is digitized during 5 minutes in a NI USB-6009 device connected to the PC, before to be stored in a file. By that time, other acquisition data cycle is restarted and so on up to the end of day.
    However, we need timestamp (UTC) the solar data at the beginning and end of each sample of 5 milliseconds, during all acquisition process, in order to have the UTC time information of recorded solar events. So, a time resolution of at least 1 ms is required.
    A software permit us to read recorded data and visualize corresponding spectra during last 5 minutes. However, we need UTC time information in the format hh:mm:ss.sss UT. Then, UTC millisecond is important for us, but not available yet.
    To solve this problem, we are searching for a high accuracy timing GPS receiver (on the order of microseconds or nanoseconds), with at least three significant digits of precision (UT time in milliseconds) and which give us the UTC signal at least each 5 milliseconds or even better (1 ms). However, most GPS receivers only outputs 1 PPS (Pulse Per Second = 1000 millisecond).
    Then, we are open to a better addressing on how to solve this problem !!
    We know that GPS time synchronization with PXI-6608 can be used to precisely timestamp data acquisition, but we have to solve this problem with a lower cost. Also, we require a PCI interfacing instead of PXI.
    Do we have to use a timer card? How do we use a timer, GPS and USB-6009 to timestamp data acquisition? Does the NI PCI-6602 solve the problem?
    Obs:
    The data acquisition software was developed in C++ Builder to run on a PC (Pentium III 2 GHz) under Windows XP environment. We used the NI-DAQmxBase driver to sample the signal from the NI USB-6009.
    We are sure your expertise can help us on this matter.
    Regards,

    I better explain my problem in the thread How to timestamp continuous analog data acquisition using USB-6009 and GPS timing board?
    We are considering to use the PCI-1588 or a GPS timing board (low-profile slot too), but I´m not sure that the USB-6009 can be used to solve the problem.
    How to syncronize the data acquisition and timestamps using USB-6009 and PCI-1588 with external GPS?
    In other thread I would appreciate any suggestions for GPS timing board and PCI-1588 too.
    Regards,
    Lilian

  • TWO VERY TOUGH SUPPORT PROBLEMS FACED AND SOLVED IN REAL TIME

    pls any body post two very tough support problems faced and solved in real time.
    my id is: [email protected]

    Hi Priya.,
    For example client wants his customer legacy number in XD01 master data which is not there in Standard SAP.we can satisfy the requirement with USER EXIT
    2) If the client wants customer Phone number in the sales order we can use user exit to satify the requirement
    These are not provided in Standard SAP & we should work out on alternative way
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • Lenovo 14 20DM correct driver for 'Data Acquisition and Signal Processing Controller'

    Hi Everyone, I am the happy owner of a new Yoga 14 20DM. A few days ago I made the decision to upgrade to Windows 10. Whilst the upgrade went smoothly I did have to install a number of drivers manually. At the moment I am stuck on trying to install the 'PCI Data Acquisition and Signal Processing Controller' (as shown below).  I have tried right clicking on the device then selecting Properties > Driver (tab) > Update Driver > Search automatically for updated driver software, however doing so only shows the screen capture below!  Furthermore I have searched the Lenovo support page for a suitable driver however none is available! http://support.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-yoga-series-laptops/thinkpad-yoga-14/20dm?TabName Finally I have also installed, and run, 'System Update 5' the software program available from Lenovo. However it was not able to install a correct driver for this device. I have done a little searching on this topic, and have read a couple of stories about people installing an incorrect driver for this device, and then experiencing blue screens! Can anybody suggest how I can go about locating and installing the correct driver for this device? Any help will be greatly appreciated. Kind Regards, Davo

    Hi Ingemann, Ultimately I decided on the newest version of the Intel Chipset Device Software (INF Update Utility), which at this time (on the Intel website) is version 10.0.27. https://downloadcenter.intel.com/download/20775/Intel-Chipset-Device-Software-INF-Update-Utility- Interestingly enough I was presented with the message below when I ran this executable.  I selected Downgrade (with some trepidation), and after rebooting was pleasantly surprised to see that the troubled device was missing from the list. I can only assume that this means the correct drivers were installed. Thanks you very much for your help. Kind Regards, David

  • Z600 workstation missing pci data acquisition and signal processing controller driver

    I just installed Win7 Pro x86 on my Z600 workstation.  It was an upgrade from WinXP Pro.  In Device Manager I am missing the driver for the PCI Data Acquisition and Signal Processing Controller and Hardlock USB 1.02.  Can someone assist me in finding these drivers.  I looked on the Support/Drivers page for this  model but couldn't find anything.
    This question was solved.
    View Solution.

    Hi,
    You might get better assistance on the HP Enterprise Business Forum since you have a professional worktsation.
    HP DV9700, t9300, Nvidia 8600, 4GB, Crucial C300 128GB SSD
    HP Photosmart Premium C309G, HP Photosmart 6520
    HP Touchpad, HP Chromebook 11
    Custom i7-4770k,Z-87, 8GB, Vertex 3 SSD, Samsung EVO SSD, Corsair HX650,GTX 760
    Custom i7-4790k,Z-97, 16GB, Vertex 3 SSD, Plextor M.2 SSD, Samsung EVO SSD, Corsair HX650, GTX 660TI
    Windows 7/8 UEFI/Legacy mode, MBR/GPT

  • Driver missing - PCIe Data Acquisition and Signal .....

    Hello, i recently used Boot Camp to install Windows XP on my 2010 15" Macbook Pro.
    All the drivers are working (so far) and i haven't encountered many problems.
    However, there is one thing bugging me:
    When i go into Device Manager in Windows, and look down the list of installed/uninstalled devices, there is a device called "PCIe Data Acquisition and Signal Processing Controller" which has no driver installed.
    I'm PC savvy, but i have never seen this before. My guess is that one of the motherboard drivers is missing, and Boot Camp installer doesn't include that driver?
    Has anyone seen/resolved this, and if so, how?
    Thanks.
    Kaj.

    Okay, will do.
    Thanks.
    Also i wonder if you could help with another problem?
    http://discussions.apple.com/thread.jspa?threadID=2758766&tstart=0

  • PCI Data Acquisition and Signal Processing Controller driver

    I've installed win 8.1x64 on my HP Probook 450 G2 but I am missing the PCI Data Acquisition and Signal Processing Controller driver.
    Can you please help?
    Thanks,
    Leontina
    This question was solved.
    View Solution.

    Hi:
    Please see if installing the Intel Chipset driver installs that device.
    https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=20775&lang=eng&ProdId=816

  • Pci data acquisition and signal processing controller -Device software not installed

    My pc shows me ,the driver software for pci data acquisition and signal processing controller is not installed  on my Device manager.
    Please suggest me a suitable solution.

    No its not working , Give me an alternate solution.

  • Is it possible to set up my iPad as a video camera and broadcast it real time to a TV via apple TV?

    Is it possible to sey up my iPad as a video camera and broadcast it real time to a TV via Apple TV?

    Use airplay to send what is on the iPad to your tv.
    Since ipad2, you can display exactly what is on the ipad screento a tv via an adaper or via airplay through an apple TV.
    http://support.apple.com/kb/ht5209
    http://support.apple.com/kb/ht4437
    General overview but lacks specifics.
    http://accelerateyourmarketing.com/home-video-studio/
    Video
    https://www.youtube.com/watch?v=ce5FVJi0Uxw

  • E5-571 PCI Data Acquisition and Signal Processing Controller & SM Bus Controller

    I upgraded from Windows 8.1 to Windows 10. Windows Update says that it is up-to-date. Windows Devices Manager shows a problem with two devices: PCI Data Acquisition and Signal Processing ControllerSM Bus Controller What are these devices and where do I locate the drivers for them?

    That should do it. I've been pleasantly surprised by how well older drivers are working in Windows 10. I had to install Vista 64bit drivers for an ATI video card (the latest working drivers for the card) and they actually worked!

  • Driver needed for PCI Data Acquisition and Signal Processing Controller of HP 15- r247tu

    Install the Windows 10 Intel IMEI Intel Management Engine Interface (MEI) Driverhttp://ftp.hp.com/pub/softpaq/sp69501-70000/sp69593.exe The latest version of the Intel chipset driverhttp://ftp.hp.com/pub/softpaq/sp69501-70000/sp69575.exe All Windows 10 drivers available from HP are at the following link.http://support.hp.com/us-en/drivers/selfservice/HP-15-Notebook-PC-series/7486447/model/7693973#Z7_3054ICK0KGTE30AQO5O3KA30R1

    Hi: Try the chipset driver directly from Intel...the second file is the auto install file. https://downloadcenter.intel.com/download/20775/Intel-Chipset-Device-Software-INF-Update-Utility- If that driver does not install the PCI Data Acquisition and Signal Processing Controller, which the chipset driver should install, download the first file listed above (zip file). Unzip and extract the contents to its folder. Go to the device manager and click on the above device needing the driver.  Click on the driver tab. Click on Update driver.  Select the Browse my computer for driver software option, and browse to the unzipped driver folder. Make sure the Include Subfolders box is checked, and see if the driver installs that way. Then reboot.

  • How to calculate rms voltage, rms current and frequency from real time data?

    Hello,
    I need to calculate the real time rms voltage, rms current and frequency of the received voltage and current graphs using visa read. Actually am trying to monitor the voltage and current parameters of AC load, in this case, am using a set of 4 light bulbs at the moment. Expected frequency is 50 Hz, and rms voltage close to 240v AC, current about 1A. 
    Attached is the vi picture of what I have been able to achieve so far, courtesy of labview forums. But I need to finally finish this vi by calculating the Vrms, Irms and frequecy. The front panel shows the voltage (Chart V) and current (Chart I) after scaling. Chart VI represents ADC value 0 ~ 1023 of received data. Aray V & I show the binary bits received up to 10 bits of useful data from ADC. Each sine wave from ADC is sampled at 25 samples for the ADC conversion, and sampling frequency of 1.28kH.
    I have tried using the RMS vi, but seems I don't know how to configure it correctly to get desired results. Also when I make changes like switching of one of the bulbs so that their is current change, I need to refresh the SERIAL port first before changes show up on the VI. Any ideas on how to improve on this are highly appreciated.
    Otherwise, I would appreciate if somebody helps me MODIFY my VI to read the rms values and frequency from received data. This is the last piece of my project, I do appreciate all the help rendered. Am currently using labview labview 2014, student version!
    Gavin.
    Attachments:
    Test_revised1.vi ‏39 KB
    Test_frontpanel.png ‏196 KB
    Test_blockdiagram.png ‏187 KB

    hello,
    note that peak voltage (Vpeak) is (240 * 1.414) = 399 V and peak current about 1.414 if intended rms current is 1A.
    Gavin.

Maybe you are looking for

  • How to get iMovie on Vimeo?

    I made an iMovie for friends, but it's not playing on their DVD player - video no audio, too bad! I was wondering if I could post on Vimeo web site, but when I tried it stated my movie didn't have enough memory to be a real "movie" ???

  • Item groups query

    Hi all experts. I'm wondering if anyone could be so kind to help me with a query. I would very much like to se total sales amount (based on OINV) for each item group in my database. I'm fully able to get some figures by doing this query: SELECT disti

  • Select-option mandatory field

    Hi, I have a select option on the selection screen which i have made mandatory. I want to enter the values directly through multiple selection and not on the single field, but when i click on the multiple selection option, it is giving me error to fi

  • Already have wireless network, need help for set up of time capsule for wired backup only.

    Hello all - I have a time capsule that plugs into wall and used a wireless network to back up computer.  It would always mess up internet afterwards so I would unplug the time capsule and reset internet until the next back up.  my time capsule now wi

  • Defaul to printer

    Hi: A user wants to print a PO to printer. He was trying to change the default to printer in personal profile but doesn't let him. What is the problem? THanks