Read sdm-can internal switches (type 33), Start bit number (parameter 09:), Number of bits (parameter 10:) – Campbell Hausfeld SDM-CAN User Manual

Page 30

Advertising
background image

SDM-CAN CAN-Bus Interface User Guide

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

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).

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 for diagrams and examples of typical data
types.

NOTE

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).

For some data types this parameter will be overridden by a fixed
number of bits required by the data type; even so the interrupt
setting can still be set. For integer values, the longest integer you
can read or send from one datalogger input location is 16 bits as a
result of limitations within the datalogger (see section 3.2 above for
an explanation and work-arounds.

NOTE

3-12

Advertising