You may already know that you can add external data storage to your datalogger with flash-memory cards. But do you know what kind of card you need—or if you even need one? In this article, I’ll answer these and other memory card questions. In a future article, I’ll discuss how to store your data to a memory card.
If you have a CR1000, CR3000, or CR6, your datalogger has 4 MB* of static random-access memory (SRAM), where the currently compiled program is stored along with some datalogger and communications settings. (*If you have a CR1000 datalogger with a serial number less than 11832, your datalogger has only 2 MB of SRAM.) Hence, there is approximately 3.7 MB of internal memory available for final data storage.
Now, 3.7 MB may not sound like a lot of storage room, but for many datalogger applications, this is ample room to store more than a year of data! For example, consider a weather station that stores averages of 10 variables (for example, air temperature, soil temperature, barometric pressure, wind speed, wind direction, precipitation, etc.) into three tables on 15-minute, hourly, and daily intervals. If we assume that these three tables are auto-allocated (that is, programmed to fill up at approximately the same time), it would take 1,533 days for these three tables to fill up 3.7 MB of space. That’s over 4 years! Of course, that’s in a perfect world where batteries never die and natural disasters never occur.
A general rule of thumb is that you should not store any more data than you can afford to lose before collecting it. In other words, if you can afford to lose a month’s worth of data, that’s how often you should collect data. So, although 3.7 MB is adequate for many datalogger applications, if you need to store high-frequency data, you may need to add external memory to your datalogger.
Tip: After a program is running, you can confirm the data fill times. In the Connect Screen of LoggerNet, click the Station Status menu item and then click the Table Fill Times tab.
When you are trying to determine your external versus internal memory requirements, the following are some variables to consider:
Let’s look at an example to put this into perspective. Imagine that you want to store 20 data points at 10 Hz. Thirteen of the data points will be stored in a low-resolution, two-byte format (FP2), and the other seven will be stored in a high-resolution, four-byte format (IEEE4). The DataTable/EndTable() instruction might look like this:
DataTable (Test,1,-1) DataInterval (0,100,mSec,10) ’10 Hz CardOut (0 ,-1 ) Sample (13,Var_One(),FP2) '13 low-resolution data points Sample (7,Var_Two(),IEEE4) '7 high-resolution data points EndTable
A time stamp and record number will be stored with every record, which account for 16 bytes of space. Your data will be collected from your datalogger after every eight hours of operation. How much data storage space do you need?
Based on the size of each data point and the storage interval for those points, you can calculate the bytes per record (in other words, bytes for each row of the data table). Then, based on the bytes per record, you can calculate the bytes per eight-hour period:
|Bytes per data-storage interval (10 Hz):|
|Low-resolution data||High-resolution data||Time Stamp/Record #|
|(13 datum) x (2 bytes/datum)||+ (7 datum) x (4 bytes/datum)||+ 16 bytes|
|= 70 bytes per storage interval or data record|
|Bytes per eight-hour period:|
|Bytes per record||Records/Second||Seconds/Hour||# of Hours|
|(70 bytes/record)||x (10 records/s)||x (3600 s/h)||x (8 h)|
|= 20,160,000 bytes or 20.16 MB between collections|
In this example, you need a minimum of 20.16 MB of space on your data storage device. Because your datalogger only has approximately 3.7 MB of internal memory available for final data storage, you need external data storage.
Note that this is a conservative estimate because, in most cases, the datalogger does not need to store a time stamp with every record. Rather, the datalogger support software data extraction routine uses a frame time stamp to calculate each record’s time stamp as it is stored to computer memory. (For more details, see the CRBasic Editor Help file for the DataInterval() instruction.)
If you have a CR1000 or CR3000, you can expand your datalogger memory using CompactFlash (CF) cards combined with a CompactFlash module (CFM100) or a CompactFlash module with a built-in Ethernet port (NL116). These CompactFlash modules connect to the 40-pin peripheral port on your datalogger.
If you have a CR6, your datalogger has a built-in microSD slot that accepts microSD cards.
Recommended for You: To learn more about the CFM100, NL116, CompactFlash modules, or microSD cards, visit our External Data Storage Devices web page.
Not all memory cards are created equal. There are two types of CF cards available today:
Industrial Grade CF cards are held to a higher standard; more specifically, they operate over a wider temperature range, offer better vibration and shock resistance, and have faster read/write times than their commercial counterparts.
There are also two types of flash memory:
SLC cards offer greater durability, reliability, and much faster read/write speeds (300% faster in write mode, and 43% faster in read mode) than MLC cards.
Note: Campbell Scientific only offers CompactFlash and microSD flash-memory cards with an industrial rating because they offer the benefits of SLC memory.
Recommended for You: To learn more about the types of CompactFlash memory and the differences between Industrial Grade and Standard Grade cards, read the “CF Card Information” technical paper. Also visit our web pages to see a list of CompactFlash cards and microSD cards that are well suited for applications in which Campbell Scientific data acquisition products are used.
This article focused on using memory cards to expand your datalogger memory for data storage and to back up your measurements. Another common use for memory cards is to store images or transport programs to the field without the need for a PC connection.
I hope this article has helped you to understand the following: how you can use memory cards to expand your datalogger memory, how not all memory cards are created equal, and why picking a memory card requires careful consideration. In a future article, I’ll provide information about how to store your data to a memory card.
If you have any questions or comments about memory cards, post them below.