Showing results for 
Search instead for 
Did you mean: 

Data changing while Reading data from file

Go to solution

when I am reading the text file from a spreadsheet I got whole file and data but if I run again without stop execution the file data to be changed. changing means when I re-run the program first row is deleting. Why this problem occurred...?  

0 Kudos
Message 1 of 5

Because of a problem in your VI...

Best regards,

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5

No. i am receiving file data properly but if i try to subtract the data is changing. find the below vi and file to understand the problem. 


First row data is not changing but after subtraction(running again and again without stop) first element is going to delete. 

0 Kudos
Message 3 of 5
Accepted by topic author udayasree


Your new in LabVIEW and one of the basics is that an event structure should handle events as fast as possible and at its best have no code or only very simple code in the event structure.

You only have  a  file read and a calculation.

That calculation uses feedback nodes that are only filled with the starting values the first time they run.

So the second run of your sequence is also not the first run of the feedback nodes.

That is why the second time is different.


Furthermore you are using way much to many steps for a simple subtraction.

So just build a sub vi that reads the file and a subvi that calulates what you want and test it with the debugger (lamp in the topline of the block diagram.

greetings from the Netherlands
0 Kudos
Message 4 of 5
Accepted by topic author udayasree

Okay, I understood the problem. Thank you for your solution. Because of feedback node only I got a problem. I removed the feedback and tried in a different way. 

0 Kudos
Message 5 of 5