Sdmcan parameters – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 244

Advertising
background image

Section 7. Measurement Instructions

7-20

This instruction cannot be used in a SubScan .

The SDMCAN instruction has the following parameters:

Parameter

Enter

SDMCAN PARAMETERS

Dest

The Dest parameter is a variable array in which to store the results of the
measurement. It must be an array of sufficient size to hold all of the values
that will be returned by the function chosen (defined by the DataType
parameter).

SDMAddress

The SDMAddress parameter defines the address of the SDM-CAN with
which to communicate. Valid SDM addresses are 0 through 14. Address 15
is reserved for the SDMTrigger instruction.
The SDM address is entered as a base 10 number, unlike older, jumper-
settable SDM instruments that used base 4.

TimeQuanta

Three time segments are used to set the bit rate and other timing parameters
for the CAN-bus network, TimeQuanta, TSEG1, and TSEG2. These
parameters are entered as integer numbers. The relationship between the
three time segments is defined as:

t

t

t

t

bit

q

TSEG

TSEG

=

+

+

1

2

The first time segment, the synchronization segment (S-SG), is defined by
the TimeQuanta parameter. To calculate a suitable value for TiimeQuanta,
use the following equation:

TimeQuanta

t

q

=

* *

8 10

6

where tq = the TimeQuanta. There are between 8 and 25 time quanta in the
bit time. The bit time is defined as 1/baud rate.

TSEG1

The second time segment, TSEG1, is actually two time segments known as
the propagation segment and phase segment one. The value entered is
determined by the characteristics of the network and the other devices on the
network. It can be calculated as:

T

t

t

SEG

TSEG

q

1

1

=

/

TSEG2

The third time segment, TSEG2 (the phase segment two), is defined by the
TSEG2 parameter. The value of TSEG2 can be calculated using the
equation:

T

t

t

SEG

TSEG

q

2

2

=

/

The relative values of TSEG1 and TSEG2 determine when the SDM-CAN
samples the data bit.

ID

Each device on a CAN-bus network prefaces its data frames with an 11 or
29 bit identifier. The ID parameter is used to set this address. The ID is
entered as a single decimal equivalent. Enter a positive value to signify a 29
bit ID or a negative value to signify an 11 bit ID.

DataType

The DataType parameter defines what function the SDMCAN instruction
will perform. This instruction can be used to collect data, buffer data for
transmission to the CAN-bus, transmit data to the CAN-bus, read or reset
error counters, read the status of the SDM-CAN, read the SDM-CAN's OS
signature and version, send a remote frame, or read or set the SDM-CAN's
internal switches. Enter the numeric value for the desired option:

NOTE

Advertising