Section 7. Creating and Editing Datalogger Programs
7.3.4.3 Mathematical Expressions
Mathematical expressions can be entered algebraically into program code to
perform processing on measurements, to be used for logical evaluation, or to be
used in place of some parameters.
As an example of
Measurement Processing,
to convert a thermocouple
measurement from degrees Celsius to degrees Fahrenheit, you could use the
following expression:
TCTempF=TCTemp(1)*1.8+32
Logical Evaluation expressions could be used to determine the flow of a
program:
If TCTemp(1) > 100 Then
Call Subroutine1
Else
'enter code for main program
End If
Many parameters will allow the entry of expressions. In the following
example, the DataTable will be triggered, and therefore data stored, if
TCTemp(1)>100.
DataTable(TempTable, TCTemp(1)>100, 5000)
7.3.4.4 Measurement and Output Processing Instructions
Measurement instructions are procedures that set up the measurement hardware
to make a measurement and place the results in a variable or a variable array.
Output processing instructions are procedures that store the results of
measurements or calculated values. Output processing includes averaging,
saving maximum or minimum, standard deviation, FFT, etc.
The instructions for making measurements and outputting data are not found in
a standard basic language. The instructions Campbell Scientific has created for
these operations are in the form of procedures. The procedure has a keyword
name and a series of parameters that contain the information needed to
complete the procedure. For example, the instruction for measuring the
temperature of the CR5000 input panel is:
PanelTemp
(Dest, Integ)
PanelTemp is the keyword name of the instruction. The two parameters
associated with PanelTemp are:
Dest
ination, the name of the variable in which
to put the temperature; and
Integ
ration, the length of time to integrate the
measurement. To place the panel temperature in the variable RefTemp (using a
250 microsecond measurement integration time) the code is:
PanelTemp(RefTemp, 250)
7-42
Содержание LoggerNet
Страница 2: ......
Страница 30: ...Preface What s New in LoggerNet 4 xxvi...
Страница 32: ...Section 1 System Requirements 1 2...
Страница 44: ...Section 2 Installation Operation and Backup Procedures 2 12...
Страница 136: ...Section 4 Setting up Datalogger Networks 4 80...
Страница 227: ...Section 7 Creating and Editing Datalogger Programs 7 9...
Страница 298: ...Section 7 Creating and Editing Datalogger Programs 7 80...
Страница 402: ...Section 9 Automating Tasks with Task Master 9 12...
Страница 406: ...Section 9 Automating Tasks with Task Master 9 16...
Страница 450: ...Section 11 Utilities Installed with LoggerNet Admin and LoggerNet Remote 11 22...
Страница 454: ...Section 12 Optional Client Applications Available for LoggerNet 12 4...
Страница 462: ...Section 13 Implementing Advanced Communications Links 13 8...
Страница 482: ...Section 14 Troubleshooting Guide 14 20...
Страница 570: ...Appendix F Calibration and Zeroing F 16...
Страница 578: ...Appendix G Importing Files into Excel G 8...
Страница 579: ......