Shop OBEX P1 Docs P2 Docs Learn Events
Scrolling the screen: watching data with the PLX-DAQ and Excel — Parallax Forums

Scrolling the screen: watching data with the PLX-DAQ and Excel

ElectricAyeElectricAye Posts: 4,561
edited 2008-08-15 18:54 in Propeller 1
Howdy,
I'm planning on using a Prop to make measurements and record the data onto an Excel sheet using the PLX-DAQ.
I would like the last row of Excel data (the latest data read) to always be visible on the computer screen.
Anybody out there know how to make that happen? Would it be a command used in spin or something done on the Excel side?

thanks a heap,
Mark

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-08-14 22:50
    Hello Mark,

    oh there are so many ways to do this

    you could do something like this

    prop sends out a defined columm with an incremented number
    i.e number=2100
    I assume the values are between 0 and 999

    add a columm that multiplies that number with 10^6 and adds the measured value (i.e. value=847)

    result 2.100.000.847

    Let's say the results were in columm "C"
    put into one cell the function max(C1:C64000)
    this catches always the last value
    next is a cell substracting the big number
    2.100.000.847 - 2.100.000 = 847

    i took a short look into the PLX-DAQ.spin-file

    this provides several commands sended by the prop to the PLXDAQ to set the excelsheet to a defined cell or to send a message
    which will be shown PLX-DAQ control

    Pub Msg(stringptr)
    {{
      Sets a text message in the PLX-DAQ control          
      PLX-DAQ String: MSG,hello                           
     ┌────────────────────────────────────────────────┐    
     │ PDAQ.Msg(string("Hello"))                      │    
     └────────────────────────────────────────────────┘    
    }}
        Serial.str(string("MSG,"))
        Serial.str(stringptr)
        CR
    
    
    Pub USER1Label(stringptr)
    {{
     Sets the User1 checkbox in the control to string specified  
     PLX-DAQ String: USER1,LABEL,Check me!                      
    ┌────────────────────────────────────────────────┐           
    │ PDAQ.User1Label(String("Check me!"))           │           
    └────────────────────────────────────────────────┘           
    }}
       Serial.str(string("USER1,LABEL,"))
       Serial.str(stringptr)
       CR
     
    
    



    so start playing with it and you will get it

    best regards

    Stefan
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-08-15 14:35
    Thanks, Stefan, for your inputs on this.
    I don't think using PDAQ.Msg would do me any good because I'd like to be able to look at a long row of data on the Excel spreadsheet, plus the most recent 10 or so rows of data above it. PDAQ.Msg sends a little message to the controller box that "floats" above the Excel sheet during operation.
    Your other suggestion still has me in a fog. I'm not a veteran Excel user, so I guess I'll finally have to actually break down and learn how it really works (darnit).
    I'm new to the Propeller, too, so you are casting pearls before noobs.

    I'm working on it, though.

    thanks again,
    Mark
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-08-15 18:54
    Hello Mark,

    i have another idea.

    If you receive the data from the prop to a terminalsoftware that can write the received data to a textfile
    you will see always the latest data on the screen.

    For easy importing the data to excel you simply format the data with TAB or semicolon. Between each string that should be placed in
    its own columm in excel send a TAB ($08) or a semicolon or comma. Excel can import CSV-Textfiles (comma-seperated-values)

    Here is a terminalsoftware that can log the data to files

    best regards

    Stefan
Sign In or Register to comment.