Shop OBEX P1 Docs P2 Docs Learn Events
How to write more than one data at the same time in the datta logger? — Parallax Forums

How to write more than one data at the same time in the datta logger?

BERTARHBERTARH Posts: 3
edited 2010-02-16 20:19 in Learn with BlocklyProp
Hi! I wrote a question some weeks ago because I needed to store datas at a higger rate in the memory stick data logger.....I was not able to change the baud rate, so I tried modifying the code.....I changed this sentence
SEROUT TX, Baud, [noparse][[/noparse]"WRF", $00,$00,$00,$07,CR,DEC3 value, CR,LF,CR]
for this other one
SEROUT TX, Baud, [noparse][[/noparse]"WRF", $00,$00,$00,$07,CR,DEC3 value, CR,DEC3 value2,CR]

and this let me write 2 datas at the same time....I would like to write more datas togheter and, if possible, let some space between them....How could I change this sentence to do that? I know that it's probably an easy question, but I really dont know what shoul I change, cause I tried and it didnt work.....If you could help me it would be great.
Thanks!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-02-16 15:49
    Read the Vinculum firmware documentation (the chip used in the datalogger). This describes all the commands for the datalogger. You'll notice that the WRF command uses a 32-bit (4 byte) count of the number of bytes to be written to the datalogger. In your case, the count is seven ($00,$00,$00,$07). If you want to write more, make the count bigger and include the bytes to be written following the first CR. In your case, these bytes are produced by the "DEC3 value,CR,LF,CR". Note that you're probably having problems with your first example because the byte count you're using isn't the same as the number of bytes provided. In your second example, you've got 8 bytes, but the datalogger will ignore the extra CR at the end.
  • BERTARHBERTARH Posts: 3
    edited 2010-02-16 20:19
    Thank you!!1I changed it and it seems to work!!smile.gif
Sign In or Register to comment.