Shop OBEX P1 Docs P2 Docs Learn Events
Debug Terminal : transfer the received datas on a file .txt — Parallax Forums

Debug Terminal : transfer the received datas on a file .txt

bessetbesset Posts: 2
edited 2004-12-14 16:31 in BASIC Stamp
Hello !
I have a program wich use the Debug Terminal to·see datas (Basic Stamp 2).
When my program execution is finished, i would like to transfer the received datas on a file .txt
How can i do ?
Regards.
Laurent (France)

Comments

  • NewzedNewzed Posts: 2,503
    edited 2004-11-28 14:04
    If you use Hyperterminal instead of the debug screen, you can capture the data to an Excel file, where you can graph it, analyze it, or do anything with it you want to.· The debug screen MUST be closed before you open Hyper.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    New Combo LCD Backpack

    http://hometown.aol.com/newzed/index.html
    ·
  • agentileagentile Posts: 101
    edited 2004-11-28 19:04
    Sid,

    · If I want to get data from the hyper terminal (off of a stamp), can I use serout, and just match the baud rates and parity?



    thanks

    agentile
  • NewzedNewzed Posts: 2,503
    edited 2004-11-28 19:43
    Yes.· When you set up the Hyper connection, be sure it connects to whatever Comport your Stamp is on.· One more thing, Hyper does not recognize "cr" for a carriage return.· You will have to write:

    SEROUT 16, pin, baud, [noparse][[/noparse]data, 10, 13]

    10 and 13 are the ASCII characters for Line Feed and Carriage Return.· If you have any problems let me know.· I have used this procedure for years to capture data to Excel and have taught several people how to do it.· Excel can handle up to 65,000 rows and over 52 columns of data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    New Combo LCD Backpack

    http://hometown.aol.com/newzed/index.html
    ·
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2004-11-28 20:53
    Sid, Hyperterminal can add line feeds, it is an option:

    File/Properties/Settings/ASCII Setup/Append line feeds to incoming line ends

    I like to make it an option in my PBASIC programs too, with a bit flag. LF is sent if the flag is 1 or not sent if the flag is zero. That uses the "REP" modifier for DEBUG or SEROUT

    DEBUG "hello",CR,REP LF\LFb
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • NewzedNewzed Posts: 2,503
    edited 2004-11-28 21:43
    I know, Tracy.· I'm not sure how familiar he is with setting up Hyper so I just included it in the serout statement to make things easier for him.

    Sid
  • bessetbesset Posts: 2
    edited 2004-12-05 02:18
    Hello,

    You can use "Stamp Daq" for this project, this is free software.· Here is a link for more information:· http://www.parallax.com/html_pages/downloads/software/software_basic_stamp.asp .· Please make sure to scroll down to the Stamp Daq software, you will see an information file and a download file.· If you have any more questions please feel free to e-mail us.

    Regards,

    Dave

    Re:
    Hello !
    Thank you !
    It's a very good free software.
    It's exactly that I search·!
    Thanks !
    Regards

    Laurent Besset
  • agentileagentile Posts: 101
    edited 2004-12-14 02:01
    Sid,
    I have been using the code you sent on how to get hyperterminal to do a carriage return. Thank you. You said you have been using hyperterminal to write to excel files. Could you explain how to do that?

    thanks,
    agentile
  • NewzedNewzed Posts: 2,503
    edited 2004-12-14 15:04
    Agentile, here you are:

    Stamp Off.

    Open Excel.· Create a file.· Put a title of some sort at the top.· Save as a text file, data.prn.· .prn specifies a file delimited by spaces.· Close Excel.

    Open Hyper.· Click on Transfer/Capture text.· Browse to find the data.prn file you created.· Click on Capture.

    Stamp on.· Everything you see on the Hyper screen will be captured to the data.prn file.· When you have the data you want captured, click on Transfer/Stop.

    Close Hyper.· Stamp off.· Open Excel, click on data.prn.· You will be taken to a special screen where you can select the starting row, set your column width, and so.· When you are finished the data.prn file will appear with the captured data.· You can now edit Excel to get rig of the garbage and format the data any way you wish.

    This should do it for you.













    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    4 digit serial LED

    http://hometown.aol.com/newzed/index.html
    ·
  • agentileagentile Posts: 101
    edited 2004-12-14 16:31
    Sid,
    Thank you very much.

    agentile
Sign In or Register to comment.