Campbell Scientific IRGASON IRGASON Integrated CO2/H2O Open-Path Gas Analyzer - Page 47

EC100Con Instruction, EC100Con SDMTrigger

Page 47 highlights

IRGASON® Integrated CO2/H2O Open-Path Gas Analyzer and 3D Sonic Anemometer 10.2 EC100Configure() Instruction EC100Configure() provides a third option, beside the ECMon software and DevConfig utility, for retrieving and modifying settings. ECmon and Device Configuration are user-interactive, whereas the EC100Configure() instruction allows automated control under CRBasic datalogger programming. EC100Configure() is a processing instruction. Whether running in pipeline mode or sequential mode, the datalogger will execute the instruction from the processing task. This functionality allows EC100Configure() to be placed in conditional statements. Running from the processing task has ramifications when attempting to execute EC100Configure() while other SDM instructions are executing in pipeline mode. EC100Configure() locks the SDM port during the duration of its execution. If the pipelined SDM task sequencer needs to run while the SDM is locked, it will be held off until the instruction completes. This locking will likely result in skipped scans when reconfiguring an IRGASON. For the IRGASON to save settings, it must go through a lengthy write-readverify process. To avoid saving the settings after each set command, the result code can be used to determine if any settings were modified from their original value. When a change is detected, the save settings command (command code 99) can then be sent to the IRGASON. The DestSource parameter variable should be set to 2718 to save the settings. The reception of this command is acknowledged, but since it takes up to a second to complete, a successful return code does not mean that all data were successfully written to the appropriate non-volatile memory. The instruction syntax is: EC100Configure (Result, SDMAddress, ConfigCmd, DestSource) Result is a variable that contains a value indicating the success or failure of the command. A result code of 0 means the command was successful. If reading a setting, 0 in the result code means that the value in the DestSource variable is the value the desired setting has in the IRGASON. When writing a setting, if the result code is 0, the value and setting were compatible, but the value was not changed because it contained the same value that was sent. A result code of 1 from the set operation means that the value was valid, different, set and acknowledged. This allows CRBasic code to control whether or not to save the settings. A result code of NAN (i.e., not a number) indicates the setting was not changed or acknowledged, or a signature failure occurred. SDMAddress defines the address of the IRGASON to configure. Valid SDM addresses are 0 through 14 (address 15 is reserved for SDMTrigger()). ConfigCmd is a variable that indicates whether to get or set a setting. The options are listed in TABLE 10-4. 37

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66

IRGASON
®
Integrated CO
2
/H
2
O Open-Path Gas Analyzer and 3D Sonic Anemometer
10.2 EC100Configure() Instruction
EC100Configure()
provides a third option, beside the ECMon software and
DevConfig utility, for retrieving and modifying settings.
ECmon and Device
Configuration are user-interactive, whereas the
EC100Configure()
instruction
allows automated control under CRBasic datalogger programming.
EC100Configure()
is a processing instruction.
Whether running in pipeline
mode or sequential mode, the datalogger will execute the instruction from the
processing task.
This functionality allows
EC100Configure()
to be placed in
conditional statements.
Running from the processing task has ramifications
when attempting to execute
EC100Configure()
while other SDM instructions
are executing in pipeline mode.
EC100Configure()
locks the SDM port
during the duration of its execution.
If the pipelined SDM task sequencer
needs to run while the SDM is locked, it will be held off until the instruction
completes.
This locking will likely result in skipped scans when reconfiguring
an IRGASON.
For the IRGASON to save settings, it must go through a lengthy write-read-
verify process.
To avoid saving the settings after each set command, the result
code can be used to determine if any settings were modified from their original
value.
When a change is detected, the save settings command (command code
99
) can then be sent to the IRGASON.
The
DestSource
parameter variable
should be set to 2718 to save the settings.
The reception of this command is
acknowledged, but since it takes up to a second to complete, a successful return
code does not mean that all data were successfully written to the appropriate
non-volatile memory.
The instruction syntax is:
EC100Configure (
Result
,
SDMAddress
,
ConfigCmd
,
DestSource
)
Result
is a variable that contains a value indicating the success or failure of the
command.
A result code of
0
means the command was successful.
If reading a
setting,
0
in the result code means that the value in the
DestSource
variable is
the value the desired setting has in the IRGASON.
When writing a setting, if
the result code is
0
, the value and setting were compatible, but the value was
not changed because it contained the same value that was sent.
A result code
of 1 from the set operation means that the value was valid, different, set and
acknowledged.
This allows CRBasic code to control whether or not to save the
settings.
A result code of
NAN
(i.e., not a number) indicates the setting was not
changed or acknowledged, or a signature failure occurred.
SDMAddress
defines the address of the IRGASON to configure.
Valid SDM
addresses are 0 through 14 (address 15 is reserved for
SDMTrigger()
).
ConfigCmd
is a variable that indicates whether to get or set a setting.
The
options are listed in TABLE 10-4.
37