09-29-2015 09:13 AM
I have hopefully a quick question.
Why doesn't the read from text file work in this example?
Thanks
Solved! Go to Solution.
09-29-2015 09:17 AM
When you write to a text file, LabVIEW keeps a pointer along with the reference while you have the file open. So after you write "test" to the file, your new pointer is now at location 4. When you Read after that, it reads from pointer 4 and on.
Use the Set File Position function in the advanced palette to read from position 0.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-29-2015 09:18 AM - edited 09-29-2015 09:18 AM
I think you need to set your file position back to zero after the write. You're reading back from the position after your write which is probably empty.
EDIT: James is too fast for me 🙂
09-29-2015 09:21 AM - edited 09-29-2015 09:22 AM
Sorry, Taki!
ASTDan, this altered version of your code will just result in a file getting larger and larger with each run with "testtesttesttest" and so on.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-29-2015 09:47 AM