From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable won't work with higher acquisition rate

Solved!
Go to solution

Hello,

I built a VI for use on a PXI. I'm trying to control a waveform generator as well as acquiring data at a high rate of speed, at around 200Khz. I'm using a PXI-6289 for the input.

 

My VI/executable works with a low rate of speed through a MAX task but once I go to a higher rate, it stops responding. I don't see any error messages, it just stops. 

 

Could I get some help with my VI?

0 Kudos
Message 1 of 7
(2,535 Views)

Seems all a bit fragile.

It is probably not a good idea to place file IO inside the same loop?

What determines the loop rate?

Do you really need to configure the arbitrary waveform with each iteration of the loop?

Why is the diagram such a mess with partially hidden wires going off in all directions?

Message 2 of 7
(2,495 Views)

I would like to have a look into the VI. Could you upload a version for LV 15?

0 Kudos
Message 3 of 7
(2,481 Views)

Thanks for your feedback. I'm fairly new to Labview so I had to make adjustments as I went along with the construction of the VI. That is why the wiring is not clean. I derived the VI from an example that NI provided with Labview NXG, that I had to subsequently rebuild in original Labview due to the PXI having 32-bit windows. I'm not sure how the file IO should be placed if I need continuously save data from the DAQ input. I'm also not sure about loop rates, I guess its not really determined except by how fast the program takes? The acquisition rate is determined by a MAX task I made in the target machine. I had issues with the arbitrary waveform configuration being outside the loop and brought it back inside. 

 

I've attached a VI that's compatible with 15. 

 

0 Kudos
Message 4 of 7
(2,477 Views)
Solution
Accepted by topic author rguzman14

Take CA's suggestions, you know that he is a knight.

 

Move the Function generator stuff before the loop, once it is going no need to restart it as CA said. The only exception would be if you are changing your arbitrary waveform each run with new points.

 

Look at the examples for DAQmx under the example finder, below is a snippet of one example. Log using the built in functions to TDMS directly as shown in the example. If you need text then use the excel plugin to load the TDMS file then export it to text.

snipDAQmx.png

 

 

mcduff

Message 5 of 7
(2,470 Views)

I think that the advice of Mcduff is very good. I saw a start and stop button so possibly you need to pause the streaming of data, there are several ways to do this task but I think that probably you could use an event structure with this method: https://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/m-p/465621, credits for Altenbach. If you go for this way remember to stop the task when you want to stop the acquisition and otherwise start it again. The DAQ stores a buffer that gives errors with default settings if the data is replaced at buffer (Data is not consumed).

 

TDMS built into DAQmx is the best way to go like Mcduff said, you can reach highest file throughput and the size is optimized (Low).


I hope my message help you.

Message 6 of 7
(2,447 Views)

Thank you to everyone who gave feedback and advice. I was able to use an example, like suggested, and build a workable VI. 

0 Kudos
Message 7 of 7
(2,415 Views)