Campbell Scientific RTDAQ Software User Manual

Page 245

Advertising
background image

Section 8. Real-Time Monitoring and Control Software

1000.MyTable.Value"),30*nsecPerSec,0)-
ValueAtTime("Server:CR1000.MyTable.Value",TimeStamp("Server:CR1000.
MyTable.Value"),60*nsecPerSec,0)))>10,1,0)

can be replaced by:

Alias(X,"Server:CR1000.MyTable.Value");StartAtOffsetFromNewest(5,Order
Collected);IIF((ABS(X-ValueAtTime(X,TimeStamp(X),30*nsecPerSec,0))>10
AND ABS(ValueAtTime(X,TimeStamp(X),30*nsecPerSec,0)-
ValueAtTime(X,TimeStamp(X),60*nsecPerSec,0)))>10,1,0)

Synchronizing Variables

The ValueSynch function can be used to synchronize data values coming from
multiple data sources so that you can display the results of a calculation on
those data values in a single component. The Value Synch function takes the
form:

ValueSynch(synchronized_name, data_value)

Where synchronized_name is the name of a new variable that will be used in a
calculation at the end of the expression and data_value is the name used within
RTMC to access the data value, i.e., Source:datalogger.table.variable.

For example, if you wish to display the average air temperature of two stations
on a chart, the following expression can be used to synchronize the timestamps
of the stations and then calculate the average air temperature:

ValueSynch(air_temp_1,"Server:CR1000_1.SECOND.air_temp");ValueSynch
(air_temp_2,"Server:CR1000_2.SECOND.air_temp"); (air_temp_1 +
air_temp_2) / 2

Timestamps are truncated to seconds prior to synchronization.
Therefore, synchronizing sub-second data is not recommended
as the results will be unpredictable.

NOTES

If the timestamps of the stations are not the same (for example, if
one datalogger is a few minutes behind the other), the
component will display the exclamation point indicating no data,
until the data sources have common timestamps and, therefore,
can be synchronized.

RTMC will buffer up to 100,000 points of a data value while
waiting for a common timestamp from the other datalogger(s).
Once the buffer reaches 100,000 data points the oldest data value
will be removed from the buffer, each time a new data value is
collected.

All of the functions available in RTMC are described below. For details on a
function, refer to RTMC’s online help.

8-11

Advertising