02-15-2015 10:11 AM
I have built this VI,It reads data from serial port and stores data in text file.But i want to log data in excel file directly.I ahve read other posts simililar problem and implemented some solutions suggested but failed.Please help
Solved! Go to Solution.
02-15-2015 10:48 PM
Hi pardhimegha,
have tuto how to send and receive your data.
https://www.youtube.com/watch?v=VpxBTtvCklo
Patrick
02-16-2015 12:24 AM - edited 02-16-2015 12:24 AM
I have watched so many videos like this.
I dont have any problem regarding serial read or write... Problem is that i cant store data in spreadsheet file..
02-16-2015 03:34 AM
Hi, pardhimegha
I ran your VI and have nothing to recevie, so it cannot store anything.
Because you use same port to send and receive data, it cannot work.
One com port have TX and RX. And you must connect those pins or use other devices/com to send/receive data.
Patrick
02-16-2015 05:12 AM
are you sure....??
coz I ran that VI and and I have stored readings in text file..
here is file of readings ...
02-16-2015 05:56 AM - edited 02-16-2015 05:57 AM
Hi pardhimegha,
so what exactly is your problem?
At first you said you cannot store anything in your text file and now you show an example file with your device readings!?
- Your VI should do what you want it to do, but you should implement some error handling!
- Using BytesAtPort directly after VISAWrite will most often not yield in the answer of the command given by VISAWrite…
02-16-2015 06:07 AM
I have clearly stated that I want to store data in SPREADSHEET file..Which I am unable to do..
And my current VI stores data in TEXT file.
02-16-2015 06:13 AM
02-16-2015 08:02 AM - edited 02-16-2015 08:03 AM
You could right click on your file and choose Open With->Excel. Excel will be able to open up that file without any problems.
Here is a little more effiicient version of your code. It uses the termination charcter to stop the VISA Read instead of asking how many bytes are at the port. It also opens the file once before the loop and closes it once at the end. And finally, you really should close your port after the loop.
Is that VISA Write even needed? If you are leaving the Write Buffer control empty, you can just get rid of it.

02-16-2015 08:19 AM