6 read error counters (type 27), 7 read and reset the error counters (type 28), 8 read status (type 29) – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 29: Response (type 26), Read error counters (type 27), Read and reset the error counters (type 28), Read status (type 29)

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

3.3.5.5 Set-up previously built data frame as a Remote Frame Response (type 26):

When parameter 08 is set to 26, P118 will configure the SDM-CAN to use a
previously ‘built’ data frame as remote frame response for packets of the
specified ID. The length and start positions are specified as for data type 25.

3.3.5.6 Read error counters (type 27):

This will return 4 values, in successive input locations starting at the location
set by parameter 12, which show certain errors the SDM-CAN has recorded.
The errors are written in the following order: transmit, receive, overrun and
watchdog counts. Each is a count from 0 to 255.

The transmit, receive and overrun counters are measures of the errors on the
CAN-Bus network as defined by the CAN standards. If the transmit counter
reaches 255 then the CAN device goes into a ‘bus-off’ state, where it
effectively disconnects itself from the network.

If the SDM-CAN switches to the ‘bus-off’ state, any further reads of the error
counters will show the transmit counter fixed at 127. The counters then need to
be reset to enable further use of the SDM-CAN (see data type 28, below). If
this situation occurs on a regular basis, firstly check the datalogger program
(P118 parameters). If these are correct, check the structure and design of the
network.

The watchdog counter only increments (and is automatically reset) when the
SDM-CAN ‘crashes’ either due to an internal software error or a hardware
fault. Please contact Campbell Scientific for further advice.

3.3.5.7 Read and reset the error counters (type 28):

This functions in exactly the same way as type 27 except that after reading the
error counters they are reset to zero. This will also re-enable the SDM-CAN
interface to the CAN-Bus if it has automatically entered the ‘bus-off’ state.

When the counters are reset, the CAN controller chip enters a special state and
waits until it sees a period equal to 11 successive bits of inactivity on the CAN-
Bus before it returns to the normal ‘on-line’ state. Therefore this function
should not be called too frequently otherwise data may be lost.

3.3.5.8 Read status (type 29):

This data type instructs the datalogger to request the current status of the SDM-
CAN and writes the results into a single, specified, input location. The status is
encoded within that location in the format ‘abcd’ where each letter is a digit in
the range 0 to 9 indicating a different type of status information.

Status ‘a’:

0

This digit is currently unused.

Status ‘b’:

0

This digit is currently unused.

Status ‘c’:

0

This digit is currently unused.

Status ‘d’:

0

Bus-On; the SDM-CAN is involved in bus activities. All of
the error counters are less than 96.

21

Advertising