Shop OBEX P1 Docs P2 Docs Learn Events
Data Logging — Parallax Forums

Data Logging

ArchiverArchiver Posts: 46,084
edited 2002-09-26 14:35 in General Discussion
Hi all,

I have a potential application for a stamp. I wish to connect to the
serial port of another device (Allen-Bradley PLC) and log the data that is
being sent. It is a string of about 40 characters that is transmitted
every 30 seconds. I can set the baud rate down to a low of about 1200. I
need to log 3,000 sets of data. When 3,000 sets are reached, I need to
start at the beginning and overwrite the oldest data set. Kinda like a
FIFO. Periodically somebody will come by and hook up a laptop and press a
button to dump all the 3,000 data sets to Hyperterminal. I know the bulk
of this is doable with a stamp, but I am concerned about the amount of data
I need to store... 120,000 bytes. Can this be done? Can somebody
recommend some external, non-volatile memory that I should look at? If
somebody out there has developed a board to work with the stamp with this
much memory already on it, I would even consider purchasing it. I can
write the necessary code myself.

Power consumption is not an issue.

Finally, does anybody have an algorithm for conversion to/from a Julian date?

Regards,
Aaron

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-09-26 02:59
    Hi Aaron,

    not sure where you are from, but R T Nollet in Australia has a 1M bit
    module (128k bytes) that may suit your needs. I am using one for my
    data logging activities and it works great with any BS2.

    http://www.nollet.com.au/Memory_module_1Meg.htm

    Cheers
    Col

    --- In basicstamps@y..., "agarb@b..." <agarb@b...> wrote:
    > Hi all,
    >
    > I have a potential application for a stamp. I wish to connect to
    the
    > serial port of another device (Allen-Bradley PLC) and log the data
    that is
    > being sent. It is a string of about 40 characters that is
    transmitted
    > every 30 seconds. I can set the baud rate down to a low of about
    1200. I
    > need to log 3,000 sets of data. When 3,000 sets are reached, I
    need to
    > start at the beginning and overwrite the oldest data set. Kinda
    like a
    > FIFO. Periodically somebody will come by and hook up a laptop and
    press a
    > button to dump all the 3,000 data sets to Hyperterminal. I know
    the bulk
    > of this is doable with a stamp, but I am concerned about the amount
    of data
    > I need to store... 120,000 bytes. Can this be done? Can somebody
    > recommend some external, non-volatile memory that I should look
    at? If
    > somebody out there has developed a board to work with the stamp
    with this
    > much memory already on it, I would even consider purchasing it. I
    can
    > write the necessary code myself.
    >
    > Power consumption is not an issue.
    >
    > Finally, does anybody have an algorithm for conversion to/from a
    Julian date?
    >
    > Regards,
    > Aaron
  • ArchiverArchiver Posts: 46,084
    edited 2002-09-26 03:09
    As to the date conversion:
    http://mathforum.org/library/drmath/view/51907.html
    might help.

    This one might help even more:
    http://serendipity.magnet.ch/hermetic/cal_stud/jdn.htm

    -- Don


    --- "agarb@b..." <agarb@b...> wrote:
    > Hi all,
    >
    > I have a potential application for a stamp. I
    > wish to connect to the
    > serial port of another device (Allen-Bradley
    > PLC) and log the data that is
    > being sent. It is a string of about 40
    > characters that is transmitted
    > every 30 seconds. I can set the baud rate down
    > to a low of about 1200. I
    > need to log 3,000 sets of data. When 3,000
    > sets are reached, I need to
    > start at the beginning and overwrite the oldest
    > data set. Kinda like a
    > FIFO. Periodically somebody will come by and
    > hook up a laptop and press a
    > button to dump all the 3,000 data sets to
    > Hyperterminal. I know the bulk
    > of this is doable with a stamp, but I am
    > concerned about the amount of data
    > I need to store... 120,000 bytes. Can this be
    > done? Can somebody
    > recommend some external, non-volatile memory
    > that I should look at? If
    > somebody out there has developed a board to
    > work with the stamp with this
    > much memory already on it, I would even
    > consider purchasing it. I can
    > write the necessary code myself.
    >
    > Power consumption is not an issue.
    >
    > Finally, does anybody have an algorithm for
    > conversion to/from a Julian date?
    >
    > Regards,
    > Aaron
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you
    > subscribed. Text in the Subject and Body of
    > the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2002-09-26 03:30
    Re the Memory:

    A 16kB I2C EEPROM perhaps?

    Each cell in the EEPROM can be written to 1 million times before they wear
    out.

    At a rate of 40bytes every 30 seconds, it would take 4000 seconds to fill
    the EEPROM, or 4 x 10E9 seconds before the EEPROM wears out. Which, if my
    maths is right (and considering how bored I am at work right now - hence why
    I'm readung and replying to home emails..., so my maths could be wrong), is
    about, well a few years...



    > From: Don French <french_don@y...>
    > Reply-To: basicstamps@yahoogroups.com
    > Date: Wed, 25 Sep 2002 19:09:26 -0700 (PDT)
    > To: basicstamps@yahoogroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Data Logging
    >
    > As to the date conversion:
    > http://mathforum.org/library/drmath/view/51907.html
    > might help.
    >
    > This one might help even more:
    > http://serendipity.magnet.ch/hermetic/cal_stud/jdn.htm
    >
    > -- Don
    >
    >
    > --- "agarb@b..." <agarb@b...> wrote:
    >> Hi all,
    >>
    >> I have a potential application for a stamp. I
    >> wish to connect to the
    >> serial port of another device (Allen-Bradley
    >> PLC) and log the data that is
    >> being sent. It is a string of about 40
    >> characters that is transmitted
    >> every 30 seconds. I can set the baud rate down
    >> to a low of about 1200. I
    >> need to log 3,000 sets of data. When 3,000
    >> sets are reached, I need to
    >> start at the beginning and overwrite the oldest
    >> data set. Kinda like a
    >> FIFO. Periodically somebody will come by and
    >> hook up a laptop and press a
    >> button to dump all the 3,000 data sets to
    >> Hyperterminal. I know the bulk
    >> of this is doable with a stamp, but I am
    >> concerned about the amount of data
    >> I need to store... 120,000 bytes. Can this be
    >> done? Can somebody
    >> recommend some external, non-volatile memory
    >> that I should look at? If
    >> somebody out there has developed a board to
    >> work with the stamp with this
    >> much memory already on it, I would even
    >> consider purchasing it. I can
    >> write the necessary code myself.
    >>
    >> Power consumption is not an issue.
    >>
    >> Finally, does anybody have an algorithm for
    >> conversion to/from a Julian date?
    >>
    >> Regards,
    >> Aaron
    >>
    >>
    >> To UNSUBSCRIBE, just send mail to:
    >> basicstamps-unsubscribe@yahoogroups.com
    >> from the same email address that you
    >> subscribed. Text in the Subject and Body of
    >> the message will be ignored.
    >>
    >>
    >> Your use of Yahoo! Groups is subject to
    >> http://docs.yahoo.com/info/terms/
    >>
    >>
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and Body
    > of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2002-09-26 03:37
    Along these same lines, has anyone used something like
    multimedia, flashram type cards? If so, what are the
    connections?

    --- Ben <ben@l...> wrote:
    > Re the Memory:
    >
    > A 16kB I2C EEPROM perhaps?
    >
    > Each cell in the EEPROM can be written to 1 million
    > times before they wear
    > out.
    >
    > At a rate of 40bytes every 30 seconds, it would take
    > 4000 seconds to fill
    > the EEPROM, or 4 x 10E9 seconds before the EEPROM
    > wears out. Which, if my
    > maths is right (and considering how bored I am at
    > work right now - hence why
    > I'm readung and replying to home emails..., so my
    > maths could be wrong), is
    > about, well a few years...
    >
    >
    >
    > > From: Don French <french_don@y...>
    > > Reply-To: basicstamps@yahoogroups.com
    > > Date: Wed, 25 Sep 2002 19:09:26 -0700 (PDT)
    > > To: basicstamps@yahoogroups.com
    > > Subject: Re: [noparse][[/noparse]basicstamps] Data Logging
    > >
    > > As to the date conversion:
    > >
    > http://mathforum.org/library/drmath/view/51907.html
    > > might help.
    > >
    > > This one might help even more:
    > >
    >
    http://serendipity.magnet.ch/hermetic/cal_stud/jdn.htm
    > >
    > > -- Don
    > >
    > >
    > > --- "agarb@b..." <agarb@b...> wrote:
    > >> Hi all,
    > >>
    > >> I have a potential application for a stamp. I
    > >> wish to connect to the
    > >> serial port of another device (Allen-Bradley
    > >> PLC) and log the data that is
    > >> being sent. It is a string of about 40
    > >> characters that is transmitted
    > >> every 30 seconds. I can set the baud rate down
    > >> to a low of about 1200. I
    > >> need to log 3,000 sets of data. When 3,000
    > >> sets are reached, I need to
    > >> start at the beginning and overwrite the oldest
    > >> data set. Kinda like a
    > >> FIFO. Periodically somebody will come by and
    > >> hook up a laptop and press a
    > >> button to dump all the 3,000 data sets to
    > >> Hyperterminal. I know the bulk
    > >> of this is doable with a stamp, but I am
    > >> concerned about the amount of data
    > >> I need to store... 120,000 bytes. Can this be
    > >> done? Can somebody
    > >> recommend some external, non-volatile memory
    > >> that I should look at? If
    > >> somebody out there has developed a board to
    > >> work with the stamp with this
    > >> much memory already on it, I would even
    > >> consider purchasing it. I can
    > >> write the necessary code myself.
    > >>
    > >> Power consumption is not an issue.
    > >>
    > >> Finally, does anybody have an algorithm for
    > >> conversion to/from a Julian date?
    > >>
    > >> Regards,
    > >> Aaron
    > >>
    > >>
    > >> To UNSUBSCRIBE, just send mail to:
    > >> basicstamps-unsubscribe@yahoogroups.com
    > >> from the same email address that you
    > >> subscribed. Text in the Subject and Body of
    > >> the message will be ignored.
    > >>
    > >>
    > >> Your use of Yahoo! Groups is subject to
    > >> http://docs.yahoo.com/info/terms/
    > >>
    > >>
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed.
    > Text in the Subject and Body
    > > of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    > >
    > >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________________________
    Do you Yahoo!?
    New DSL Internet Access from SBC & Yahoo!
    http://sbc.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2002-09-26 03:41
    >amount of data
    >I need to store... 120,000 bytes. Can this be done? Can somebody
    >recommend some external, non-volatile memory that I should look at?

    A single 8-pin flash memory chip AT45D020 can hold 256 kbytes. Code here:
    http://www.emesystems.com/BS2flash.htm



    >does anybody have an algorithm for conversion to/from a Julian date?

    http://www.emesystems.com/BS2math4.htm#JulianDate

    >
    >Regards,
    >Aaron


    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2002-09-26 14:35
    Check out www.frontiertech.ca
    Open Source Software for Data Acquisition and Data Mining.
    Simply send XML encoded data out the serial port once per second.
    Frontier Data System software can capture the data, store it into a
    database, then search the data to deliver dynamic reports to your
    browser.

    It can be used to capture data from a microcontrollers and there is
    even a tutorial for doing data acquisition from a Allen-Bradley PLC
    via the HMI.

    Uses Linux, Apache, MySQL and PHP to provide a 100% open source
    solution.

    The XML RS232 output looks something like this. The idea is to hard
    code the XML tags and have the data values as variables.

    *<w,0,2>552</w,0,2><w,0,1>37846</w,0,1><w,0,0>32771</w,0,0><n,0,0>3200
    </n,0,0><n,0,1>502</n,0,1>$

    The string is sent to the client PC once per second. When the string
    changes records are created.

    Encoding Scheme

    *<Data Type,Station,Element>Value</Data Type,Station,Element>$

    Data Types

    b - Bit bit using 0 or 1
    w - Word encodes 16 bits using integer values between 0 and
    65535
    n - Number Number (float)

    Station

    0 to 255

    Element

    Bit 0 to 240
    Word 0 to 15
    Number 0 to 255

    Value

    Bit 0 to 1
    Word 0 to 65535
    Number -3.4E+38 to 3.4E+38

    For the rest of the discription chech out the online tutorials at
    frontietech.ca.




    --- In basicstamps@y..., "agarb@b..." <agarb@b...> wrote:
    > Hi all,
    >
    > I have a potential application for a stamp. I wish to connect to
    the
    > serial port of another device (Allen-Bradley PLC) and log the data
    that is
    > being sent. It is a string of about 40 characters that is
    transmitted
    > every 30 seconds. I can set the baud rate down to a low of about
    1200. I
    > need to log 3,000 sets of data. When 3,000 sets are reached, I
    need to
    > start at the beginning and overwrite the oldest data set. Kinda
    like a
    > FIFO. Periodically somebody will come by and hook up a laptop and
    press a
    > button to dump all the 3,000 data sets to Hyperterminal. I know
    the bulk
    > of this is doable with a stamp, but I am concerned about the amount
    of data
    > I need to store... 120,000 bytes. Can this be done? Can somebody
    > recommend some external, non-volatile memory that I should look
    at? If
    > somebody out there has developed a board to work with the stamp
    with this
    > much memory already on it, I would even consider purchasing it. I
    can
    > write the necessary code myself.
    >
    > Power consumption is not an issue.
    >
    > Finally, does anybody have an algorithm for conversion to/from a
    Julian date?
    >
    > Regards,
    > Aaron
Sign In or Register to comment.