SDMGeneric (Generic SDM Device)

The SDMGeneric instruction is used to send commands to an SDM device that is otherwise unsupported in the datalogger.

Syntax

SDMGeneric ( Dest, SDMAddress, CmdByte, NumValuesOut, Source, NumValuesIn, BytesPerValue, BigEndian, DelayByte )

Parameters

Dest

A variable that will hold any incoming bytes from the SDM device.

Type: Variable or variable array

SDMAddress (Address of Device)

Defines the address of the device with which to communicate. Valid ClosedSDM Synchronous Device for Measurement. A processor-based peripheral device or sensor that communicates with the datalogger via hardwire over a short distance using a protocol proprietary to Campbell Scientific. addresses are 0 through 14. Address 15 is reserved for the SDMTrigger instruction.

Some SDM instructions support repetitions. If a Reps parameter is present and it is greater than 1, the data logger will increment the SDM address used in the instruction for each subsequent device with which it communicates.

CmdByte

A setup byte that will be sent to the SDM device.

Type: Variable or constant

NumValsOut

The number of values that are to be sent to the SDM device.

Type: Variable or constant

Source

A variable that holds the values to be sent to the SDM device.

Type: Variable

NumValsIn

The number of values that are expected to be received back from the SDM device.

Type: Variable or constant

BytesPerValue

The number of bytes for each value sent to or received from the SDM device. Typically, this is 1, 2, or 4, for 1 byte, 2 byte, or 4 byte values.

Type: Variable or constant

BigEndian

Indicates the order of bytes to be sent or received. Enter 0 for little endian (least significant byte first), or 1 for big endian (most significant byte first).

Type: Constant

DelayByte

The delay, in microseconds, that should be used between sending bytes. If a negative value is entered, this is the delay to be expected between receiving bytes from the SDM device.

Type: Constant