Shop OBEX P1 Docs P2 Docs Learn Events
Creating custom waveforms from an existing waveform — Parallax Forums

Creating custom waveforms from an existing waveform

lnielsenlnielsen Posts: 72
edited 2010-01-02 07:14 in Accessories
I got my PropScope this Christmas and I am still getting use to it.

I wanted to play with the custom waveform generator. I thought it would be very practical to take an existing waveform saved on from the oscilloscope and load it into the custom generator then I could modify it as I wanted but so far no luck. The Oscilloscope save files have 300 data points and the waveform generator uses 600. I also got an error about a bad index value.

I will create some waveforms in Excel and try importing them but I still think there should be an easy way to copy an existing waveform into the generator.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
BioProp: Robotics - Powered by Bioloids and controlled by the Propeller

Comments

  • lnielsenlnielsen Posts: 72
    edited 2009-12-30 01:32
    It seems like the first line with dashes is required for the input file. When I remove them I get an error but it with them my excel generated text file works.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BioProp: Robotics - Powered by Bioloids and controlled by the Propeller
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-12-30 05:36
    I've also been playing with waveform generation on the Propeller with the Propscope.
    (Although I hadn't thought about importing them from something like Excel.)

    Would others find it useful to have a prop-based waveform generation program?

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • lnielsenlnielsen Posts: 72
    edited 2009-12-30 16:37
    Here are some custom waves I created in Excel. The easiest way to import these into PropScope is to highlight the first two columns and copy/paste into Notepad and then save as a .txt file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BioProp: Robotics - Powered by Bioloids and controlled by the Propeller
  • HannoHanno Posts: 1,130
    edited 2009-12-30 20:56
    Great to see people digging deeper into the scope's capabilities. Sorry about the length mismatch- will be fixed in 1.04 release...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • mikedivmikediv Posts: 825
    edited 2009-12-30 21:21
    lnielsen that's awesome can I ask you though I am not clear on how you load them into the propscope , You build the table in Excel then cut and paste it to notepad and save it as a file "custom".TXT then load into propscope??
    Does the file have to be a TXT file?? Thanks
  • lnielsenlnielsen Posts: 72
    edited 2009-12-31 00:24
    mikediv,

    On either the Oscilloscope or Analog tab there is a Generator widget on the right in the middle. Select "Custom" and "edit" and it opens up a window to design a waveshape in. There are also buttons in that window to load or save a waveform that you created. It looks like you can use a CSV or TXT file but TXT seems to be the default. Since the spreadsheet has multiple worksheets, it is easier to cut/paste the data into Notebook to create a txt file. Just highlight the first two column headers (A & B) and select copy. Open a blank file in Notebook and select paste and save it. When you are done it should look like the TXT file attached Click "Load" and select this file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BioProp: Robotics - Powered by Bioloids and controlled by the Propeller
    823 x 742 - 129K
  • hover1hover1 Posts: 1,929
    edited 2009-12-31 01:00
    Great Tip!

    Jim

    We may have to·have a sticky for things like this!
    lnielsen said...
    mikediv,

    On either the Oscilloscope or Analog tab there is a Generator widget on the right in the middle. Select "Custom" and "edit" and it opens up a window to design a waveshape in. There are also buttons in that window to load or save a waveform that you created. It looks like you can use a CSV or TXT file but TXT seems to be the default. Since the spreadsheet has multiple worksheets, it is easier to cut/paste the data into Notebook to create a txt file. Just highlight the first two column headers (A & B) and select copy. Open a blank file in Notebook and select paste and save it. When you are done it should look like the TXT file attached Click "Load" and select this file.

  • mikedivmikediv Posts: 825
    edited 2010-01-02 01:09
    lnielsen Thank you ,, Yeah I am with hover we should have ask Parallax to make the real meat and potato stuff to be a sticky... Oh lnielsen I went to your website how do you register??? and what is a bioloid?
  • lnielsenlnielsen Posts: 72
    edited 2010-01-02 02:59
    Mikediv,
    BioProp is a once and future project of mine. It uses the Bioloid robot development kit by Robotis: http://en.wikipedia.org/wiki/Robotis_Bioloid, http://www.crustcrawler.com/, http://www.tribotix.com

    The servos are intelligent actuators and communicate at 1Mbps which is perfect for the Propeller. Crustcrawler maintains a Propeller object for communications. http://forum.crustcrawler.com/phpBB3/viewtopic.php?f=12&t=1050

    My other project·is speakers based on Siegfried Linkwitz's Pluto design http://www.linkwitzlab.com/Pluto/intro.htm·but that is even further off topic...

    I still think we need a way to capture an existing waveform and import it into the generator so we can modify it and replay it at will. (Maybe you will want to add a noise spike into an existing signal) I tried saving my FunWave but it is impossible to make it "full size" so I would have to cut it out of the save file which means it only has around 100-150 samples. There has to be a better way.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BioProp: Robotics - Powered by Bioloids and controlled by the Propeller
  • HannoHanno Posts: 1,130
    edited 2010-01-02 07:14
    Hi lnielson,
    The generator algorithm interpolates between the imported samples so 600 samples are shown and will be used at low frequencies. If you provide more or less, it'll take care of it. I did fix one off-by one error so for particular sample numbers it'll currently give you an error. I'm off for 7 days but will have a 1.04 release at that point.
    Feel free to provide additional feature suggestions in the mean time...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
Sign In or Register to comment.