12 read sdm-can internal switches (type 33), 6 start bit number (parameter 09:), 7 number of bits (parameter 10:) – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 32: Read sdm-can internal switches (type 33), Start bit number (parameter 09:), Number of bits (parameter 10:)

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

Please refer to the CAN standards and your own network
documentation for a more detailed explanation of the switch ‘d’
modes. It is important to choose the correct setting when the
SDM-CAN is required to transmit data. Also remember to check
the jumper settings inside the SDM-CAN if enabling
transmission, as the default setting is for transmission to be
disabled in hardware.

NOTE

3.3.5.12 Read SDM-CAN internal switches (type 33):

This data type returns the internal switch settings, into a specified input
location. The switch values shown are encoded in the same way as they are set
(see type 34 above), with the exception that a switch setting of 9 is reserved to
show an undefined error (please contact Campbell Scientific if such an error
occurs).

3.3.6 Start Bit Number (Parameter 09:)

The start bit number is used to point to the least significant bit (LSB) of the
data value within the CAN data frame to which this instruction relates. Within
CAN data frames there is no general standard as to the order or format of the
binary data. ISO11898 does specify that data should be sent with the most
significant bit (MSB) first, least significant bit (LSB) last. Most diagrams show
the MSB on the left and the LSB on the right. However, some users may find
the start point for the data is referenced in the opposite fashion, i.e. as a count
from the left side of the frame, and so the SDM-CAN supports both methods of
referencing the start point.

By default the SDM-CAN follows the ISO standard and the LSB is referenced
to the right-most bit of the frame. The bit number can range from 1 to 64 as
there are up to 64 bits in a CAN frame. If the parameter is indexed, (marked ‘--
’) then the reference is changed to point to the LSB relative to the left-hand
most bit of the frame. Please note, though, that choosing this option does not
have any automatic affect on the type (direction) of encoding or decoding used
– it only changes the method of pointing to the LSB.

When entering the start bit, you should always point to the
position of the least significant bit of the data to be
decoded/encoded. Please refer to Appendix D, Examples of CAN
Data Frames and Data Encoding and Decoding
, for diagrams
and examples of typical data types.

NOTE

3.3.7 Number of Bits (Parameter 10:)

This relates to the number of bits to use in this transaction. This number can
range from 1 to 64 as there are up to 64 bits in a CAN frame. If this parameter
is indexed (‘--’) then, when a new value is received, the SDM-CAN, relevant to
this particular call of Instruction P118, will pulse the I/O port to indicate to the
datalogger that the data has been captured and can be read (see below).

24

Advertising