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.

Separate Task using CR10x and PC208 Soft.


Adrian Sep 30, 2009 06:22 PM

Hi, I want to do the same like http://www.campbellsci.com/forum/messages.cfm?threadid=5CDA2CC2-FC6F-52D0-CEB824474A064916 but using a CR10x datalogger.

The program on use for routine measurements is like:


;{CR10X}
;
*Table 1 Program
01: 1 Execution Interval (seconds)


--cut

8: Z=X*F (P37)
1: 5 X Loc [ CM11 ]
2: 117.924 F
3: 10 Z Loc [ EnCM11 ]


--cut

10: If time is (P92)
1: 00 Minutes (Seconds --) into a
2: 10 Interval (same units as above)
3: 10 Set Output Flag High (Flag 0)

11: Real Time (P77)
1: 1110 Year,Day,Hour/Minute (midnight = 0000)

--cut

16: Totalize (P72)
1: 1 Reps
2: 5 Loc [ CM11 ]

--cut


18: Do (P86)
1: 20 Set Output Flag Low (Flag 0)


--cut

whith six sensors.

And I add the next piece of code :

*Table 2 Program
02: 1 Execution Interval (seconds)

1: If (X<=>F) (P89)
1: 10 X Loc [ EnCM11 ]
2: 3 >=
3: 1100 F
4: 10 Set Output Flag High (Flag 0)

2: Set Active Storage Area (P80)
1: 2 Final Storage Area 2
2: 0 Array ID


3: Sample (P70)
1: 1 Reps
2: 10 Loc [ EnCM11 ]


4: Do (P86)
1: 20 Set Output Flag Low (Flag 0)


To store values from EnCM11 over 1100. I want to keep the rutine untouched (and the asociated file, "cr10x1")and the values eventualy over 1100 on EnCM11 are recorded on the storage area 2, and asociated file "cr10x12".

Compiling the program with Edlog I set on Options->Final Storage Area 2-> Final storage area 2 locations = 500.

and the program show:

-Mode 4-
-Final Storage Area 2-
500

Question: Is that the rigth way to alocate memory?
I'm looking for something like : DataTable( Tablename, True, 500), crbasic function.

Question 2:There's a way to know the memory capacity and "table memory allocation" with pc208 soft or I need use LoggerNet instead?

Question 3: Is the "set output flag low" necesary in each case?

If you need the entirely code, let me know, I cut it for brevity.

Thanks, Adrian.

* Last updated by: Adrian on 9/30/2009 @ 12:23 PM *


jra Sep 30, 2009 09:19 PM

Adrian,

Almost everything looks okay to me. In your P80 FS2 instruction you will want to assign an array ID in that second parameter. Something like this:
1: Set Active Storage Area (P80)
1: 2 Final Storage Area 2
2: 2001 Array ID

Question: Is that the rigth way to alocate memory?
I'm looking for something like : DataTable( Tablename, True, 500), crbasic function.

Yes, this allocates memory to Final Storage Area 2. For your CR10X that number is the number of data points, that includes your time stamp and array ID. Count all the values between the commas each value counts as one data point or final storage location. A typical CR10X has about 62,000 data points.

Question 2:There's a way to know the memory capacity and "table memory allocation" with pc208 soft or I need use LoggerNet instead?

When you compile an Edlog program two additional files will be created, *.fsl and *.pti. At the bottom of the pti file is an estimate of final storage locations per day. That will be an estimate because the datalogger doesn't know how often you'll be writing the conditional output.

Question 3: Is the "set output flag low" necesary in each case?

No.


Hope that helps. As always try your program in the office. Collect data and see if it does what you need it to do.

Let us know if you have more questions.
Janet


Adrian Oct 6, 2009 12:53 AM

Janet, thanks a lot for your answer and sorry for the delay in my response. We are having Internet conection troubles in the lab and I'm writing from home now.


Because, at first, I didn't know how exactly Array Id works, I used the default value.
I'll take care the next time. I really apreciate the recomendation.

I want to know how many days between data collection can stand without memory overwrite.

I calculate this:

For Array ID 110
10 memory locations used (20 Bytes),
Totalize value stored every 10 minutes -> 1440 memory locations used per day.

For Array ID 120
5 memory locations used (10 Bytes),
Battery status value saved at midnight -> 5 memory locations used per day.

For Array ID 201
500 arrays reserved in storage area 2,
5 memory locations each array,
2500 memory locations.

Total memory locations in the cr10x datalogger -> 62280.
Total - memory locations for Array ID 201 = 59780.

59780 memory locations for storage area 1.

59780/1445 = capacity to hold Array ID 110 and 120 = 41.37 days,

Questions:

1) Is the calculation correct? The size used for array ID 201 automatically re-allocate the storage area 1 in that way?

A typical CR10X has about 62,000 data points.

2)The total data points value, 62280 for Final Storage you mention. Is default for all cr10x internal memory? Does the optional flash memory come like a peripheral or is internal too? The cr10x was in the lab before me.

I started to work with a CR1000 and now have to translate the job to the cr10.


There's a way to find out with PC208w 3.1 soft?

Kind regards, Adrian.


Dana Oct 7, 2009 08:27 PM

Hello Adrian,

First, you may want to take a look at page 1-7 in the CR10X manual that provides a breakdown of memory allocation in the datalogger:

http://ecatalog.campbellsci.com/doctool/docs/cr10x_2-03.pdf

As indicated by this chart, if you have extended memory, you will get 524,288 final storage locations (data values) per meg of memory. That means if you have a 2M datalogger, you will have the original 62,280 final storage values, plus 524,288 * 2. If my calculator is working right, that means you have roughly a million final storage values (1,110,856). The caveat to this is, as noted in the manual, the maximum number of final storage locations for FS1 is 983,040.

The 1 million final storage location is shared between both final storage locations. That means if you reconfigure the datalogger to have 5000 final storage locations in area 2, you'll be taking away 5000 final storage locations from area 1.

As Janet suggests, an easy way to determine the number of final storage locations used per day is to look at the value returned by the FSL file. This is an ASCII file -- it can be opened in Edlog or in any text editor (including Notepad). Let's look at a final storage file for a program I have:

104 Output_Table 5.00 Min
1 104 L
2 Year_RTM L
3 Day_RTM L
4 Hour_Minute_RTM L
5 tctemp L
6 batt_MIN L


Estimated Total Final Storage Locations used per day 1728

In the above, "104" indicates the array ID assigned to that array of data. "5.00 min" indicates that my data storage interval is every 5 minutes. A timestamp is stored in the next three locations, then there is a tctemp sample and a minimum battery voltage stored. As indidated by this file, 1728 final storage locations will be used each day (6 data values, or FS locations, for each 5 minutes in the day).

If a have a standard CR10X with 62280 final storage locations, I can calculate that this program will not overwrite data for 36 days. If I have a 2M datalogger and no memory is allocated for final storage area 2 (thus, a maximum of 983040 for FS1), then the datalogger will overwrite the oldest data after 568 days.

When you allocate memory for FS2, you are allocating a fixed number of locations, not the number of arrays. Allocating 500 final storage locations means that you are allocating space for roughly 100 arrays, if each array uses 5 locations.

We often get the question of how long it will take before the new data begins overwriting the old data, with the assumption that this is how long you can wait between data collection. The real answer is you should collect data no less often than the amount of data you can afford to lose :)

Regards,

Dana


Adrian Oct 8, 2009 02:30 AM

Hi Dana,

When you allocate memory for FS2, you are allocating a fixed number of locations, not the number of arrays. Allocating 500 final storage locations means that you are allocating space for roughly 100 arrays, if each array uses 5 locations.


I misunderstood Janet's explanation about Store area 2 memory allocation. I interpreted the parameter as in CRBasic instead of data points, as Janet wrote. Was my fault.

As Janet suggests, an easy way to determine the number of final storage locations used per day is to look at the value returned by the FSL file


Because I expect only a few data on the storage area 2, I used the instruction 89 and seted the area's size ( in a wrong way, I can see now ) with instruction 80 and pc208 software tools. So, the estimated value in the .fsl file is not representative ( I think ). In fact, the estimation exceeds the total memory avaliable.

First, you may want to take a look at page 1-7 in the CR10X manual that provides a breakdown of memory allocation in the datalogger

I have an older version (1997, I think) and the figure is the same as in page OV-6. So I asked about how figure out if my datalogger is a CR10X or a CR10X-2M. I believe is a CR10X.

We often get the question of how long it will take before the new data begins overwriting the old data, with the assumption that this is how long you can wait between data collection. The real answer is you should collect data no less often than the amount of data you can afford to lose :)

Every data is important to me. I keep a long term solar radiation database. In the station beside my lab I can collect data almost every day. But the knowledge of the data hold capacity of each datalogger is an important parameter. Particularly for synchronization.

Thank you.

Regards, Adrian.


Dana Oct 8, 2009 04:38 PM

Hello Adrian,

Using a keyboard display, or the terminal emulator in PC208W software, type *B. We refer to this as "star B" mode.

To advance through Star B, press the A (advance) key. As you keep pressing "A", you will see:

01: (and some number)
02: (and some number)
03: (and some number) etc.

If you keep advancing, the values go all the way up to 11. However, you are interested in the value in # 03. This is the total Flash memory plus SRAM, in kilobytes. If you have a standard memory CR10X, this will read 256 (128K of flash + 128K of SRAM). If you have an extended memory datalogger, it will be reflected in this location accordingly (256 K of flash & original SRAM, plus the additional 1 or 2 M of memory).

You can confirm what amount of memory is allocated to FS1 & FS2, by going into the "Star A" mode (*A). Again, use the A key to advance, once you have typed *A (or the B key to "back up"). In star A, 03 is the number of locations allocated to FS2 and 04 is the number of locations allocated to FS1. You can set these values here, as well.

Once you are through viewing the Star modes, you will need to set the datalogger back to logging. This is done using *0. See the user manual as reference above for additional information on all Star modes, and what each of the fields for each mode contains.

Regards,

Dana


Adrian Oct 8, 2009 05:21 PM

Thank you Dana, I use the serial port to connect with the datalogger, so I'll try with the terminal emulator. I will try by night ( I hope this week ).

Thank you again.

Regards, Adrian.


jra Oct 8, 2009 07:32 PM

One note on connecting through the Terminal Emulator or Terminal tab of your connect screen. Press your enter key a few times, you should get a * back, then type 7H, you'll see a > back, then type *B.

Janet

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