3 the datalogger instruction – Campbell Hausfeld SDM-CAN User Manual

Page 21

Advertising
background image

Section 3. Programming CR10X, CR7 and CR23X

The simplest solution, in those cases, is to read the value as a series of 16 bit
integers written to separate input locations in the datalogger. These can then
either be combined once the data has been recovered to a computer or, if
some of the resolution is not needed, the data values can be combined in the
datalogger using its normal maths functions. You must bear in mind,
however, the limitations of the 4-byte floating point calculations and the
output resolution of the datalogger.

The CAN standard also allows some types of data to be spread across several
data packets, where those data packets all have the same identifier. Such data
normally would consist of fixed identifiers stored as ASCII data, which do not
normally have to be logged. Reliably capturing such data with the SDM-CAN
is not possible, with the current software, unless the sequential packets are
transmitted relatively slowly. Please contact Campbell Scientific for further
information if you have a requirement to do this.

3) When transmitting CAN frames from the SDM-CAN there are situations

where some frames are not transmitted. This is because the SDM-CAN has a
two layer buffer for transmitted frames. This allows a frame to be transmitted
whilst a new frame is being built. However if your program tries to send
frames too quickly, before earlier frames are sent, the frames will be
overwritten and lost.

This scenario generally does not happen with CR10X / CR23X loggers as
they are not fast enough. But with the CR5000 / CR9000 loggers it is possible
to overrun the double buffer especially in pipe line mode if you are
transmitting more than 2 frames per scan. It is recommended to use sequential
mode in this case as it allows a delay between CAN-BUS instructions.

3.3 The Datalogger Instruction

The instruction used by all of the dataloggers covered in this chapter is Instruction
118. The structure of the instruction and parameter types is shown below. This
structure is given in the same format that normal instructions are shown in the
datalogger manuals. Please refer to the datalogger manual for a description of the
data types, entry of the instruction and how to index (‘--’) parameters.

In some previous versions of datalogger operating systems, Instruction
118 was used for the now obsolete OBDII interface. Older datalogger
manuals and Edlog help systems may still refer to this instruction.
Please make sure you are using a version of the operating system that
supports P118 and refer to a more recent datalogger manual or Edlog
help system.

NOTE

It will be apparent for some functions of P118 that some parameters are not
relevant or have no function. In these cases simply leave the parameter(s) at their
default value(s) which is normally zero.

3-3

Advertising