
Section 7. Measurement Instructions
PortSet (Port, State)
This Instruction will set the specified port high or low.
Parameter
& Data Type
Enter
Port
Constant,
Variable, or
Expression
The number of the port (1-8) to set with the instruction.
State
The state (high or low) to set the port to.
Constant,
Code Value State
Variable, or
True 0 Low
Expression
False
≠ 0
High
PulseCount (Dest, Reps, PChan, PConfig, POption, Mult, Offset)
Sensor
Pulse Channel
Ground
Parameter
& Data Type
Enter
Dest
Variable or
Array
The Variable in which to store the results of the instruction. When Reps are used the
results are stored in an array with the variable name. An array must be dimensioned
to have elements for all the Reps.
Reps
Constant
The number of repetitions for the measurement or instruction.
PChan
Constant
The number of the pulse channel (1 or 2) for the measurement.
Control ports can be used to measure high frequency or switch closure
configurations. A 1 is placed in front of the control port number to specify the
control port, i.e., control port 7 is specified by entering 17.
PConfig
A code specifying the type of pulse input to measure.
Constant
Code Input Configuration
0 High Frequency
1 Low Level AC
2 Switch Closure
POption
Constant
A code that determines if the raw result (multiplier = 1, offset = 0) is returned as
counts or frequency. The running average can be used to smooth out readings when
a low frequency relative to the scan rate causes large fluctuations in the measured
frequency from scan to another.
Code Result
0 Counts
1 Frequency (Hz) counts/scan interval in seconds
>1 Running average of frequency. The number entered is the time
period over which the frequency is averaged in milliseconds.
7-19
Comentários a estes Manuais