
Section 7. Measurement Instructions
Parameter
& Data Type
Enter
CaptureTrig
Constant,
Variable, or
Expression
This argument is used when the "Capture All Events" output option is used.
When CaptureTrig is true, the INT8 will return the last nnnn events.
Mult, Offset
Constant,
Variable,
Array, or
Expression
A multiplier and offset by which to scale the raw results of the
measurement. See the measurement description for the units of the raw
result; a multiplier of one and an offset of 0 are necessary to output in the
raw units. For example, the TCDiff instruction measures a thermocouple
and outputs temperature in degrees C. A multiplier of 1.8 and an offset of
32 will convert the temperature to degrees F.
SDMIO16 (Dest, Status, Address, Command, Mode Ports 16-13, Mode
Ports 12-9, Mode Ports 8-5, Mode Ports 4-1, Mult, Offset)
The SDMIO16 instruction is used to set up and measure an SDM-IO16 control
port expansion device.
The ports on the SDM-IO16 can be configured for either input or output.
When configured as input, the SDM-IO16 can measure the logical state of
each port, count pulses, and measure the frequency of and determine the duty
cycle of applied signals. The module can also be programmed to generate an
interrupt signal to the datalogger when one or more input signals change state.
When configured as an output, each port can be set to 0 or 5 V by the
datalogger. In addition to being able to drive normal logic level inputs, when
an output is set high a ‘boost’ circuit allows it to source a current of up to 100
mA, allowing direct control of low voltage valves, relays, etc.
Parameter
& Data Type
Enter
Dest
The variable or variable array in which to store the results of the
measurement (Command codes 1 - 69, 91, 92, 99) or the Source value for
the Command Codes (70 - 85, 93 - 98). The variable array for this
parameter must be dimensioned to accommodate the number of values
returned (or sent) by the instruction.
Status
The variable in which to store the result of the command issued by the
instruction. If the command is successful a 0 is returned; otherwise, the
value is incremented by 1 with each failure.
SDMAddress
The SDMAddress parameter defines the address of the SDM-IO16 with
which to communicate. Valid SDM addresses are 0 through 14. Address 15
is reserved for the SDMTrigger instruction. If the Reps parameter is greater
than 1, the datalogger will increment the SDM address for each subsequent
SDM-IO16 that it communicates with.
Note: CRBasic dataloggers use base 10 when addressing SDM devices.
Edlog programmed dataloggers (e.g., CR10X, CR23X) used base 4 for
addressing.
7-39
Komentáře k této Příručce