LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

opening file problem

Why this "read file" function doesn´t work???
0 Kudos
Message 1 of 10
(3,342 Views)
your problem is that you are telling to only show ".txt" files.
Message 2 of 10
(3,321 Views)
What exactly are you trying to read and write? The values of a listbox is not the list of items that are visible. The values of a listbox is which items are selected. I think you're mixing apples and oranges. If you want to change the list of items that you can choose from, you need to write to the Item Names property. If you want to highlight specific items in a list, then you write to the values property.
0 Kudos
Message 3 of 10
(3,314 Views)
the open create replace function will not let me see the file unless i tell the dialogue box to "view all"
Message 4 of 10
(3,308 Views)
vivi is right. The files you create using the Save Seq button do not have the .txt extension. Putting that into the Pattern input only results in *.txt files showing in the dialog, it does not cause the extension to be added to the filename. If you change the Default name input to "chanel_sel.txt" you may get what you want.

Lynn
0 Kudos
Message 5 of 10
(3,302 Views)
Thanks to all for your time. Anyway, I´ve tried your proposals (see attachement), taking out the *.txt predefined value, even I get out from the Event Structure the functions, but I can´t get the result expected.
So, answering your questions: I want to store only the selection done, I´m conscient that I can´t store the values (the only point is that in this aplication they coincide by chance, but this doesn´t matter).
I only want to store the selection, to reproduce it again in a future test (it could be that some channels are giving problems and the tester want to load always the same, so have no sense to go over the list all the time).
I really don´t know what is going on, I´ve used this function several times without problems... Also I´m not sure if the data file generated is correct, some letters are appearing.
SOmebody knows about that?
0 Kudos
Message 6 of 10
(3,288 Views)
you need to shut the file that you are using after you are done using it
Message 7 of 10
(3,264 Views)
Here's a working version of your program. Instead of using the File Read/Write, I just used Read From I16 and Write to I16. If you want to use File Read, you need to specify a count. As it is, you're letting it default to zero. You can calculate this from the file size as is done in Read From I16.
Message 8 of 10
(3,260 Views)
good job Dennis
0 Kudos
Message 9 of 10
(3,253 Views)

Thanks a lot, Dennis. I would never get that

 

0 Kudos
Message 10 of 10
(3,236 Views)