1 high speed block mode, 2 datalogger instruction, High speed block mode – Campbell Scientific SDM-CAN Datalogger to CANbus Interface User Manual

Page 44: Datalogger instruction

Advertising
background image

SDM-CAN Datalogger-to-CANbus Interface

Section 3, Programming CR10X, CR7 and CR23X Dataloggers to use the
SDM-CAN
. To avoid duplication this section of the manual simply references
the relevant paragraphs in that section. For this reason you are advised to read
section three in its entirety to gain a full understanding of all the general
principles and parameter settings.

Currently neither the CR5000, CR9000X nor CR9000 support interrupt driven
events as described above. However, with the extra speed of these dataloggers,
a similar function can be achieved by polling a digital input and only executing
the instructions required when the port is high. The consequences of doing this
in either the slow or fast tables needs to be considered, especially when trying
to synchronize this data with analogue measurements.

4.1.1 High Speed Block Mode

Operating system Version 3 supports a new high speed block mode for SDM
communication that allows much faster data transfers to the logger. This was
implemented for the CR9000 and CR5000 to allow users to run a program at
more than 200Hz with the SDM-CAN. It gives a 5 fold improvement in
performance over normal mode. Block mode operation is activated by using
data types 65 to 70; these are the block mode equivalents of data type’s 1 to 6.
When block mode is active then all CAN data is collected at the beginning of
the scan in parallel with analogue measurements. There are a number of
restrictions when using block mode. There is a limit of 128 values that can be
read in total. Other restrictions are logger specific. On a CR9000 - firstly you
can only have one differently addressed SDM-CAN in each scan unless all
other differently addressed SDM-CAN’s are using normal mode data types 1 to
6. Secondly you cannot use conditional statements with SDM-CAN
instructions which are enabled for block mode. Restrictions for use with the
CR9000X/CR5000 are that you must keep all block mode instructions together
and not intermix normal mode instructions within the group of block mode
instructions. You can however put normal mode instructions in front or after
the group of block mode instructions. You cannot use conditional statements
on either normal or block mode SDM-CAN instructions.

Time to execute block mode for a CR9000 in milliseconds with maximum bus
speed `SDMSpeed(0)’ is approximately = 1.50 + 0.1 * n bytes of data.

Time to execute block mode for a CR9000 in milliseconds with default bus
speed is approximately = 2.07 + 0.207 * n bytes of data.

Time to execute block mode for a CR5000 in milliseconds with maximum bus
speed `SDMSpeed(12)’ is approximately = 1.60 + 0.108 * n bytes of data.

Time to execute block mode for a CR5000 in milliseconds with default bus
speed is approximately = 2.12 + 0.27 * n bytes of data.

This timing is only for the block mode instruction and any other instructions
within the scan will reduce the maximum possible scan rate.

4.2 Datalogger Instruction

The SDM-CAN is controlled by an instruction called CANBUS. Please check
that your datalogger’s operating system includes this instruction. You may also

36

Advertising