Section 7. Measurement Instructions
7-14
CANBUS (Dest, SDMAddress, TimeQuanta, TSEG1, TSEG2, ID, DataType,
StartBit, NumBits, NumVals, Multiplier, Offset)
The CANBUS instruction is used to measure and control the SDM-CAN
interface. Multiple CANBUS instructions may be used within a program. The
initial function of the instruction is to configure the SDM-CAN interface when
the datalogger program is compiled. Subsequent instructions can be used to
determine what data is passed between the CAN-bus network and the
datalogger, set and/or read the SDM-CAN's internal switches, and read and/or
reset detected errors.
The SDMTrigger instruction can be used to trigger simultaneous
measurements from one or more SDM-CANs and other SDM devices
connected to the datalogger. When the SDMTrigger instruction is encountered
in a program, it broadcasts a special SDM message which causes all the SDM-
CAN devices to copy the last data values captured from the CAN-bus into the
working data buffers. Refer to the SDM-CAN manual for additional help.
If more than one CanBus Instruction is used within a datalogger
program, the values used for TimeQuanta, TSEG1 and TSEG2
must be the same for each instruction.
Parameter
& Data Type
Enter
CANBUS INSTRUCTION PARAMETERS
Dest
Variable or
Array
The
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
Constant
The address of the SDM-CAN with which to communicate. Valid SDM addresses are 0
through 15.
TimeQuanta
Constant
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:
2
1
TSEG
TSEG
q
bit
t
t
t
t
+
+
=
The first time segment, the synchronization segment (S-SG), is defined by the TimeQuanta
parameter. To calculate a suitable value for TimeQuanta, use the following
equation:
6
10
8
×
×
=
q
t
TimeQuanta
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
Constant
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:
q
TSEG
SEG
t
t
T
/
1
1
=
TSEG2
Constant
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:
q
SEG
SEG
t
t
T
/
2
1
=
The relative values of TSEG1 and TSEG2 determine when the SDM-CAN samples the data
bit.
NOTE
Summary of Contents for CR9000
Page 6: ...CR9000 Table of Contents iv This is a blank page ...
Page 22: ...CR9000 Overview OV 16 This is a blank page ...
Page 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...
Page 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...
Page 88: ...Section 5 Program Declarations 5 6 This is a blank page ...
Page 217: ...This is a blank page ...