Shop OBEX P1 Docs P2 Docs Learn Events
How to control Sampling Rate and how to record data continously — Parallax Forums

How to control Sampling Rate and how to record data continously

luisferluisfer Posts: 12
edited 2014-01-03 07:39 in Accessories
Hi,

I would like to know how could I change the sampling rate of the PropScope in order to get the maximum sampling rate in all the timescales.
I need to know as well how could I record data continously, not to get 1024 points every x time. I would like to save datas during 10 seconds without stoping.

Thank you

Luisfer

Comments

  • HannoHanno Posts: 1,130
    edited 2011-03-03 21:26
    Hi Luisfer,
    The PropScope supports two modes: sampling and streaming. When the timescale is slow enough (I think slower than 20ms/div) to continuously send all samples over the usb connection, then PropScope goes into "streaming" mode, where you see all samples moving from right to left. Of course you can pause the acquisition at any time or otherwise change acquisition options.

    When you set the timescale knob to a faster timescale, the scope will take a set of samples and transfer them to be displayed. The sampling rate is calculated to return 20 divisions of data- a bit over 1024 samples. This lets you pause and then scroll back/forth up to 2 screens- or zoom in/out. Maximum sampling rate is 25MSPS.
    Hanno
  • luisferluisfer Posts: 12
    edited 2011-03-10 02:34
    Thanks Hanno, but I asked a different thing.
    I understood how works the PropScope, but my question might be, how could I change this way of work?, and if I am able get the proper software in order to be able to get samples during, let's say, a few seconds in a faster scale than 20ms with the maximum sampling rate.
    I am working in a student project and I need to get the real software to modify it.
  • HannoHanno Posts: 1,130
    edited 2011-03-12 23:29
    Hi Luisfer,
    I'm still not sure you need to change anything- please state exactly what you want the scope to do.
    PropScope electronics are open-source- however, the application and firmware are not.
    Hanno
  • JasonDorieJasonDorie Posts: 1,930
    edited 2011-03-18 18:25
    If I'm not mistaken, in order to achieve the high sample rates of the PropScope, data is captured into multiple cogs at one time, and then interleaved into main memory, or, possibly the data is simply read & written directly into main memory as it is sampled, without a loop at all. It probably varies based on the speed of the sampling. In any case, at high speed, the number of samples is limited by the about of cog memory (512 32-bit values), as the cogs will either hold the sampling instructions, or the samples themselves.

    At lower speeds, it would be possible to use a loop and write the samples directly to hub ram, which would limit you to a maximum possible 32Kb of samples, minus code space. The Propeller chip does not have access to enough RAM to take several seconds of samples at maximum speed. If the samples were 8 bit, 3 seconds at 25 million samples per second is 3 megabytes of ram.

    In short, there's a good chance the PropScope is not technically capable of what you want it to do.
  • HannoHanno Posts: 1,130
    edited 2011-03-18 19:06
    Well said Jason!
    Yes, the Propeller's hardware, like anything else, puts limitations on what can be done. Main issues are the Propeller's speed, memory size and USB connection speed. The PropScope actually uses 2 10bit ADC's- and samples all 32bits every sample. So it's filling memory at up to 25*4=100MB or 800Mbit/sec. My other product, ViewPort doesn't allow trigger AFTER the samples have been taken- but does sample all 32bits at up to 100Msps- for a data rate of 400MB or 3.2Gbit/sec. The Propeller is very powerful!
    Hanno
  • luisferluisfer Posts: 12
    edited 2011-04-06 08:14
    Thanks for all the information.

    The other question I had was, How can I control the Propscope working with LabView?
  • HannoHanno Posts: 1,130
    edited 2011-04-06 15:51
    Hi Luisfer,
    PropScope has a DDE server built in. You can use DDE clients like Labview, Excel, Matlab or programs written in .NET, python to read and write data to/from the PropScope. It does take a fair bit of work, but it's fairly flexible, some info is here:
    http://hannoware.com/viewport/clients.php
    Hanno
  • DJJohnson70DJJohnson70 Posts: 10
    edited 2013-12-13 07:40
    Hanno wrote: »
    Hi Luisfer,
    The PropScope supports two modes: sampling and streaming. When the timescale is slow enough (I think slower than 20ms/div) to continuously send all samples over the usb connection, then PropScope goes into "streaming" mode, where you see all samples moving from right to left. Of course you can pause the acquisition at any time or otherwise change acquisition options.

    When you set the timescale knob to a faster timescale, the scope will take a set of samples and transfer them to be displayed. The sampling rate is calculated to return 20 divisions of data- a bit over 1024 samples. This lets you pause and then scroll back/forth up to 2 screens- or zoom in/out. Maximum sampling rate is 25MSPS.
    Hanno
    I have slowed down the time base to 20ms/div, then 50, 100, 200, 500, and even 1 second and I never seem to get continuous data (data only saves every 10 seconds, and the count always resets to 0 after 1023). How do I get continuous data and know that there are no gaps/overlaps? I am using version 2.0.5. Thanks, Dan.
  • HannoHanno Posts: 1,130
    edited 2013-12-17 16:05
    At 1 sec/division you should see the signal slowly moving across the screen- like in an '80's video game. This means you'll see all measurements. At 1us/div, you only see 10us of samples taken very quickly, this means there are gaps in your data.
    Try the latest here: http://forums.parallax.com/showthread.php/123627-Latest-PropScope-software
  • DJJohnson70DJJohnson70 Posts: 10
    edited 2014-01-03 07:39
    I have installed 2.0.7, which is fantastic overall. Thanks!!. Streaming is still an issue. At 50ms/div and 100ms/div the signal scrolls across the screen. At faster speeds, every couple seconds the screen 'refreshes' with a new data set. When I try to stream output at speeds where data scrolls instead of refreshes, it only captures 1024 samples every 10seconds. Even though the data is streaming, the save to file does not capture all data. It appears that the buffer is 1024 data points. It saves the buffer every 10seconds (which cannot be made shorter) to a file. I know every data point is present when running at 50ms/div, but I am unable to get it to save 'continuously' (write the next 1024 data points when the buffer has all new data). Is there a way to change the "10 seconds" to another value, or make it "continuous" at slower speeds?
Sign In or Register to comment.