LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading waveform from file. Can't read more than 1000 points.

I save graph data this way:

 

SydneyAVDE_0-1691072763014.png

SydneyAVDE_11-1691073595805.png

 

SydneyAVDE_9-1691073434511.png

 

SydneyAVDE_1-1691072811916.png

 

Measurement is at 10000Hz, with a chart history length of 100000.

 

SydneyAVDE_4-1691072932321.png

 

I read the graph data like this:

SydneyAVDE_5-1691073093392.png

SydneyAVDE_10-1691073455373.png

 

SydneyAVDE_7-1691073290845.png

The read graph is also 100000 history length.

 

It is only 1000 measure points.

SydneyAVDE_8-1691073334729.png

 

What do i do wrong?

 

Thank you in advance and for reading. 

0 Kudos
Message 1 of 10
(1,163 Views)

I tried to replicate your condition. I generated a waveform with the same number of points, it read well. 


Can you confirm when you save the data, the number of points going to the file ? 

LVNinja_0-1691075147784.png

 

0 Kudos
Message 2 of 10
(1,157 Views)

We cannot really debug pictures. A good guess is that the local variable contains stale data.

 

Why exactly are you using charts instead of graphs?

 

Please attach some simplified code that demonstrates the problem.

0 Kudos
Message 3 of 10
(1,121 Views)

We know now the problem is at the write part. This helps.

 

SydneyAVDE_3-1691136984978.png

 

 

SydneyAVDE_0-1691136529643.png

 

The spreadsheet file that is generated is also only 1000 measure points.

 

SydneyAVDE_2-1691136951524.png

 

 

0 Kudos
Message 4 of 10
(1,096 Views)

Hi Sydney,

 


@SydneyAVDE wrote:

We know now the problem is at the write part. This helps.


The "write part" is not the problem.

The problem is (as told before) the data in your local variable: when your waveforms only contain 1000 samples then you cannot save more samples in your files…

 

As you use charts and rely on their history: using the local you only save the latest data of the chart, but not the whole history!

 

Why do you need to convert an array to a cluster just to index the (waveform) elements in the array? Why not use IndexArray???

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(1,092 Views)

@SydneyAVDE wrote:

This helps.

...

The spreadsheet file that is generated is also only 1000 measure points.


Not this does NOT help! You've been asked to attach your code because showing truncated pictures is completely useless. We don't even know where the terminal of that local variable is!!!

 

If that local variables is of the chart terminal (You never really specified that and it is not obvious from the picture!), it will only contain one reading (which I assumes is maybe 1000 points). You can use a property node to read the history data instead.

 

Once we see the entire code, we can give specific advice. Maybe you want to append to file whenever the chart terminal is written. Maybe you want to keep the history using your own code?

 

As has been said already, the array-to-cluster-unbundle-dance is just pain silly. I also strongly recommend to avoid string-to-path and path-to-string. You should process paths exclusively using build path and strip path, only the filename should be processed as string. Your current code would burst into flames as soon as you would run it on a different OS (e.g. Mac or linux).

0 Kudos
Message 6 of 10
(1,045 Views)

I have not have the time yet to make a simplified version. Programming in labview is not the main function of my job. I am trying what i can with what little i learned 5 years ago at school. 

 

I started using charts instead of graphs because the graph that came with the DAQ example only showed x samples while chart showed me all samples appended. And appended is what i was looking for. I understand there must be a better way i have not yet discovered.

 

SydneyAVDE_0-1691156205022.png (this is noise and not an actual measurement.)

 

By making the simplified version, i found out what the problem is. 

SydneyAVDE_1-1691156468451.png

 

I was so focused at new challenges that i forgot the very beginning of my program. 

 

SydneyAVDE_2-1691156579548.png

 

And by using the chart variable, i hoped i could save all data that is shown in the chart, instead of the last x samples. Just like when you export picture. I have lots to learn. 

A new challenge has risen now and i will have to re-write a part of my program. But that's for next week. Have a good weekend all and thank you for your time. 

0 Kudos
Message 7 of 10
(1,033 Views)

I tried the history node but it offered me the same result (at first glance).

 

Here is my code. Bare in mind that i'm a beginner and it is a lot of trial and error. There are parts that should be ignored for now.

What is important right now, is that i can call upon a file that is viewable in labview, so that we can zoom in on parts of the wave. Spreadsheet files and pictures are not ideal, but that's all i have been able to generate so far.

 

E.g. 

SydneyAVDE_0-1691158618897.png

 

The signals have to be measured at at least 5500Hz (to be tested), and maybe more, for 15 seconds. 

 

 

Also, the part that you mention of the string-to-path and path-to-string... i am guessing you will malfunction when you see my code 😂 I will check in the build path and strip path as you suggested. 

Download All
0 Kudos
Message 8 of 10
(1,023 Views)

Sorry, I currently don't have access to LabVIEW 2023. Can you do a "save for previous" (2020 or below). and attach again.

 

You can build your data in a shift register and use a graph. (since t0 and dt are fixed, maybe keeping plain array data would be sufficient).

0 Kudos
Message 9 of 10
(1,016 Views)

Hello

 

Here is the file as requested. 

Download All
0 Kudos
Message 10 of 10
(968 Views)