Campbell CR800 Dokumentacja Strona 176

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 324
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 175
Section 7. Measurement Instructions
ReadIO (Dest, Mask)
ReadIO is used to read the status of selected control I/O channels (ports) on the
CR800. There are 8 ports. The status of these ports is considered to be a binary
number with a high port (+5 V) signifying 1 and a low port (0 V) signifying 0.
For example, if ports 1 and 3 are high and the rest low, the binary representation
is 00000101, or 5 decimal. The mask parameter is used to select which of the
ports to read, it too is a binary representation of the ports, a 1 means pay
attention to the status of the port, a 0 means ignore the status of the port (the
mask is "anded" with the port status; the "and" operation returns a 1 for a digit if
the mask digit and the port status are both 1 and a 0 if either or both is 0).
CRBasic allows the entry of numbers in binary format by preceding the number
with "&B". For example if the mask is entered as &B100 (leading zeros can be
omitted in binary format just as in decimal) and ports 3 and 1 are high as in the
previous example, the result of the instruction will be 4 (decimal, binary = 100);
if port 3 is low, the result would be 0.
Examples
ReadIO(Port3, &B100) ' read port 3 if port 3 is high then
‘Port3 = 4, if port 3 is low then Port3 = 0
SDI12Recorder (Dest, SDIPort, SDIAddress, SDICommand, Multiplier,
Offset)
The SDI12Recorder instruction is used to retrieve the results from an SDI-12
sensor.
Each execution of the SDI12Recorder instruction sends an (address)M! and
then an (address)D0!
M! instructs the sensor to make the measurement; D0! is a request for the data.
See the CRBasic Editor for the detailed description of the parameters and
commands.
VibratingWire (Dest, Reps, Range, SEChan, ExChan, StartFreq, EndFreq,
TSweep, Steps, DelMeas, NumCycles, DelReps, Multiplier, Offset)
The VibratingWire instruction is used to measure a vibrating wire sensor with
a swept frequency (from low to high).
The period of the response is measured and 1/T
2
is calculated. T is the period
of the measured signal in milliseconds.
Parameter
& Data Type
Enter
Dest
The Dest parameter is a variable in which to store the results of the
measurement.
Reps
The Reps parameter is the number of times the measurement should be made.
Measurements are made on consecutive channels. If the Reps parameter is
greater than 1, the Dest parameter must be a variable array.
7-22
Przeglądanie stron 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 323 324

Komentarze do niniejszej Instrukcji

Brak uwag