1 collect and retrieve a data value, 2 build a data frame for transmission, Collect and retrieve a data value – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 27: Build a data frame for transmission

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

For convenience the start bit can be referenced from either end of the frame
(see parameter 09 below), but this does not change the direction in which data
is encoded or decoded. Within a byte the MSBit is always first (on the left).

Where the number-of-values parameter (parameter 11) is greater than one, the
same function is applied to successive sections of the data frame, moving
towards the ‘left’ of the frame. Data values are read to, or written from,
successive input locations in the datalogger.

The data types can be grouped into different type of functions, as follows:

3.3.5.1 Collect and retrieve a data value:

This function programs the SDM-CAN to capture a particular data packet and
pass specific data from the data frame within that packet back to the
datalogger.

Parameter Value Data Type

1

Unsigned integer, most significant byte 1st.

2

Unsigned integer, least significant byte 1st.

3 Signed

integer,

most

significant byte 1st.

4

Signed integer, least significant byte 1st.

5

4 byte IEEE floating point number, most significant byte 1st.

6

4 byte IEEE floating point number, least significant byte 1st.

3.3.5.2 Build a data frame for transmission:

The data will be sent to the SDM-CAN where it is written into a working 8-
byte buffer in memory. The data is written starting at the bit position
determined by parameter 09 and the number of bits stored by parameter 10.
When the data type parameter is set in the range of 7..12, the data is written to
the buffer directly, i.e. it overwrites any previous data in that memory (see also
types 13..18).

Once the buffer is complete, after using other P118s with this range of data
types to construct the desired data frame, it is sent out onto the CAN-Bus by a
further call of P118 with parameter 08 set to 25 or 26 (see below).

Parameter Value Data Type

7

Unsigned integer, most significant byte 1st.

8

Unsigned integer, least significant byte 1st.

9 Signed

integer,

most

significant byte 1st.

10

Signed integer, least significant byte 1st.

11

4 byte IEEE floating point number, most significant byte 1st.

12

4 byte IEEE floating point number, least significant byte 1st.


Setting parameter 08 in the range of 13..18 has the same function as in
the7..12 range, except that the data values written are logically ‘OR’ed with

19

Advertising