Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA read to file with time stamp

I was trying to read data from the serial port and send it to file automatically. So it was pretty much straight forward for me by using "VISA read to file". I was also able to append the data coming form the serial port into the file. The file I have chosen is ".XLS" so that a new data which comes to the serial port has a new line command which makes the data to append automatically to the new line in Excel sheet. Now I face a problem. I want to change the excel Worksheet inside the same spreadsheet the moment it reaches it maximum limit.

I want to know how it can be possible without stopping the active communication.

Secondly I want to add timestamp to the data which I have obtained. The time is when data reaches the serial buffer.

As I was using "VISA read to file" I was not able to get the above two done automatically

Hoping for a reply soon

 

Thanks,

 

Praveen.

0 Kudos
Message 1 of 4
(4,437 Views)
I forgot to mention the Labview Version 8.5 which i am using.
0 Kudos
Message 2 of 4
(4,436 Views)

You are NOT creating a native Excel file. You are simply creating a text file with the xls extension. Therefore, there is no such thing as a worksheet in the file. That only exists when you import the text file into Excel.

 

If you want to create an actual Excel file, then you would have to use ActiveX. There is the Report Generation Toolkit or do a sarch of the board for Excel. There are thousands of posts on the subject and all it takes is a littel effort on your part to find them.

 

In any case, to append a timestamp, you cannot use the Read to File. You will have to manually append the timestamp to your data gotten fy a normal VISA Read and save it with either ActiveX or to text with Write to Spreadsheet File.

0 Kudos
Message 3 of 4
(4,432 Views)
Thank you for the reply, i have to slightly tweak my code a little bit.
0 Kudos
Message 4 of 4
(4,428 Views)