Forums

How to transfer stored data to a text file on a PC?

Started by gti5notrkt December 6, 2004

I am attempting to make a small inertia flywheel dyno for RC car
electric motors using a hall effect sensor and the Timer1 command on
a bx-24. Using available documents I have managed to store the time
stamps (clock ticks) in an array using the variable format;

Dim As New UnsignedInteger(1 to 5000)

After the values have been collected in the array I need to write the
data in a separated variable format (CSV?) to a file on my PC's HD.
This will then be read using an Excel macro to create a graphic
output. How do I go about doing this? Anybody have some sample code
on writing text files through the serial port to the host computer?

I am a raw beginner at this, so please keep the information simple.
Thanks.

Jon Andrews.





You really can't write a file directly over the serial
port. You must have some sort of application on the PC
actively reading the serial port and writing the
contents to a file for you. There are a couple of ways
to go about this.
1) Write your own PC application to open the serial
port, read the incoming text and store it to a file.

2) Use one of the many Terminal programs that are able
to save a log file. You would simply open the terminal
program, select the correct serial port and port
settings (speed, word size, error correction, etc...)
and begin streaming data. Most terminal programs will
simply display the data on the screen. Once you are
done receiving data you can simply save the log. Some
applications will allow you to set up a log file name
before hand while others store the text in a memory
buffer and you must perform the save operation at the
end.

Good luck with your project!
-Matt Armstrong
--- gti5notrkt <> wrote:

>
>
> I am attempting to make a small inertia flywheel
> dyno for RC car
> electric motors using a hall effect sensor and the
> Timer1 command on
> a bx-24. Using available documents I have managed to
> store the time
> stamps (clock ticks) in an array using the variable
> format;
>
> Dim As New UnsignedInteger(1 to 5000)
>
> After the values have been collected in the array I
> need to write the
> data in a separated variable format (CSV?) to a file
> on my PC's HD.
> This will then be read using an Excel macro to
> create a graphic
> output. How do I go about doing this? Anybody have
> some sample code
> on writing text files through the serial port to the
> host computer?
>
> I am a raw beginner at this, so please keep the
> information simple.
> Thanks.
>
> Jon Andrews. > ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> $4.98 domain names from Yahoo!. Register anything.
>
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/dN_tlB/TM
>
--------------------------------~->
> Yahoo! Groups Links >
__________________________________





Matt Armstrong <armstrong_matt@y...> wrote:
>
> You really can't write a file directly over the serial
> port. You must have some sort of application on the PC
> actively reading the serial port and writing the
> contents to a file for you. There are a couple of ways
> to go about this.
> 1) Write your own PC application to open the serial
> port, read the incoming text and store it to a file.
>
> 2) Use one of the many Terminal programs that are able
> to save a log file. You would simply open the terminal
> program, select the correct serial port and port
> settings (speed, word size, error correction, etc...)
> and begin streaming data. Most terminal programs will
> simply display the data on the screen. Once you are
> done receiving data you can simply save the log. Some
> applications will allow you to set up a log file name
> before hand while others store the text in a memory
> buffer and you must perform the save operation at the
> end.
>
> Good luck with your project!
> -Matt Armstrong

Matt,

Thanks for the information. For what I am doing the terminal program
approach will probably work fine. What is the best method (function)
to use to stream data to the com port? Should I be using PutQueue?

Thanks,

Jon Andrews.



I have successfully used a PC program called "WinWedge" to receive values directly into EXCEL via the BX-24 serial port.

I works very, very well, see http://www.taltech.com/

Best Regards, Eric

----- Original Message -----
From: gti5notrkt
To:
Sent: Monday, December 06, 2004 11:08 AM
Subject: [BasicX] How to transfer stored data to a text file on a PC?
I am attempting to make a small inertia flywheel dyno for RC car
electric motors using a hall effect sensor and the Timer1 command on
a bx-24. Using available documents I have managed to store the time
stamps (clock ticks) in an array using the variable format;

Dim As New UnsignedInteger(1 to 5000)

After the values have been collected in the array I need to write the
data in a separated variable format (CSV?) to a file on my PC's HD.
This will then be read using an Excel macro to create a graphic
output. How do I go about doing this? Anybody have some sample code
on writing text files through the serial port to the host computer?

I am a raw beginner at this, so please keep the information simple.
Thanks.

Jon Andrews.

------
Yahoo! Groups Links

a.. To