Shop OBEX P1 Docs P2 Docs Learn Events
PING))) to PLX-DAQ — Parallax Forums

PING))) to PLX-DAQ

LuisMuratallaLuisMuratalla Posts: 3
edited 2012-05-27 21:02 in Accessories
Hello,
I am a complete beginner to this however it seems that I am missing something. I am simply trying to output my time variable to Excel however my code (below) does not seem to work. I have read the help file that came with PLX-DAQ and I have been able to output date and time however I have not been able to output my time variable. I have tried playing with all the variables Pause, time nothing seems to work.

Works = DEBUG "DATA, TIME, TIMER,", CR
Doesn't work = DEBUG DEC5 time, CR

Can you help me understand why I can't output from my PING))) sensor to Excel?

' PingTest.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM4}
time VAR Word


DO
PULSOUT 15, 5
PULSIN 15, 1, time
time = time ** 2251
DEBUG DEC5 time, CR
'DEBUG "DATA, TIME, TIMER,", CR
PAUSE 100
LOOP

Comments

  • LuisMuratallaLuisMuratalla Posts: 3
    edited 2012-05-27 20:59
    I got it to work! In case any super noob's are out there here is the new code:
    ' PingTest.bs2
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    ' {$PORT COM4}
    time VAR Word


    DO
    PULSOUT 15, 5
    PULSIN 15, 1, time
    time = time ** 2251
    DEBUG "DATA,", DEC5 time, CR
    'DEBUG "DATA, TIME, TIMER,", CR
    PAUSE 100
    LOOP
  • LuisMuratallaLuisMuratalla Posts: 3
    edited 2012-05-27 21:02
    Now I don't know how to change the status to solved
Sign In or Register to comment.