Hi all,
I just started using CRbasic and RTDAQ with CR9000x (modules Cr9052IEPE) for data acquiring, but I don't understand the way how the memory allocation on the PC card works.
I have a PC card of 2GB. After I acquire data, the dat file size is only 961 kB but still the free memory on the PC card is shown to be only 143.36k (shown in File Control).
The sampling rate I used was 100usec, and the total duration of recording was 2.1671 sec. data type I used is IEEE4.
I have formatted the card before I used it for storing new files, so for each file I had 2GB available.
I don't understand how it takes almost all the available space for a file size of 961 kB?
Can I define the amount of memory of the card I want to use for a single table? How can this be done?
Thanks in advance
When you use CardOut in your table definition (DataTable in CRBasic program), then the entire
file size is allocated right before the first scan on program startup. The file will be pre-allocated
to take up the entire card (for auto-sizing which is typical). This enables faster write speeds, etc.
while the program is running. With newer dataloggers other than the CR9000X, an alternative is to use
the TableFile instruction with Option 64. However the CR9000X doesn't support option 64 in TableFile.
https://www.campbellsci.com/blog/store-datalogger-data-to-memory-card
https://s.campbellsci.com/documents/us/technical-papers/write-high-frequency-data-to-cf-cards.pdf
In order to control the size of the file created on the CRD, you need to specify a certain number of records
with CardOut (size parameter is the 2nd argument of the instruction) instead of auto-allocating (via size= -1)
Also remember that multiple tables may be using CardOut and all of them should be considered for their
needed space on the CRD device