Hi, we have a curious error we can't fathom the reason for, excepting for a software bug or a programme error we can't find.
Logger:CR3000
Card reader and 256 card.
3xSD-CD16ACM
In our data records where we have a write over data table to store some last known values that change due to rain or water applications. This is so when we re-upload the programme we reinsert those values as a start point for continuation. Now dispite setting both record number sizes to 1 in the logger and the card when I look at the table allocations the card position reports 1 and the logger 12 locations.
When I download the data I see 12 or up to 12 records depending how long it has been running.
I noticed the -1000 command in the help section to set the card out as the logger, however I don't don't see why it makes a difference unless this is a bug and the -1000 is a get around.
Heres the section out of our programme.
DataTable (CriticalTTP,WatApp OR IfTime (10,1440,Min),1)
CardOut (0 ,1)
Sample (12,Target(),FP2)
Sample (12,Tally(),IEEE4)
Sample (12,PercentileAcum(),FP2)
EndTable
* Last updated by: Nigel on 5/19/2009 @ 7:40 PM *
Nigel,
Fixing the number of records in your DataTable and CardOut instructions sets the minimum number of records to be stored. It is not an exact number. What you are seeing is not a bug or program error.
Regards,
Janet
Sorry to sound picky, although I see that having more memory allocated that is left over can be good, the fact remains your help does not describe this fact of allocating left over memory to all, even fixed sizes.
I quote from help on datatable allocation size.
Size
Defines the size of the DataTable. Size can be defined as a fixed number of records or as auto-allocate. To set the table size to a fixed number of records, enter that value. To set the size to autoallocate, enter a -1. If a table is set to auto-allocate, all memory that remains after creating fixed-sized tables will be allocated to this table. If multiple DataTables are declared with a -1 for size, the available memory will be divided among the tables. The datalogger attempts to allocate memory to the tables so that all tables are filled at the same time.
For CardOut only: Enter -1000 to set the size of the data table on the card to the size of the data table in datalogger memory.
Type: Constant (or expression that evaluates as a constant)
I read, and our main programmer with 20 years datalogger programmming experience reads the same into this. Fixed allocations is fixed, -1 allocations is auto allocated amongst themselves once the fixed are set.
You might need to alter the help to describe what is happening or can happen in this case.
In this case we just wanted one record for a specific reason.
* Last updated by: Nigel on 5/21/2009 @ 3:31 PM *
A point of clarification is needed here. When you use the datatable instruction alone the number of records entered does specify an exact number of records in the dataloggers main memory, i.e. one is only one record.
However, in a memory card, memory is used up in blocks of sectors/frames and I believe for the sake of not wanting to waste memory you will get the number of records you specify in cardout plus any extras that will fit in the rest of the same "memory frame". This could probably do with some extra clarification in the help system.
So if the cardout instruction is used in the program then the logger will report the larger number (i.e. number of records up to the end of frame), as being the number of available record space.
So if you only want a datatable with a fixed limited number of records do not use the cardout instruction. If you need to have that table written to the card, then you could also look at the Tablefile command that lets you write files of fixed length to the card.
* Last updated by: aps on 5/26/2009 @ 11:24 AM *