beautypg.com

Campbell Scientific CR5000 Measurement and Control Module User Manual

Page 170

background image

Section 7. Measurement Instructions

7-44

Parameter
& Data Type

Enter

2049

Communication parameters.

2054

Set up receive filter.

2304

Transmit string and/or data to device (formatter/filter).

2305

Transmit bytes.

Param1

Param1 is the first parameter that should be passed on to the SIO4 for the
selected Command. Refer to the SDM-SIO4 manual for details.

Param2

Param2 is the second parameter that should be passed on to the SIO4 for the
selected Command. Refer to the SDM-SIO4 manual for details.

ValuesPerRep

The ValuesPerRep parameter is the number of values to be sent or received
from each SIO4 each time this instruction is performed.

Mult, Offset

These parameters are the multiplier and offset with which to scale the values
received by the datalogger from the SIO4.

SW8A (Dest, Reps, SDMAddress, FunctOp, SW8AStartChan, Mult, Offset)

The SW8A instruction is used to control the SDM-SW8A Eight-Channel
Switch Closure module, and store the results of its measurements to a variable
array.

Parameter
& Data Type

Enter

Dest
Variable or

Array

The variable in which to store the results of the SW8A measurement. The
variable array for this parameter must be dimensioned to the number of
Reps.

Reps
Constant

The number of channels that will be read on the SW8A. If (StartChan +Reps
–1) is greater than 8, measurement will continue on the next sequential
SW8A. In this instance, the addresses of the SDM devices must be
consecutive.

SDMAddress

Constant

The address of the first SW8A with which to communicate. Valid SDM
addresses are 0 through 15. If the SDMTrigger instruction is used in the
program, address 15 should not be used. If the Reps parameter used more
channels than are available on the first SW8A, the datalogger will increment
the SDM address for each subsequent device that it communicates with.

FunctOp

The FunctOp is used to determine the result that will be returned by the
SW8A.

Constant

Numeric
Code

Function

0

Returns the state of the signal at the time the instruction is
executed. A 0 is stored for low and a 1 is stored for high.

1

Returns the duty cycle of the signal. The result is the percentage
of time the signal is high during the scan interval.

2

Returns a count of the number of positive transitions of the
signal.

3

Returns a value indicating the condition of the module:

positive integer:

ROM and RAM are good

negative value:

RAM is bad

Zero:

ROM is bad