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.

How works public table?


BiTFx Mar 31, 2018 06:21 PM

Hello.

I want to ask about the public table that creates the Dattaloguer with the data collected with every scan of the sensors installed.

The values of the public table and other tables that have been created in the program are used for purposes of my work, but the stations are connected by RF to the server where these tables are located and we look for ways to decrease the size of the tables, including public table.

1- How is the process used for generation of public table in the Dattaloguer with the data loaded by Scan?
2- Each row of the public table is apparently added every 5 minutes, but it is not exactly that time, why is the variation between rows?
3- Is possible change the time that each row of the public table is generated? We would like to do it every 10 minutes so we reduce the size of it.
2- Is there a difference in the performance of the Dattaloguer if we set the scan every 5 seconds or every 2 minutes?

Thank you very much for your help!!!

Example of one Public Table we have here, see timestamp is not every X minutes..

.
TIMESTAMP 
TS
2018-03-31 09:44:57.86
2018-03-31 09:54:42.52
2018-03-31 10:03:00.38
2018-03-31 10:12:40.44
2018-03-31 10:22:30.57
2018-03-31 10:32:29.41
2018-03-31 10:42:31.48
2018-03-31 10:53:13.69
2018-03-31 11:02:44.76
2018-03-31 11:12:16.72
2018-03-31 11:22:57.32
.
Another example from other station:

TIMESTAMP
TS

2018-03-31 13:05:57.5
2018-03-31 13:10:58.7 
2018-03-31 13:13:59.29 
2018-03-31 13:34:29.97 
2018-03-31 13:41:21.25 
2018-03-31 13:47:52.49

Example of program:

'CR1000
'Created by Short Cut (3.0)

'Declare Variables and Units
Dim Rs
Dim pHMult
Public BattV
Public PTemp_C

 ..............


BeginProg
   'Main Scan
   Scan(5,Sec,1,0)
      'Default Datalogger Battery Voltage measurement 'BattV'
      Battery(BattV)
      'Default Wiring Panel Temperature measurement 'PTemp_C'
      PanelTemp(PTemp_C,_60Hz)
      'CS450/CS455 Pressure Transducer measurements 'Lvl_cm' and 'Temp_C'

      ..............

   NextScan
EndProg


jtrauntvein Mar 31, 2018 09:27 PM

The public table is constructed to report all variables declared using the "Public" keyword in CRBasic.  Unlike final storage tables (declared using the DataTable construct), the public table does not store records on a fixed interval.  A new record is polled every time that the public table is polled and the values within it represent the values of the variables at the time that the data query response was formed.  The time stamp assigned to this record is the current value of the dataloger's real-time clock.  What is perhaps confusing is that the record number for the public table is only incremented at the start of each main scan.

If your goal is to get more consistent reports or a subset of the public table, I would recommend creating a data table that samples the desired subset at the appropriate frequency.  It is possible to declare such a table such that has a very limited number of records (a minimum of one record).

It is difficult to comment on the performance and the optimal scan rate without knowing more details about your measurement application.  What you need to consider is whether all of the measurements in your scan can fit within the alotted time interval (SDI-12 sensors particularly are not known for the rapidity of their responses) and how this might affect your power budget (assuming that your application is solar/battery powered).  

I hope that this addresses your questions.


BiTFx Apr 1, 2018 11:44 AM

Hello jtrauntvein:

Your reply answered all my questions perfectly!

Thank you!


cetegamee Dec 12, 2023 03:44 PM

Thank you for your detailed instructions. mario games Now I know how to make my table public


topmclain Jan 17, 2024 03:46 AM

This post is under review.


rikibac593 Jan 17, 2024 06:08 AM

This post is under review.

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