5 program comments, 6 expressions, 5 program – Campbell Scientific PC400 Datalogger Support Software User Manual

Page 143: Comments -7, 6 expressions -7

Advertising
background image

Section 8. Datalogger Program Creation with Edlog

• With your cursor anywhere within the instruction, press <F1>. This opens

the help system to a detailed description of the instruction and parameters.

Edlog provides hints for each parameter at the very bottom of the Edlog screen.
These hints often display the valid entries for a field.

Many instructions are datalogger specific; refer to the specific
datalogger manual for details on a particular instruction.

NOTE

Data Entry Warnings

Edlog has a Data Entry Warning function that is accessed from the Options |
Editor menu item. By default, the Data Entry Warning is enabled. When the
Data Entry Warning is active, a warning is displayed immediately after an
invalid input or potentially invalid input has been entered for an instruction’s
parameter. The warning lists the valid inputs. A valid input must be entered
before advancing to the next parameter.

8.1.1.5

8.1.1.6

Program Comments

Comments can be entered to document the program for the programmer or
future users. Comments are ignored by the compiler; they can be entered on
any blank line or at the right of instruction or parameter text. A semicolon (;)
is used to mark comments. Comments can also be used to temporarily remove
instructions from a program for testing purposes.

In addition to typing a semicolon at the beginning of each line while entering
comments, there are several ways to comment (or uncomment) lines,
instructions, or blocks of code:

• Select a block of text, press the right mouse button, and select “comment”

or “uncomment” from the right button pop-up menu.

• Select Edit | Comment or Edit | Uncomment from the Edlog menu.

• Select a block of text and press <Ctrl>+n to comment text (or

<Shift><Ctrl>+n to uncomment text).

• Press <End> to automatically insert a semi-colon to the right of the

protected text of an instruction or parameter, and type the desired
comment.

Edlog will not allow a portion of an instruction or the table execution intervals
to be commented out.

Expressions

Algebraic expressions can be used in a program to easily perform processing
on input locations. When a datalogger program that contains an expression is
compiled, the appropriate instructions are automatically incorporated into the
DLD file. As an example, the following expression could be used to convert
temperature in degrees Celsius to temperatures in degrees Fahrenheit:

TempF=TempC*1.8+32

8-7

Advertising