Announcement

Collapse
No announcement yet.

High speed analog guestion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • High speed analog guestion

    I've been trying to figure out the analog high speed function and the example in the manual is a little confusing, or is it me?
    In the example is shows :


    Code:
    var x[100]; // Buffer for IO1buf
    var b[100]; // Buffer for IO2buf
    var c[100]; // Buffer for IO3buf
    // 1000 samples a second, 10000 samples to be collected from 3 channels
    ana_HS(1000, 10, a, b, c, 0, myFunc);
    func myFunc() //do something once samples collected
    Endfunc
    Syntax
    ana_HS(rate, samples, IO1buf, IO2buf, IO3buf, IO4buf, userFunction);
    Description
    Collects "samples" samples at "rate" frequency for 0 to 4 analogue pins and calls "userFunction" when done.
    "rate" is samples represented as 1/100 samples per second, up to 250,000 reads/second across 1-4 channels.
    For example if you wish to sample at 5000 samples per second, you would set rate to be 50 as 5000 * 1/100 = 50.
    The first argument is rate. The example shows 1000 for 1000samples a sec, but the desc states rate should be * 1/100 which would be 10.
    The second argument is samples and it says 10000 but the example shows 10.

    Is it me or is something not quite right here?
    Does the 10 mean 10000? ie: 10000 * 1/1000?
    Should the rate be 1000 or 10 (1000 * 1/100)?
    I am confused

  • #2
    Hi,

    Sorry for the confusion. In the comment, it should be:

    Code:
    // 1000 samples a second, 10 samples to be collected from 3 channels
    ana_HS(1000, 10, a, b, c, 0, myFunc);
    Thank you for pointing that out.

    Best Regards,
    Kevin

    Comment

    Working...
    X