Hello,
we would like to use the "MemoryTest()" instruction in our measurement systems on startup to perform a memory test.
Datalogger is CR1000 or CR850 OS15/OS16.
If I use the following code, depending on CR-Basic- Help:
'---------------
Public Memory
BeginProg
MemoryTest(Memory)
EndProg
'-------------------
the CR1000 cannot compile the program and says "Variable Memory out of bounds".
When I define Memory as an array, it is working:
'---------------
Public Memory(5)
BeginProg
MemoryTest(Memory)
EndProg
'-------------------
My question is, what are those 5 values?
I compared the values to the values in the Status Table:
Memory(1): should be Result of Memory-Test (=0,1,2,3) (?)
Memory(2): seemed to be MemorySize
Memory(3): seemed to be MemoryFree
Memory(4): ?? Don't know
Memory(5): ?? Don't know
Is there anybody who could help me in this topic?
Thank you in advance,
Johannes Becker
MemoryTest was developed to be used by our production team only. That's why you won't see it in the list of instructions, though it is documented in the help file.
It looks like additional return values have been added to the instruction since it was first documented. I don't know what those values are, but I'll check with Engineering.
Regards,
Dana
The array returned by MemoryTest is as follows:
Array(1): memory test return code. Note these are different than what's documented in the help (that will need to be changed).
0 = success
1 = SRAM memory write failure
2 = OS signature failure
3 = Serial FLASH failure
Array(2): SRAM memory size.
Array(3): bytes of SRAM memory available for testing. This is the available memory not used by the OS and the program.
Array(4): bytes of FLASH memory occupied by the operating system.
Array(5): increments as each of the various tests completes. Should end at 13.
Dana
hey, thank you very much for your fast response!
Johannes
Hi,
referring to this older thread a similar questions comes up: The MemoryTest(3)-value gives the memory size free for storing the measured data, is this a correct interpretation? Is there a possible way to see the free memory size which is actually available for new data, that means also included the already stored measurements? Or the other way round, to see, how much memory space is free until it starts to override from the beginning?
Thanks in advance,
best regards,
jankue