LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read From Spreadsheet File does not read any data into Waveform Chart Indicator

 Hello everyone,

 

I have attached a vi that I have problem with. There is no error or warning, the vi can be executed but the Read From Spreadsheet File does not display data sets in the Waveform Chart.

Can anyone debug this vi? If there is a mistake in the block diagram code, please point out to me which I should change/Why. 

 

Follow the simple instructions below after you ran the vi,

- Click "Start Configuration" button

- Click any of the boolean sensor button

- Browse and open any file

- Click "Submit" button to read the entered file into Waveform Chart

 

Thanks, looking forward to somebody's response. 

 

Regards,

nnhas

0 Kudos
Message 1 of 17
(4,014 Views)

First some general remarks:

The states.ctl is missing.

The loop will draw one CPU flat until start is pressed.

 

How the file read fails, is hard to tell without any of the files you are trying to read. Could be anything really...

 

Maybe the file has comma's instead of points or visa versa? If so, you need to change %.3f (AFAIK the .3 doesn't add anything when reading, might as well use %f) to %,;%f or %.;%f. And you need to do that 5 times, since you made 5 copies (really not the way to go).

 

0 Kudos
Message 2 of 17
(4,001 Views)

Here I include the file to be read into the vi, you can test them.

Download All
0 Kudos
Message 3 of 17
(3,989 Views)

The spreadsheet VI has \t as delimiter. The file has "," as delimiter. That won't work.

0 Kudos
Message 4 of 17
(3,981 Views)

Ok I've got that. It kinda works now, the data is shown in the graph.

 

Anyway do you have any idea why/what happen when I clicked the submit button, it took some time to display the graph in the next page of the tab?

0 Kudos
Message 5 of 17
(3,977 Views)

Took some time and LabVIEW became not responding*

0 Kudos
Message 6 of 17
(3,973 Views)

Well, the file is >3 MB. So it's expected that it takes "a while". Not sure what exactly consists a while, but it won't happen instantly.

 

There is a change that the VI you're using does some fancy (=not required) things. You could try to open the file yourself, and convert the string to 2D array. Sooner or later you'll end up with that anyway, because you probably want a header for example... But it might as well be slower.

0 Kudos
Message 7 of 17
(3,964 Views)

Hello Everyone,

 

I am a beginner in LabVIEW.

 

I have problem with displaying a csv file into a waveform chart. You can try to run the provided files in the attachment, the graph can be shown after you entered it into the file path control but the graph is shrinking and does not display correctly as expected. 

 

Can anyone please locate my mistake here? and suggest what I should have done?

 

Any help would be greatly appreciated.

 

 

Regards,

nnhas 

Download All
0 Kudos
Message 8 of 17
(3,944 Views)

One problem I see is that in your "Process" case, you are only writing to one chart at a time, but the other charts are getting default data which is an empty array.  I would move the chart terminals into the respective cases where they are getting data.

0 Kudos
Message 9 of 17
(3,936 Views)

tried your suggestion just now but the graph is still shrinking and small.

0 Kudos
Message 10 of 17
(3,927 Views)