5 data type (parameter 08:), Data type (parameter 08:) – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 26

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

special meaning of the ID; each packet is only referenced by the full ID. The
CAN 2.0A standard uses an ID with 11 bits, while CAN 2.0B uses 29 bits.

When entering IDs into Instruction P118, three parameters are used. This is
because the ID size, in number of bits, is too large to be encoded into a single
parameter.

The first ID parameter (parameter 05) sets bits 0..10, entered as a number
between 0 and 2047. This parameter also determines whether an 11-bit or a 29-
bit Identifier is set. If you index this parameter then an 11bit Identifier is set;
the following two parameters are then irrelevant and are normally left at zero.

The second ID parameter (parameter 06) encodes bits 11..23 entered as 0 to
8191. The third ID parameter (parameter 07) is for bits 24 to 28 entered as 0 to
31.

CAN networks either work with 11 or 29 bit IDs. As a general
rule you cannot have packets with different length IDs on the
same network. Therefore make sure parameter 05 specifies the
same length ID for all calls of P118.

NOTE

3.3.5 Data Type (Parameter 08:)

This parameter determines the type of data involved and/or the type of function
this call of P118 will perform. The data type parameter is entered as a two-digit
parameter in the range of 0-33. A summary table of the data types described
below is given in Appendix B, A Summary of Data Types, of this manual for
quick reference.

As a general rule, this function is applied only to data packets with the ID
specified in parameters 05..07. The action applies to a certain number of bits
within the data frame that is specified in parameter 10, starting at the bit
specified in parameter 09. In some cases the number-of-bits parameter is
overridden implicitly by the data type specified, e.g. IEEE4 data is always 32
bits in length. For integer values, the longest integer you read or send from one
datalogger input location is 16 bits as a result of limitations in the datalogger.
See Section 3.2, System Limitations, above for an explanation and work-
arounds.

For data types that read or set status, switches or error codes, only the input
location parameter, multiplier and offset are used. Other parameters can be set
to zero.

As defined by the CAN standard, data is always encoded or decoded on the
assumption that the least significant bit is transmitted last or is on the ‘right-
hand side’ of a data frame. The data frame can be from 0 to 64 bits in length,
but is normally a multiple of 8-bit bytes. This means there are typically 0-8
bytes in the data frame.

Please refer to Appendix D, Examples of CAN Data Frames and Data
Encoding and Decoding
, for examples of typical data frames and how to
decode data within them. Appendix D, Examples of CAN Data Frames and
Data Encoding and Decoding
, also contains diagrams to show the method of
pointing to the start bit within the data frame.

18

Advertising