Campbell Scientific SDM SDM-SW8A 8-Channel Switch Closure Input Module - Page 14

Datalogger Program Details

Page 14 highlights

SDM-SW8A Switch Closure Input Module Parameter 4 specifies the first SW8A channel to be read (1..8). One or more sequential channels are read depending on the Reps. To optimize program efficiency, the sensors should be wired sequentially. Data are stored in sequential datalogger input locations, starting at the location specified in Parameter 5. The number of input locations consumed is equal to the number of Reps. The scaling multiplier and offset (Parameters 6 and 7) are applied to all readings. Enter 1 for the multiplier if no scaling is desired. If the SW8A does not respond, -99999 is loaded into input locations. Modules which do not respond when addressed by the datalogger are possibly wired or addressed incorrectly. Verify that the address specified in Parameter 2 corresponds to the jumper setting and that all connections are correct and secure. An example program for reading state, duty cycle, and counts of all 8 ports in a Module with an address of zero (0) is given in the Appendix. 7. Datalogger Program Details 7.1 Datalogger Scan Rate The Module samples channel state every 2 ms and accumulates the information for duty cycle and counts. Each channel has one 16 bit accumulator for duty cycle and one for counts. The accumulators are reset when the datalogger requests information from the SW8A and when the count exceeds 65535. The datalogger scan rate must be frequent enough to avoid SW8A accumulator overflow. Each Duty Cycle accumulator resets every 131 seconds (2 ms * 65536) or roughly 2 minutes. If Duty Cycle is requested, the datalogger scan rate must be less than 131 seconds. The rate at which Count accumulators are reset is input frequency dependent. For example, at a maximum input frequency of 100 Hz, the datalogger must sample the SW8A at least every 655 seconds (approximately 10 minutes) or the accumulator for that channel resets and starts over again. 7.2 First Scan From the time power is applied, the SW8A samples the state of all channels every 2 ms. The first time the datalogger executes Instruction 102 and requests information, the results represent the time period since the SW8A was powered up, not the datalogger scan interval. This problem may be avoided by ignoring the data from the first scan after the datalogger is compiled. The example program (see Appendix) includes a routine which discards first scan data. 10

  • 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

SDM-SW8A Switch Closure Input Module
Parameter 4
specifies the first SW8A channel to be read (1..8).
One or more
sequential channels are read depending on the Reps.
To optimize program
efficiency, the sensors should be wired sequentially.
Data are stored in sequential datalogger input locations, starting at the location
specified in
Parameter 5
.
The number of input locations consumed is equal to the number of Reps.
The scaling multiplier and offset
(Parameters 6 and 7)
are applied to all
readings.
Enter 1 for the multiplier if no scaling is desired.
If the SW8A does not respond,
-99999 is loaded into input locations.
Modules which do not respond when addressed by the datalogger are possibly
wired or addressed incorrectly.
Verify that the address specified in Parameter
2 corresponds to the jumper setting and that all connections are correct and
secure.
An example program for reading state, duty cycle, and counts of all 8 ports in a
Module with an address of zero (0) is given in the Appendix.
7.
Datalogger Program Details
7.1
Datalogger Scan Rate
The Module samples channel state every 2 ms and accumulates the information
for duty cycle and counts.
Each channel has one 16 bit accumulator for duty
cycle and one for counts.
The accumulators are reset when the datalogger
requests information from the SW8A and when the count exceeds 65535.
The
datalogger scan rate must be frequent enough to avoid SW8A accumulator
overflow.
Each Duty Cycle accumulator resets every 131 seconds (2 ms * 65536) or
roughly 2 minutes.
If Duty Cycle is requested, the datalogger scan rate must
be less than 131 seconds.
The rate at which Count accumulators are reset is input frequency dependent.
For example, at a maximum input frequency of 100 Hz, the datalogger must
sample the SW8A at least every 655 seconds (approximately 10 minutes) or
the accumulator for that channel resets and starts over again.
7.2
First Scan
From the time power is applied, the SW8A samples the state of all channels
every 2 ms.
The first time the datalogger executes Instruction 102 and requests
information, the results represent the time period since the SW8A was powered
up, not the datalogger scan interval.
This problem may be avoided by ignoring
the data from the first scan after the datalogger is compiled.
The example
program (see Appendix) includes a routine which discards first scan data.
10