Data logging through serial port
eecs501
Posts: 3
How can one output data from the BS2 into a PC file through the serial port? Thanks
Comments
One method is to use Hyperterminal, which can capture incoming data coming across the serial port. There are some issues using Hyperterminal, but I think they are resolved by turning flow control OFF. Perhaps others can shed a bit more light on this compatibility issue.
You can certainly use any other communications utility you wish, providing it is able to capture the data coming in from the serial port.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The best way is to use Hyperterminal as your debug screen, then capture Hyper to an Excel or Word file.
Also, have a look at StampPlot Pro and StampDAQ (here www.parallax.com/html_pages/products/accessories/tm.asp).
Is breadboarding a Stamp MODULE as easy as providing it with a regulated 5vdc power source and putting together the RS232 connector using physical Stamp pins 1, 2, 3, and 4?
There's a schematic on page 28 (pdf page 32) of the BASIC Stamp Manual that might be useful to you:
http://www.parallax.com/dl/docs/prod/stamps/web-BSM-v2.2.pdf
Oh, and you need to add one more wire to your DB-9 -- loop pin 6 to pin 7, that's what the IDE uses to detect "cable connected" (aka "Loopback test").
Does regulated, +5vdc go to VDD and ground to VSS?
yes you are correct, 5VDC on VDD and ground VSS.
SerialPort = serial('COM1');
fopen(SerialPort)
fscanf(SerialPort)
fclose(SerialPort)
Normally if you want a number output with DEBUG, you put '?' or 'DEC' in front of the variable of interest.
DEBUG DEC x, LF
When I try
DEBUG x, LF
I get a bunch of characters and symbols. Is there a way to convert these characters and symbols into numbers (not using the bs2 DEBUG, so I can perform faster samples)?
Thanks
' But, using SEROUT lets you use different baud rates (16864 is 9600 baud for the BS2) and send EXACTLY what you want to send.
Once you have mastered the serout on the stamp ... I wrote a few applications (some in VB6 and others in .NET) to log this data to a text or html file on a P.C ....also·if the html file was on a P.C running a webservice - (like abyss - free webserver) you could be updating real time to a log available on the internet ..
http://forums.parallax.com/showthread.php?p=640960
the latest version of the .NET application is available for download on that thread or here ...
www.igniteautomation.com/IA_Logger.html
Regards,
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'