Number of values (parameter 11:), Location (parameter 12:), Multiplier (parameter 13:) – Campbell Hausfeld SDM-CAN User Manual

Page 31: Offset (parameter 14:), 4 advanced programming techniques, 1 interrupts using the i/o connection

Advertising
background image

Section 3. Programming CR10X, CR7 and CR23X

Number of Values (Parameter 11:)

This is the number of values that will be transferred to or from the datalogger in
one operation. For each value transferred, the number of bits (parameter 10) will
be added to the start bit number (parameter 9) when the start point is referenced to
the right-hand side of the data frame. If referenced to the left-hand side, then the
number of bits is subtracted from the current bit position. The consequence of this
is that successive values are always from right to left in the frame.

Location (Parameter 12:)

This is the start input location where data will be read from or stored to. For any
remaining values/repetition, each value will be read from, or stored into, the next
incremental location.

Multiplier (Parameter 13:)

The data written to, or read from, an input location is multiplied by this parameter.

Offset (Parameter 14:)

The data written to, or read from, an input location has this offset parameter added
to it.

3.4 Advanced Programming Techniques

3.4.1 Interrupts Using the I/O Connection

The I/O port can be used to signal to a datalogger that specific data has been
captured, by the SDM-CAN, from the CAN network and is available for collection
by the datalogger.

The main application for this is where CAN data needs to be captured at a much
faster rate than the normal scan interval of the datalogger and the requirement is to
capture as many CAN packets as possible. In this case the interrupt facility can be
used to give capture of the CAN data as a higher priority over the normal
scheduled measurement tasks, allowing the data to be captured at the highest rate
possible.

The interrupt facility can also help solve the conceptual problem of capturing data
into the datalogger from another system (one of the other devices on the
CAN-Bus) which is running on a different asynchronous clock from the
datalogger itself. This problem needs some consideration in all applications except
those where the datalogger can be made the master (i.e. where it requests data
from the remote devices when its needs the data).

In other applications one has to cater for the possibility that data might not be
available from the CAN network when the datalogger clock causes the datalogger
to run its program. This can happen even when the CAN data is being transmitted
at the same rate as the datalogger is running, simply because the two system
clocks drift relative to each other. The interrupt facility allows you to ensure that
data can be captured at the highest possible rate, but you still have to use special
programming and/or data analysis techniques to synchronise the data with other
measurements. The main problem is that the interrupt function might run more
time stamps to the faster measurements in order to allow normal data analysis.

To enable the interrupt facility on the SDM-CAN you need to index (--) the
program on the number-of-bits parameter (10) of the particular P118 instruction
that you want to cause the interrupt when data is received. The following rules
apply:

3-13

Advertising