05-12-2016 11:30 AM
Hi,
I have problem with my program.
I can't create a Graph from my Array...
Firstly i read valuse from my file which it looks like:
Power Density Power Frequency Voltage Current 25,334650E-6 36,900306E-6 190,825684E+0 862,942045E-9 864,983974E-9 24,206653E-6 35,157042E-6 190,825684E+0 827,446001E-9 882,577353E-9 25,580297E-6 36,612237E-6 190,825684E+0 851,907600E-9 863,375192E-9 25,898957E-6 36,910784E-6 190,825684E+0 824,207802E-9 829,508508E-9 26,401393E-6 34,364417E-6 190,825684E+0 807,872595E-9 821,918377E-9 25,830897E-6 34,823581E-6 190,825684E+0 813,358895E-9 836,582956E-9 24,849543E-6 35,491383E-6 197,160889E+0 813,544546E-9 880,989262E-9 25,744268E-6 34,769462E-6 197,160889E+0 826,847838E-9 837,655477E-9
Next i want to create a Graph from the first column. But it didn't work...
What can i change in my program to solve my problem?
Regards
Solved! Go to Solution.
05-12-2016 12:28 PM
05-12-2016 01:23 PM - edited 05-12-2016 01:24 PM
Hi piotrek,
why do you read "String" when you need numbers for a graph?
And what's the problem in not using Autocleanup before posting your block diagram?
It could be as nice as this:
Your VI tells us: you need to learn about AutoIndexing with loops, using efficient functions (like "+1"), and reading the LabVIEW help on each function!
After reading the LabVIEW help yu could simplify your VI to this:
05-12-2016 02:13 PM - edited 05-12-2016 02:13 PM
I would do something like this. Use Read From Text File with the right-click option to read lines to read the first line (the header). Then another Read From Text File to read the rest of the file as a single string. Then use Spreadsheet String To Array to parse the file data into a 2D array. To graph just the first column, use Index Array with a 0 wired to the "Col" index.