LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA function in LabVIEW

hello,

 

 i am using VISA function in LabView to take several values from microcontroller and store all these values then plot it.

my problem is how may i store all the values that the microcontroler recived in txt file ?

each time it save one value at a time and then it deleted to save another new value !

 

write.jpg

thank you 😃

0 Kudos
Message 1 of 3
(2,684 Views)

You have two problems:

  1. Your wiring of the error clusters in incorrect. Why are you branching the error wire? You want the wait to occur after the write. As it stands now, it could occur before, or during the write. This appears to be a copy of the basic serial example that ships with LabVIEW, so I don't understand why you modified this way.
  2. The Open File function has a "replace or create". Obviously, this is going to ... replace the file if it exists. You want "open or create".
0 Kudos
Message 2 of 3
(2,675 Views)

Two things I completely forgot to mention:

  1. After opening the file you want to set the file pointer to the end of the file so the writing begins there.
  2. You need to use a shift register to pass around the file refnum. The write function will update the file pointer so that it points to the end of the file after each write. Thus, the next iteration will write at that point. Otherwise, the Write function will simply use the original file position.
0 Kudos
Message 3 of 3
(2,647 Views)