LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while reading TXT file

Solved!
Go to solution

Hi,

 

I manually update data from .xlsx to .txt

I use labview to list and select items from srcolldown menu.

I attached my VI.

If run my VI at very first startup 'na' is selected by default from list. Meanwhile I get error codes such as 'creating .csv file' and 'writing data to .mdb file' until i select another item in listbox, e.g.: 'First line'. After then If i select any other items from list error codes disappear. I then can choose 'na' again and it will work.

 

Scroll down menu content:

na
First line
Second Line
Third line

etc

listbox.jpg

Why 'na' is not accepted at first startup?

 

Kind regards,

Balázs

 

0 Kudos
Message 1 of 3
(748 Views)
Solution
Accepted by topic author LTBALAZS

Hi LT,

 


@LTBALAZS wrote:

If run my VI at very first startup 'na' is selected by default from list. Meanwhile I get error codes such as 'creating .csv file' and 'writing data to .mdb file' until i select another item in listbox, e.g.: 'First line'. After then If i select any other items from list error codes disappear. I then can choose 'na' again and it will work.

 

Scroll down menu content:

na
First line
Second Line
Third line

etc

Why 'na' is not accepted at first startup?


At first startup the ring is empty, but yet you write the string into the listbox value property. As the ring doesn't know that value it cannot select/accept it as valid value. Then you parse the string into its lines and set  the ring item strings. Now the ring knows it's list of valid values and can accept the "na" on the second try…

 

Another problem is: you write the whole text file content into the value property: what should the ring do with this full length string?

 

Btw. don't talk about "list" and "listbox" when you are using a ring control…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(721 Views)

Thanks!

0 Kudos
Message 3 of 3
(640 Views)