LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to display a table, in a loop such that when you enter the path, it should open the file in the table, however, the open file dialogue continually pops up all the time. What do i do?


Furthermore, i'm writing to a spreadsheet file, however, it writes an integer value, how do i get to write a real value to it. please advise?
0 Kudos
Message 1 of 9
(3,181 Views)
1. In the diagram view, you should change the dialogue box to a constant with the exact address of the file you want.
2. You need to open the "Write to file" VI diagram and read its instrucctions on the bottom of how to change its need from numbers to strings, etc.
Good luck
0 Kudos
Message 2 of 9
(3,181 Views)
In point 1) i would like THE USER TO TYPE IN A FILENAME, THEREFORE THIS METHOD WILL NOT WORK!
0 Kudos
Message 3 of 9
(3,181 Views)
Sorry 'bout that - I see that you want the User to enter the path, but only once. This is not possible if the For loop calls that VI with each iteration. You're going to have to get your 'Open File' VI out of that For loop or it will keep happening. You may need to use 2 For loops, The first For loop is to get your 'Open File' VI - where you then enter the file path, and the remaining For loop will run your other tasks. A Case or Sequence structure may also fit this. Good Luck.
0 Kudos
Message 4 of 9
(3,181 Views)
Put a case structure inside the while loop, and place the file dialog inside it. Then, with a boolean button (latch when released mechanical action) you can select any file. The file dialog will only open when boolean is set to true.
Hope this helps
0 Kudos
Message 5 of 9
(3,181 Views)
I) forgot about the other question, check the string format in write to spreadsheet, if you want a real number with 3 digits after comma, just wire %.3f. You can set other formats, look at online help.
Hope this also helps
0 Kudos
Message 6 of 9
(3,181 Views)
In fact, you may also try

1) Create a new dialog with a Path control that allow user input, and with OK and CANCEL buttons

2) Pass this Path value to a Global Variable and open a new file for the input path value upon user OK the dialog. Else, ignore the input value.

3) In your data-logging loop, Wire the path input of the Write to Spreadsheet.vi to the Global Variable in (2), set it to append file.


By now, you should have a simple working code. You can further modify the program to be more user friendly with prompts etc. upon user's click on buttons.

Hope this is still clear and sharp.
Cheers
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 7 of 9
(3,181 Views)
By the way, I've also noticed that in this loop situation, if the user enters the path name before
executing the program, then the user is not prompted
during program execution. So the open file dialogue
will not pop up.
You can enter the path before running the program by
clicking on the little folder.
I'm using the "WriteCharacterstovi.vi" rather than
the "WriteArraytoSpreadsheet.vi". First, I convert
the array to text.

Chuck
0 Kudos
Message 8 of 9
(3,181 Views)
If you could post the pertinent part of your code (in 6.0 format) we could look at it and perhaps advise you better on how to do things. It doesn't sound too hard to do what you need, but explaining a process like this in words can sometimes be tough--which is why we use LabVIEW in the first place, isn't it.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 9
(3,181 Views)