Problem Description :
Labview has been programmed to display data acquired from transducers through
the DAQ every second and save every minute (the sampling
rate from the producer loop is set to 1 Hz, which corresponds to 1 sample per
channel per second.). It had been performing this
successfully for several weeks prior to this occurrence. Since the occurrence,
which happened overnight when nothing had been changed in system operation, the
Labview display updates every 10 seconds and saves every 10 minutes. In
addition to this, the data that is being displayed and saved on these intervals
are not consistent with the real time operation of the experimental set up.
There seems to be a lag or disconnect between real data and that which is being
displayed, as it is completely incorrect and at least 10 minutes behind.
Labview specialist response:
As I mentioned on the phone based off the info I have, I believe that the producer loop is essentially running too slow to keep up with the hardware.
More specifically, in the producer loop the DAQmx Analog read Vis are set to read a single sample from the DAQ card's buffer on each iteration. This will work as long as the loop is faster than one second. However, if it begins to run slower than one second, it won't be able to catch up to the buffer. This could be fixed by setting the reads to Read in N samples, which reads the entire buffer by default. That will require some changes to the rest of the code, however.
Additionally, the consumer's rate is always a multiple of the producer loop. You could overcome that restriction by using time stamps to check if a minute has passed rather than check the items in the queue.
As for why the loop is running slower, it's difficult to say without further testing, but it could other programs running on the computer taking higher priority. There might also be a memory leak. You check this by watching the windows performance monitor as the program runs.
Finally I'd recommend benchmarking the producer loop speed and using VI analyzer to search for areas that could be improved. You can access VI analyzer under tools>>VI Analyzer. Here's a forum post with an example code snippet for benchmarking code:
[login to view URL]
As I mentioned on the phone, all of these steps will take some time and effort to get through. Since you haven't been working with the hardware for very long, I could recommend you for NSCS to have an applications engineer available to help you determine the best architecture. If you decide that it would best to find someone to code it for you. I can get you in contact with one of our sales engineers to talk about options in that direction.
This sounds like an error in Producer-Consumer loop which should be overcome using a slightly different technique of data acquisition.
Relevant Skills and Experience
I am a Certified LabView Associated Developer with more than eight years of experience in data acquisition and analysis.
Proposed Milestones
$100 USD - Locating the issue
$177 USD - Fixing the issue
What is the deadline for the project?
I am former Engineer from national instruments. From your code I know you are using Compact DAQ system.
Rest assure that I can get rid of your problem. But I am on vacation until 10/12.
Relevant Skills and Experience
Application Engineer from NI. With cDAQ system and Labview 2014 on hand as well.
Proposed Milestones
$111 USD - get all channels data right.
I propose a reasonable offer but can you wait until 10/12. we can chat first.
Hello,
I am CLD certified Labview developer with over 10 years experience in tests automation.
I have required experience to complete this task.
Just let me know if you interested.
Nicolae
This needs in depth analysis of your code. I will use team viewer to access the system. Kindly discuss with me for clarification of scope of the project.
Relevant Skills and Experience
Certified LabVIEW Associate Developer with 4 years industrial experience.
Proposed Milestones
$250 USD - Milestone
I can help you with this task because I've been working on DAQ cards and producer consumer architecture in LabVIEW for 3+ years. I've experience of synchronizing loops to meet timings.
Edit: I've checked your VI and analyzed it, and I'm sure your issue will be resolved through adjusting queue sizing and some queue flushing.
Relevant Skills and Experience:
Masters in Electrical Engineering and Computer Science (EECS)
Certified LabVIEW Developer (CLD) 2016
Certified LabVIEW Associate Developer (CLAD) 2016
Software Development - 5+ years
Proposed Milestones
$300 USD - LabVIEW DAQmx
Please discuss over chat to proceed. Thanks.
Hello,
I checked your problem. Let me suggest a much elegant solution that I used to acquire data in much faster way using LabVIEW 2017. I utilize a new feature named channel wires that is much better than the legacy producer consumer pattern. By using this technique, I would gauarantee no memory leak and you can check it out before final payment.
Kindly check first that your PC power plan is set to "High performance" not "Balanced" as this setting is very important and may be the reason behind this odd performance you have recently. If not, I'd be happy to migrate your code and show you how better it is.
I have understood your requirement and can help you, I am an IT engineer. I am geared up with years of experience as a developer, I am well proficient in lab view. I can sort out your problem. I have a vast portfolio to showcase, thanks