Shop OBEX P1 Docs P2 Docs Learn Events
Questions about applying the PLX-DAQ code for real work outside of the examples — Parallax Forums

Questions about applying the PLX-DAQ code for real work outside of the examples

Buck RogersBuck Rogers Posts: 2,187
edited 2013-02-16 21:15 in BASIC Stamp
Hello!
I downloaded yesterday the PLX-DAQ setup. Loading the example sheet and running the macro was exactly as the help screens insisted. But running the demo got me thinking about applying the code to actual programming. For example in the help screens there is this one fragment:
[B][COLOR=#020FC0]SEROUT[/COLOR] sPin,Baud,[[COLOR=#ff0000]"DATA,TIME,TIMER,"[/COLOR], [COLOR=#020FC0]DEC[/COLOR] X, [COLOR=#ff0000]","[/COLOR], [COLOR=#020FC0]SDEC SIN [/COLOR]X[COLOR=#020FC0], CR[/COLOR]][/B]
[FONT=Tahoma][SIZE=2]         [B][COLOR=#020FC0]SEROUT[/COLOR] sPin,Baud,[[COLOR=#ff0000]"ROW,GET"[/COLOR],[COLOR=#020FC0]CR[/COLOR]][COLOR=#008000]                                           ' Request Row               [/COLOR]
[COLOR=#020FC0]         SERIN[/COLOR] sPin, Baud,200,TimeOut,[[COLOR=#020FC0]DEC[/COLOR] Row]                                [COLOR=#008000]' Accept returning data with timeout[/COLOR]
          IF Row >= 300 THEN [COLOR=#020FC0]SEROUT[/COLOR] sPin,Baud,[[COLOR=#ff0000]"ROW,SET,2"[/COLOR],[COLOR=#020FC0]CR[/COLOR]]      [COLOR=#008000]' If Row is or exceeds 300, set row back to 2
[/COLOR][/B][/SIZE][/FONT]

I then loaded the supplied example and discovered much the same methodology is used there.

After running the example once or twice, or was it three times, I came to the (probable) conclusion that the whole thing runs in much the same way as having the stamp send its data back to the IDE whilst it is running and then display the same data via the debug window.

But in all actuality, how to definitely apply that method to the programs that I would write? That is the question.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-02-13 07:25
    PLX-DAQ is a tool for getting data between a Stamp program and an Excel spreadsheet. The differences between that and the Stamp Editor's DEBUG window are that Excel will format the data for you, the Stamp program can fetch data from the spreadsheet, and you can write programs that run in Excel. How to apply that to the programs you would write? That depends on what you want to do. It is the question and you'll have to answer it for yourself. Excel is good at doing floating point and at computing some fairly complex functions. It can handle large arrays of data. It can do graphs and plotting. All of these things are done poorly by the Stamp, if at all. On the other hand, a Stamp can monitor hardware, change control signals, control external devices with protocols like SPI and I2C. Excel is not good at that so it's really a matter of dividing up tasks, letting Excel do what it's good at and likewise for the Stamp with PLX-DAQ acting as the glue.
  • Buck RogersBuck Rogers Posts: 2,187
    edited 2013-02-16 21:15
    Mike Green wrote: »
    PLX-DAQ is a tool for getting data between a Stamp program and an Excel spreadsheet. The differences between that and the Stamp Editor's DEBUG window are that Excel will format the data for you, the Stamp program can fetch data from the spreadsheet, and you can write programs that run in Excel. How to apply that to the programs you would write? That depends on what you want to do. It is the question and you'll have to answer it for yourself. Excel is good at doing floating point and at computing some fairly complex functions. It can handle large arrays of data. It can do graphs and plotting. All of these things are done poorly by the Stamp, if at all. On the other hand, a Stamp can monitor hardware, change control signals, control external devices with protocols like SPI and I2C. Excel is not good at that so it's really a matter of dividing up tasks, letting Excel do what it's good at and likewise for the Stamp with PLX-DAQ acting as the glue.

    Hello!
    Makes sense Mike. Lots of questions but my answers are outside of the forum.
Sign In or Register to comment.