11-07-2017 04:24 AM
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
11-07-2017 04:53 AM
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).
11-07-2017 05:03 AM
Here I include the file to be read into the vi, you can test them.
11-07-2017 05:25 AM
The spreadsheet VI has \t as delimiter. The file has "," as delimiter. That won't work.
11-07-2017 05:47 AM
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?
11-07-2017 05:49 AM
Took some time and LabVIEW became not responding*
11-07-2017 06:23 AM
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.
11-08-2017 07:33 AM
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
11-08-2017 07:45 AM
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.
11-08-2017 07:58 AM
tried your suggestion just now but the graph is still shrinking and small.