Shop OBEX P1 Docs P2 Docs Learn Events
Writting propeller data to a file on my PC — Parallax Forums

Writting propeller data to a file on my PC

accmeintaccmeint Posts: 6
edited 2010-02-09 17:49 in Propeller 1
Hello,

I reciently bought a "prop plug" serial to USB converter in an effort to collect data from my propeller demo board and save to to file on my PC.· I downloaded the driver according to the instructions on the parallax web page but it dosn't seem to do anything.· Its loaded and working correctly according to the device manager but I dont understand· how or if I can use the "prop plug" to ultimatly save propeller data to a file on my PC.

Is there something that exists that can read data from the "Prop plug" and then understand my PC's file system enough to save the iincoming propeller data to a binary file on my PC?

Thank you for reading this.

Post Edited (accmeint) : 2/8/2010 8:24:52 PM GMT

Comments

  • MacGeek117MacGeek117 Posts: 747
    edited 2010-02-08 15:29
    Just so I understand; you need to read the program data on your Prop, and then save it to a file on your PC?
    Is far as I know, you would need to load a program into the RAM of your Prop and have it dump the data into a terminal on the PC end.
    Then copy the data into a text file.
    I know there are quite a few proficient PC programmers out here, one of them might be able to throw something together.
    MacGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BS2: $49


    SX48 Protoboard: $10

    Propeller Protoboard: Priceless

    www.apple.com

    www.parallax.com

    www.goldmine-elec.com

    www.expresspcb.com

    www.jameco.com
  • LeonLeon Posts: 7,620
    edited 2010-02-08 15:41
    Write a program using a UART (see Obex) to output the data to the Prop Plug, and capture it with a terminal emulator like the one supplied by Parallax. Then save the file to the PC hard drive.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-08 16:00
    If you have a demoboard then that already has a serial-usb converter, that is how you program the propeller.

    The FTDI chipset found on the demoboard, protoboard USB and on the prop stick allows your PC to see the usb port as a serial port. As Leon says there are objects for the propeller that allow serial output, you then just need a PC program to collect the data and save to disk. If you can program on a PC at all it is normally easy to find serial objects or libraries for this purpose or use a terminal as Leon mentioned.

    Graham
  • Brian RileyBrian Riley Posts: 626
    edited 2010-02-08 17:57
    accmeint said...
    Hello, I reciently bought a "prop plug" serial to USB converter in an effort to collect data from my propeller demo board and save to to file on my PC.

    ... am I missing something here? ... orrrrr, has everyone overlooked the statement "propeller demo board?"

    Why does accmeint need the Prop Plug? It is, in effect, already there on the demo board! Did he make a typo and meant to say "proto board?" ... but then he would have needed a Prop Plug or equivalent just to program it.

    I think some clarification is needed before a coherent solution can be formulated ...and then it should be not a lot more than opening P30/P31 in a cog doing high speed serial and bringing up PST or equivalent.


    cheers ... BBR

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    cheers ... brian riley, n1bq, underhill center, vermont
    The Shoppe at Wulfden
    www.wulfden.org/TheShoppe/
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-08 18:02
    Have you overlooked everything I wrote? [noparse]:)[/noparse]
  • accmeintaccmeint Posts: 6
    edited 2010-02-08 20:30
    Hello and thank you for the responses.

    I have both the "propeller demo board" and a "prop plug". I know that I can download from the PC to the propeller via USB but I thought I needed the "prop plug" to bring data in from the propeller and store if in files on my PC. I guess what I am missing is a program on my PC that that can read the USB port and write that data into a file. Does anyone know where I can find a program like that?

    Thanks
  • LeonLeon Posts: 7,620
    edited 2010-02-08 21:12
    All you need is a terminal emulator, as I said. The USB interface looks like a COM port to the PC.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • accmeintaccmeint Posts: 6
    edited 2010-02-08 21:58
    Thank you Leon,

    I have been playing with the terminal emulator function that comes with the propeller starter kit but it will only display or echo the propeller data onto its own terminal window. It dosnt have any setting to write the data it is receiving to a file.... So, Im half way there, I can get the data I want to my PC but I cant save it.

    Thanks for your time
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-08 22:10
    It is not a pretty solution but you should be able to copy and paste from the window of the parallax terminal program. There are also other programs out there that may be more suitable such as hyperterminal which was included with windows up to XP.

    There is a list of 3rd part emulators on the wikipedia page:

    http://en.wikipedia.org/wiki/Terminal_emulator

    Some are open source.

    Graham
  • LeonLeon Posts: 7,620
    edited 2010-02-08 22:11
    I thought it had that capability, I just checked and it doesn't. You will have to use a different program, I like RealTerm.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • John AbshierJohn Abshier Posts: 1,116
    edited 2010-02-08 22:13
    You can copy the data by left-click and drag to select. Then Ctl-C to copy. In your favorite editor do a Ctl-V to paste. I also paste into Excell. Another way is to use some other terminal that supports logging to a file. I just reread your original post. You mention binary data. That may cause problems if the binary data is what the terminal program uses for control.

    John Abshier
  • Michael O'BrienMichael O'Brien Posts: 55
    edited 2010-02-08 22:14
    Hi,
    The following links around the javax.comm library will help you in coding up a java based client (A .Net C/VB/C# client is possible as well using their libraries)
    I capture the output of a cog running FullDuplexSerial pushing data back to the PC and write (fprintf in C) it to the file system - this runs fine using the library on Window 7 under the latest 1.6.0 JRE from SUN (now part of Oracle).

    Java as a host for Propellers:
    For reference, here is a procedure to get the SUN javax.comm API working on Windows - thank you to Rick Proctor of MIT.

    References:
    Sun Java Communication API

    See the following tutorial by Rick Proctor for the Lego RCX Brick at
    http://dn.codegear.com/article/31915
    Prerequisites:
    Java Serial Support on Windows
    See "PC Serial Solution" for the Lego(TM) RCX Brick at the following URL at MIT
    - it explains how to get the SUN javax.comm API working on Windows (it is officially supported only on Solaris and Linux but works fine on Windows up to V7).
    http://llk.media.mit.edu/projects/cricket/doc/serial.shtml

    SUN Java communications API (1998-2004)
    http://java.sun.com/products/javacomm/
    - copy comm.jar and javax.comm.properties to both yourJDK and JRE lib directories
    - copy win32com.dll to both your JDK and JRE bin directories - no need for a registration via regsvr32
    - in your IDE (IE: eclipse.org) project add a library reference to comm.jar to get your javax.comm java code to compile

    thank you
    /michael
  • localrogerlocalroger Posts: 3,452
    edited 2010-02-09 01:26
    You can also use HyperTerminal, which comes with Windows (look under start -- programs -- accessories -- communications) you will have to go through some silly "set up a connection" BS (just give it a dummy name) before you can set the com port and baud rate you want to use; make those the same as what you're using with the prop serial terminal. Then once it's running, HyperTerminal has a "capture text" feature which will record everything it receives to a file.

    There many other solutions out there most of which work better and some of which are also free, but that's the one your computer comes with.
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2010-02-09 02:26
    Seems like I've been asking varriants on this allot lately.
    What's the update rate - how much data and how long is the sample period?
    I miss the old DOS days!
    COM1>Data.txt would do it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent!
    Send $1 to CannibalRobotics.com.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-02-09 02:29
    The Bray terminal program is FREE , easy to use , works great and has a logging function.

    sites.google.com/site/braypp/terminal

    Features

    * without instalation, only single and small .exe file
    * simple file send
    * character counter
    * baudrate up to 256kbps & custom baudrate
    * up to 20 com ports
    * log to file (hex & string)
    * transmit macros
    * scripting (with graph/visualization support)
  • fullspecengfullspeceng Posts: 76
    edited 2010-02-09 02:37
    FTDI's D2xx is really easy to use to write your own program if you know C++ and is far better than most comm objects. Search ftdichip.com for programming examples.

    Open the USB device, read the data to an array, use fwrite to write the array to a file.

    Done.
  • BradCBradC Posts: 2,601
    edited 2010-02-09 07:06
    CannibalRobotics said...

    I miss the old DOS days!
    COM1>Data.txt would do it.

    Variants on that still work in *nix based OS.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life may be "too short", but it's the longest thing we ever do.
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-09 15:49
    Drac uses TeraTerm with great success. Hyperterminal can be added to Vista (search the web for instructions).

    Andy also has a Terminal program with file transfer.

    Be careful that DTR on some of these programs cause the prop to reset.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • atlstangatlstang Posts: 20
    edited 2010-02-09 16:40
    I dont know if you guys care, but id thought i would add this anyway as i been working on something like this. I been working on a DAQ/datalogging component to my fuel controller im about to build for my car(trying to get G-G diagrams). Just prototyping/testing right now before building. I got the accelerometer datalogging to an SD card, then it sends the info back to the pc that is being captured by a little test python script i wrote. Its just a test script that listens to the port, prints info in the command window til an "EOF" string is sent by the prop and then saves everything to a file and exits.

    Its very simple, com port settings etc at the very top few lines. just need python 2.6 and pyserial module installed to run.
  • lonesocklonesock Posts: 917
    edited 2010-02-09 17:49
    This is also an option (though not a lightweight one) for Excel users:

    www.parallax.com/ProductInfo/Microcontrollers/PLXDAQDataAcquisitiontool/tabid/393/Default.aspx

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
Sign In or Register to comment.