Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CRBasic: MemoryTest on CR1000


JBecker Apr 7, 2009 12:38 PM

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


Dana Apr 7, 2009 03:49 PM

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


Dana Apr 7, 2009 04:55 PM

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


JBecker Apr 7, 2009 05:01 PM

hey, thank you very much for your fast response!

Johannes


jankue Jul 16, 2010 10:34 AM

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

Log in or register to post/reply in the forum.