12-02-2022 03:51 AM
Hi everyone,
I've been working on Labview for the last month since I needed a data aquisition and control system for my tests. What I really need from my VI is to aquire data (my tests last for at least 6-7 hours and I aquire the signals at 1kHz) and control some devices of my system. I have three analog input which I want to log and continously control.
I'm new to Labview environment and I cannot overcome the Error-200079. This error manifests after few hours of testing. At first I notice the data in the GUI lagging and then the error 200279 error appears. This happens after I've logged few milions of data points.
I've implemented the producer consumer architecure and tried to simplify the software as suggested in other discussions but that didn't really solve the problem.
In the code you'll see a subVI ("Conversione_Temperatura") that is used to convert the voltage I read to the value of temperature.
I notice my computer starts the fan at maximum speed for cooling as soon as I run the VI (maybe too much calculation?).
I've attached my Aquisition and Control VI so you can verify.
Thank you in advanced.
12-02-2022 06:48 AM
I wanted to take a look, but I don't have LV2021 installed. Please do a Save for Previous Version back to ~LV2018 or earlier so more of us have an opportunity to help.
-Kevin P
12-02-2022 07:28 AM - edited 12-02-2022 07:34 AM
First get rid of the Dynamic Datatype. it is confusing the bejezus out of you!
You have an array of three waveforms with 100 samples in each waveform (we will come back to that size later- its wrong one way or another) You are somehow incorrectly converting that to three scalar points and losing %99 of your data. Everything everywhere that you scale or display the data would also work fine on a waveform datatype. your queue should be of scalar waveform type.
Next, (and your problem start) pass all of your data into a queue to analyze and display. do not analyze and display the data in the acquisition loop!
Finally, leave the samples per channel input unwired (-1 read all available samples) and throttle the loop to 100mS (Not always the correct decision, but it works very well when you've miswritten a P-C (data) architecture and tried to manipulate or display acquired data in the same loop as the acquisition.
Now, as an alternate solution to rewriting your vi, you could also THROW THE WHOLE MAIN VI OUT! and simply use the Continuous Measurement and Logging DAQmx project template and revise it in half the time it would take to fix your vi
12-02-2022 11:06 AM
Thank you so much for you time! I will take your advice and go for the project template and work on it.
12-02-2022 02:15 PM
While in principle I agree with @JÞB to "Throw the whole main VI out", suggesting that someone new to LabVIEW tackle modifying a LabVIEW Project Template based on the QMH is only going to lead to more confusion (it even confuses me).
The data rates you are using are modest. As you are a relatively new LabVIEW user, you need to learn a bit more about DAQmx, and about some simple ways to take advantage of LabVIEW's Data Flow architecture to allow you to "Aquire Your Data and Save It, Too (simultaneously)" (that's a bad pun from a common expression in English).
First, DAQmx. There are pretty good introductions to DAQmx. In particular, there is "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications". Ignore the first step -- almost Never use the Dreaded DAQ Assistant (which I abbreviate as the DDA), and especially never use its Evil Twin, the Dynamic Data Wire.
You didn't mention what DAQ device is taking your data. But plug it in, and "play with it" in MAX. Build a test panel that does the following:
Bob Schor
12-03-2022 11:57 AM - edited 12-03-2022 12:39 PM
Excellent post BS however, I am going to point out that the Shipping Project Templates each link to extensive help files and even online developer walk-throughs in video format. The help even explains each of the concepts involved in the template such as; and link to even more basic concepts the specific template builds on from other sources
Basically everything a neophyte needs to create a running main vi.
Tim, et al ( and even i) might argue better practices on esoteric points.
It's absolutely WEAKEST failing is the missing meaningful ICONS for the Data type defs! (Almost unforgivably lazy programming)
[EDIT] The type def icons are fixed! AND queues stop with "Exit" commands (and have a default developer error case for bad cmd strings) at least in 2022Q3 I'm not sure when that happened!
But, it's 99.8% solid working code with justifiable design decisions.
Advising against the use of the shipping Project Templates is like asking a child to learn to read without a book.
12-03-2022 12:52 PM
@JÞB wrote:
Excellent post BS however, I am going to point out that the Shipping Project Templates each link to extensive help files and even online developer walk-throughs in video format. The help even explains each of the concepts involved in the template such as; and link to even more basic concepts the specific template builds on from other sources
But, it's 99.8% solid working code with justifiable design decisions.
Advising against the use of the shipping Project Templates is like asking a child to learn to read without a book.
@JÞB -- Criticism accepted, and probably "on target". I believe I looked at the QMH about a decade ago (maybe more?), when I was a little greener but knew that having the Producer exit and destroy the Queue to force the Consumer to "error out" was, to say the least, not "polite". I'd recently learned about the concept of a "sentinel", so I had the Producer send an "empty array" before it exited, leaving the Queue intact, and had the Consumer test for this "sentinel" and exit, and destroy the Queue (knowing that the Producer had already exited). I sure hope that the QMH doesn't cause deliberate errors any more as part of its shutdown procedure ...
Bob Schor
12-03-2022 08:00 PM
@Bob_Schor wrote:
- Now write your acquisition routine. It requires maybe 3-5 DAQmx functions: Start, Read, Stop.
- But what about the data? As @JÞB mentioned, you don't want to waste time processing it in your Acquisition Loop. You want to "export" the data to a parallel loop that does whatever else you want to do with it.
Bob Schor
I suggest including the "logging" function also. Never use a separate loop to save the data because the built in logging function is really good. You can use another loop to display your data, but one shouldn't be needed to store your data with the built in logging functions.
12-04-2022 07:59 AM - edited 12-04-2022 08:02 AM
@mcduff wrote:
I suggest including the "logging" function also. Never use a separate loop to save the data because the built in logging function is really good. You can use another loop to display your data, but one shouldn't be needed to store your data with the built in logging functions.
In this case. The OP applied a scale to one channel that was not linear, nor logarithmic. It may be some strange polynomial but is written oddly. Else I would have mentioned that option myself. Unfortunately, DAQmx Scales do not support function nodes. So, DAQmx Logging is off the table.
12-04-2022 09:19 AM
@JÞB wrote:
@mcduff wrote:I suggest including the "logging" function also. Never use a separate loop to save the data because the built in logging function is really good. You can use another loop to display your data, but one shouldn't be needed to store your data with the built in logging functions.
In this case. The OP applied a scale to one channel that was not linear, nor logarithmic. It may be some strange polynomial but is written oddly. Else I would have mentioned that option myself. Unfortunately, DAQmx Scales do not support function nodes. So, DAQmx Logging is off the table.
Didn't see the VIs, no LabVIEW on the computer. Thanks