I am using a simple labview vi to read data from an Arduino, which is attached to a couple of sensors. The VISA read is correct, and I'm happy with that, but I now want to be able to save each serial reading over each while loop iteration. Each attempt I've made to do this has resulted in only one iteration being saved. Either it is overridden each time, or it only appears to save the last iteration before I hit the stop button.
I've attached my vi as it currently is, which saves the last iteration. If I remove the property node entirely it saves every iteration but it causes an override. Any help would be appreciated.
Solved! Go to Solution.
Do not use the Read VISA To File. It is made for a single write. Instead, treat the file like the VISA session: open/create/replace the file before the loop, close the file after the loop, and write as much as you want inside of the loop.
Hi, thanks a lot for the reply. I've tried to implement your suggestion. I added the changes you suggested, but now I don't seem to read anything, or save anything. So I tried to copy your block diagram completely, and I can't seem to replicate it. I've attached my vi, not sure if I'm doing something dumb or not. From my untrained eye, it looks like the wiring is different on the build path block diagram object, but I can't seem to get what you did, so perhaps the difference is aesthetic across out labview versions/settings?
Edit: Ignore that, I figured out the mistake. Funnily enough I got the VISA read to file working too, so I now have two working solutions. Thanks a lot though!