Shop OBEX P1 Docs P2 Docs Learn Events
SRFO8 & labview or O-scope — Parallax Forums

SRFO8 & labview or O-scope

tehmoordartehmoordar Posts: 52
edited 2005-04-05 17:22 in BASIC Stamp
Hi All
I am working on this range sensor from Devantech--earlier I was using it on BS2 (successfully) and now I am trying to get the range from this sensor in to my labview code (labview 7.1) using DAQ card 6024.

I have the understanding that the SDA and SCL are working in synchronization. As SCL goes high every 65msec and data is transfered through SDA every 65 msec ( default).
Now as SCL goes high ping is emitted which strikes and comes back and the time that elapse between is registered in the SRF08 in binar code which is the transferred through SDA.

Now my problem is how to caculate the range and can I calculate time when the ping is emitted and when it is returned. Can I see or calculate in my labview code using daq card. Or can I calculate the time on O-scope.

Thankyou

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-01 21:13
    It seems like you're wanting to look at the inner workings of the SRF-08 -- you might want to contact Devantech about that. The SRF-08 waits for a "ping" command, sends the sonic burst, waits for the return, calculates the distance to target, then stuffs the distance into a register for retrieval by a "read" command. All this is transparent to the host controller. The SRF-08 actually does the calculations for you -- all you have to do is read the distance value from the appropriate register.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • tehmoordartehmoordar Posts: 52
    edited 2005-04-01 21:53
    Hi,
    yes we just have to read the right register--- but is there any way else beside using basic stamp editor environment to read the register. any other method of seeing what distance has been calculated by this sensor.


    CAn we set it some how that it read only the farthest obstacle.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-04-01 22:07
    You need to consult the documentation about registers -- it's all there.

    As far as reading the SRF-08 without a BASIC Stamp, I suppose it could be done if your software supports some sort of physical interface to an I2C bus and can send and receive data on that bus. To be candid, using the BASIC Stamp as the interface between your SRF-08 and LabView is probably the least complicated way to handle things.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • tehmoordartehmoordar Posts: 52
    edited 2005-04-05 17:22
    HI,
    as you said it is least complicated way of handling the data --- question is how lab view interact with sensor through I2c bus
    Thankyou
Sign In or Register to comment.