Specifications
Section 7. Measurement Instructions
Switch Closure
• Pulse Channels
A switch closure is connected between P1..P4 and analog ground.
When the switch is open, the CR3000 pulls the pulse channel to 5 V
through a 100 kOhm impedance. When the switch is closed, the
pulse channel is pulled to ground. The count is incremented when
the switch opens.
Minimum Switch Closed Time: 5 ms
Minimum Switch Open Time: 6 ms
Maximum Bounce Time: 1 ms open without being counted
• Control Ports Channels
A switch closure is connected between C1..C8 and 5V.
PulseCountReset
PulseCountReset is used to reset the pulse counters and the running averages
used in the pulse count instruction. The 16 bit counters can count up to
decimal 65535. More counts than 65535 result in an over-range condition.
With each scan, the CR3000 reads the counts accumulated since the last scan
and then resets the counter. If the scans stop, as in a program with more that
one Scan loop, the counter continues to accumulate counts until another scan is
initiated or it over-ranges. If the running averaging is in use, the over-range
value will be included in the average until for the duration of the averaging
period (e.g., with a 1000 millisecond running average, the over-range will be
the value from the PulseCount instruction until 1 second has passed.
Resetting the average prior to (re)starting the scan avoids this.
PulsePort (Port, Delay)
This instruction toggles the state of a port, delays the specified amount of time,
toggles the port, and then delays a second time. The second delay in the
instruction allows it to be used to create a 50 percent duty cycle clock. The
instruction has the following parameters:
Parameter
& Data Type
Enter
Port
Constant
The control port that should be set by the instruction. The number of the
port (1-8) is entered:
Delay
Array
The amount of time, in microseconds, that the instruction should delay after
each toggle of the port
ReadIO (Dest, Mask)
ReadIO is used to read the status of selected control I/O channels (ports) on the
CR3000 and store the results. 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
7-23