LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving data from my instrument (RS232)

You'll want to append an End of Line Constant to each string. You can just use the Concantanate String function to do that. Both functions are on the the String palette. I actually don't see how you got multiple data points at all, though. You don't have anything wired to the 'append to file?' input of the Write Characters to File and it should be creating a new file each iteration.

Since you have a data file, you must only be getting the error only occasionally. How often does this happen? Have you tried increasing the time delay of the Wait Until Next ms Multiple to if that makes a difference?

0 Kudos
Message 11 of 13
(492 Views)
I do not uderstand why you did not use the last vi I provided you as a starting point.
1. As the data comes by itself you don't have to write a command.
2. You get the VISA error because you want to read a given number of bytes that is not avaible at this port (especially if you read every 5ms and the data only comes every 250ms). Therefore I use in my vi 'number of bytes at port' so that you always read the correct number of bytes.
3. If you write to a spreadsheet file (like in my vi) you don't have to add a eol character. But you do have to set 'append to file' to true!

Steven

0 Kudos
Message 12 of 13
(478 Views)
Hi Steven,
I tried to use your modified VI.
unfortunately, I could not get the data the way I want. and I tried to modify your VI.
It was not successful either. anyway I want to learn more about LabView.
so I tried to make my own after reading free training material as chetan suggested.
I am still trying to get this done, but not yet.
Attached is an output file from your modified VI.
it looks like there some additional zero column in between actual data column.
my instrument sends 5 numbers every 0.25 second.
How can I get only those 5 numbers at a time with current time (i.e., 2007/03/01 11:02:00 AM)?

0 Kudos
Message 13 of 13
(467 Views)