LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx task created, read, closed in a for loop, time is correct on first iteration, but goes to 3.592396E+9 after

Hi guys,

 

First post, forgive clumsy question structure. I have a for loop, with a while loop nested in it, as shown in picture. The intent is to create as many separate files as parameters I have set, each beginning at time=0 going to end of test. This works in the first loop (in the first file saved per execution) but in the following files the time begins, and ends at 3.592396E+9. Why is this happening and how do I get this file to start from 0 on each new for loop iteration. 

 

Also incl. is a pic of correct and incorrect file time beginning values.

 

Thank you very much.

Download All
0 Kudos
Message 1 of 6
(2,730 Views)

Hi nbenz89,

 

I suspect that the issue has to do with how the dynamic data wires are handling the while loop restart. However, it is hard to tell from the screenshot. I recommend that you post your code if it is small enough, or post a VI Snippet of the code in question. 

 

Thanks

0 Kudos
Message 2 of 6
(2,681 Views)

Thank you for the response, attached is the code. Any advice appreciated greatly.

0 Kudos
Message 3 of 6
(2,671 Views)

Hi nbenz,

 

what's wrong with a value of 3.592396E+9? It fits perfectly to your post yesterday:

check.png

 

I too think this problem comes from your over-use of ExpressVIs and DDT wires.

KISS: use "plain" datatypes as much as possible. You will get much more control over your data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(2,665 Views)

Which express VI? I have used the DAQ assistant to generate code, and as far as I can tell the only express VI I still have is the write to measurement file.vi, which may not even be an express vi

0 Kudos
Message 5 of 6
(2,657 Views)

@nbenz89 wrote:

Which express VI? I have used the DAQ assistant to generate code, and as far as I can tell the only express VI I still have is the write to measurement file.vi, which may not even be an express vi


If it has a blue border, it is an Express VI.

0 Kudos
Message 6 of 6
(2,646 Views)