Showing results for 
Search instead for 
Did you mean: 



I use lab view to acquire voltage data, I have this error and it is said when task is aborted or the device is removed it may happen , please let me know if you have any suggestions to fix it. 

0 Kudos
Message 1 of 6

Hello, Melika.


     Look at your LabVIEW code.  When you ran it, a task was aborted or a device was removed from the system.  If you had attached your code (including any sub-VIs), we could examine it and possibly suggest what task was aborted, and possibly why it was aborted, but we cannot make many comments about code we haven't seen!


     If your code is part of a LabVIEW Project, it is best if we can see the entire Project.  In addition, many of us are not running the latest version of LabVIEW, so it is best (for many of us, including me) if you "Save for Previous Version" and choose LabVIEW 2019 or 2021.


Bob Schor

0 Kudos
Message 2 of 6


Thank you for your response, the code was shown automatically when it gave the error but now it's not showing .Please let me know how I can possibly find the code and I can send it to u accordingly. I'm a student and I believe the lab view used in university is an old version.  

0 Kudos
Message 3 of 6

.Thank you for the quick response, Melika, and I apologize for being unclear.


Somewhere on your computer, you have a LabVIEW program (sometimes called a "VI", because it is a file with the name "<something>.vi" that you open with LabVIEW, and it shows you a Front Panel with Controls and Indicators, and a Block Diagram (when you type ^E) that shows you LabVIEW code.  When you click the "Run Arrow", LabVIEW tries to run this program and throws the -88709 error.


This LabVIEW .vi file is what I wanted you to attach.  If you are, indeed, using an "old version of LabVIEW", I (and many of other users on this Forum) will be able to open it and may "see the bug" right away.


Can you please attach the .vi file?  It would also help if you furnished some additional information:

  • What version of LabVIEW (please give the name that LabVIEW calls itself when you open it) are you using?
  • What version of Windows are you using?
  • Describe briefly what you think the Program should be doing.

Bob Schor

0 Kudos
Message 4 of 6

Here is the file. It is lab view 2019 . we use it to read the voltage of 2 photo diodes. Windows 10 we use version 1909. 

0 Kudos
Message 5 of 6

I see the problem!  You have an "improper" loop for displaying and saving the Waveform data.


Here are some suggestions:

  • Start by disabling the Timed Loop that says "Acquire Data" in the bottom of your VI.  To quickly do this in a "reversible" way, go to the "Structures" palette, choose "Diagram Disable Structure", and drag this Structure over the Timed Loop (to disable it).  You may also need to disable the little Case structure with the Stop Timed Structure inside it.  [Note -- you don't need the Case Statement surrounding it -- you can't exit the While Loop until the Stop wire coming out is True.  You can, instead, put this on the Error Line coming out of the upper While Loop].
  • See if this runs OK.  You should see the Chart update, but won't be saving data.

Now, you've got an "Acquire" Loop acquiring data and showing it to you in a Chart.  You want to simultaneously save these data, possibly with some extra formatting or manipulation, keeping up with the data acquisition.  However, each time through this loop, you start acquisition, acquire, and stop acquisition.  Move the Start and Stop acquisition outside the While Loop -- start the Acquisition, enter the While Loop, acquire data, "do something with the data" (more about this in a second), and then do (almost) nothing else inside the While Loop.  


So let's assume we are acquiring 1000 points at a time at 500 kHz.  That's 1000 points every 2 msec.  [Do you really want to go that fast?  The human eye can't see changes that fast ...].  But to process 1000 points, 2 msec is a lot of time.  You can (probably) even stream them to disk at that speed.  But you don't want to put any of that "processing time" into the Acquisition Loop.


So you create another "Processing Loop".  Have you heard of the Producer/Consumer Design Pattern?  The idea is that you have two loops running in parallel -- one "produces" data at some rate, say 1000 points every 2 msec, and another "consumes" data at this rate.  All you need to do is transfer the data from Producer to Consumer in something that seems to "violate" the Laws of Data Flow.


There are two methods for that.  One is a Queue, where you put data in at one end, and it is instantly "available" to "dequeue" at the other.  The other is the more recent Stream Channel Wire, where data that are input to a Stream Writer are immediately available for output through a Stream Reader.


I'm going to sign off, for now.  I'd suggest you look up the Producer/Consumer Design Pattern in LabVIEW.  I might have an example somewhere I could post ...


Bob Schor


Found a demo I wrote showing a (very simple) Producer/Consumer using Streams.  Producer generates array of three increasing numbers, passes them to Consumer which assembles them in a larger array.  Consider Consumer being a Chart ...


Producer-Consumer with Streams.png

If "Save" is True, data are "saved" by being sent to Producer.  "Stop" stops both loops.  Note the funny rectangular things with a Blue Pipe at one end a an Integer Array at the other are Channel Writers and Readers of Integer Arrays.



0 Kudos
Message 6 of 6