Ports
May 23, 2013, 11:40:42 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Welcome to the PORTS Forum. Please post your questions, answers, and comments relating to USB and other hardware interfaces in the appropriate forums below. - Jan
Pages: [1]
  Print  
Author Topic: Saving serial data to a .dat/.txt file  (Read 1077 times)
ashsrisam
Member
*
Posts: 2


« on: October 28, 2011, 03:46:17 pm »

Hello,

I'm trying to understand and then modify Ms. Axelson's 'com_port_terminal_vb' program so that I can save the data I receive from a serial COM port onto a different file. I'm finding it very difficult as i have next to no experience with VB.Net. I'd really appreciate any help you guys can give me.

Thank you,

-Ashwin
Logged
Jan Axelson
Administrator
Frequent Contributor
*****
Posts: 1629


WWW
« Reply #1 on: October 28, 2011, 05:24:42 pm »

The data received is stored in the DataReceived routine in the newReceivedData variable. From there you can do whatever you want with the data.

To store the data in a file, see the File and StreamWriter classes. For VB, another option is Microsoft.VisualBasic.FileIO.FileSystem class. A web search on these should bring up examples.

Jan
Logged
ashsrisam
Member
*
Posts: 2


« Reply #2 on: October 31, 2011, 10:22:57 am »

Thank you Ms. Axelson!  Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!