LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

need to log data every second

Solved!
Go to solution

Hi

 

So far so good with writing this simple .vi. I'm just having one issue. I need to record data every second. I am using FieldPoint to output thermocouple signals. MAX is reading everything fine (I'm recording ambient, it's fluxing between 80-83 so I set my stop for 83) and I can usually run the program for 5-10 seconds before my case structure is false and stops the .vi. When I open the file I get decimated data. I tried a time delay and still the same thing. Not only is it decimated but it doesnt record every second but between 5-10 seconds.

 

How can I fix this?

 

.vi attached as well as clip of data

 

Thanks so much

Download All
0 Kudos
Message 1 of 14
(5,620 Views)

If the program actually runs for 5-10 seconds, then there is no 'decimation' since you have 7 records. It's a problem with the timestamp column. Surely you would notice if the program was actually running for over a minute.

 

I don't use the Express VIs and never use dynamic data so I can't tell where the problem is. I seem to recall a bug in the Write to Measurement file when you are appending signals. Perhaps you can convert the dynamic data to a single waveform and try Export Waveforms to Spreadsheet File.

0 Kudos
Message 2 of 14
(5,601 Views)

The loop actually runs for 5-10 seonds I highlighted the code to see the execution. In that clip of data the program ran for about 50 seconds and in that 50 seconds recorded 7 points. I'm going to need 50 points in 50 seconds.

 

How would I convert the data to a single waveform like that?

 

Sorry I'm a bit new to this LabVIEW stuff, but thank you for the speedy reply!

 

-T

0 Kudos
Message 3 of 14
(5,594 Views)

The time it takes when highlight execution is on is not that relevant. If you had probed the iteration terminal, and said the loop iterated 5-7 times, that would have been more meaningful.

 

Use the Convert From Dynamic Data function. What you could also try is changing the Write to Measurement File to create a header for each segment and look at the timestamp for each segment.

0 Kudos
Message 4 of 14
(5,585 Views)

Thanks for the reply but I still have no help here...

I tried converting to Dynamic Data and that didn't help me at all... Thanks for the suggestion though

 

I looked at the timestamp for each segment as well, I get a data point every 5-10 seconds it varies....

 

I need a data point every second... so if someone could help me... that would be great...

 

I have also tried using a time delay, that just makes it worse.

 

New .vi and data block attached, I ran for about 26 seconds and got 5 points of data....

 

Thanks for any input

-T

Download All
0 Kudos
Message 5 of 14
(5,559 Views)

You were originally saying that the loop actually runs for 5-10 seconds. If this is correct, then you are getting a point every second and it is a problem with the timestamp or the way it is recorded. If you are now saying that the loop actually takes 26 seconds, then the log is correct and the only problem I see is that is how long the hardware takes to do an acquisition. Why don't you get rid of the DAQ Assistant? I have no idea how much overhead is added with the DAQ Assistant and a single FieldPoint read but it is going to be higher than if you used the DAQmx functions with all of the configuration outside the loop and only a DAQmx Read inside.

 

0 Kudos
Message 6 of 14
(5,555 Views)

FieldPoint is the stuff my company uses. I am not familiar with it at all. I don't like it, I like DAQ better....

 

In any case my problem isn't solved....

 

Clearly I'm more confused now than I was because I don't understand your logic. If it's a problem with the timestamp or way it is recorded what can I do?

 

and I didn't say the loop takes 26 seconds... I ran the VI for 26 seconds, and got 5 data points.... I need 26 data points in 26 seconds no more no less.

 

In the end I'll be running over 150 instruments and I need to be sure one works before I try and hook all the other channels up.

0 Kudos
Message 7 of 14
(5,549 Views)

Running the VI for 26 seconds is what I mean by the loop taking 26 seconds. It seems that each FieldPoint read is taking about 5 seconds. To confirm, just place a probe on the iteration terminal to see how times the loop actual iterates. If you have 5 data points in the file and the loop iterates 5 times, then you know where the problem is.

 

It really does not matter what rate you want if the hardware does not support that rate. At least convert that DAQ Assistant and do what I suggested to see if there is a limitation in the DAQ Assistant or in the hardware.

0 Kudos
Message 8 of 14
(5,541 Views)

Update rate for the TC-120 is 1.13 seconds. Try polling every 2 seconds and see what happens.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 14
(5,525 Views)

How would I change that update rate?

 

Do you think the reason why I'm not getting data every second is because FP might not be capable of producing those results from a TC?

 

I've tried all FP programming options and none seem to work. Do you think if I wire my write to measurement file differently then it would log better data?

 

I'm just at a loss here and don't know what else to do, usually there are no issues.

 

thanks again

 

-T

0 Kudos
Message 10 of 14
(5,490 Views)