
16
Example: A module with NID = 0x02 has a NH
3
sensor which is currently transmitting a reading
19.5ppm NH
3
(0x419C0000). The desired or true value is 20.95ppm (0x41A7999A).
The following messages are sent to the module perform the SPAN:
CANid
byte 0
byte 1
byte 2
byte 3
byte 4
byte 5
byte 6
byte 7
0x602
0x23
0x00
0x50
0x00
0x00
0x00
0x9C
0x41
0x602
0x23
0x01
0x50
0x00
0x9A
0x99
0xA7
0x41
0x602
0x2F
0x23
0x10
0x01
0x0E
If the ECM Error Code is from 0x10 to 0x3F inclusive, there is a problem with the module
and/or the sensor memory. Therefore the SPAN will be ignored. A successful SPAN can be
determined by reading locations 0x5000 and 0x5001 in the OD by performing an SDO Read. If
the SPAN was successful those locations will read as 99999.0. There is an OS Command Reply
which can be read as well to determine if the SPAN was successful (see Appendix B).
8.2
Canceling (Erasing) the ZERO and SPAN
The following command, when sent to the NH
3
CAN module, erases the user NH
3
ZERO and
SPAN information stored in the sensor’s connector. Thus, the NH
3
sensor reverts to the factory
calibration:
CANid
byte 0
byte 1
byte 2
byte 3
byte 4
byte 5
byte 6
byte 7
0x600+NID
0x2F
0x23
0x10
0x01
0x12
8.3
Modifying the Pre-Broadcast Averaging of Data
The NH
3
sensor output (CEL1 and CEL2) voltage data is averaged prior to being broadcast. Each
is averaged by the module every 5ms independent of the TPDO broadcast rate (see section 8.6).
The averaging filter (
α
) can range from 0.001 (heavy averaging) to 1.000 (no averaging). The
averaging filters (also called recursive averaging filters or digital low-pass filters) are used as
follows:
AvgData
n+1
=
α
x Data
n
+ (1 –
α
) x AvgData
n
Where:
AvgData
n+1
= Current averaged data value broadcast by the module.
α
= User-programmable averaging filter, also called “alpha”. (Range 0.001 to 1.000)
Data
n
= Current data value measured by the module.
AvgData
n
= Previous averaged data value broadcast by the module 5ms ago.
There is one
α
for CEL1 and one
α
for CEL2. The defaults are 0.375 and are stored in non-
volatile memory (EEprom) in the module. Note that NH
3
is calculated from both the CEL1 and
CEL2 measurements and therefore are affected by both
α
averaging values. For best performance
set both alphas to the same value.
Summary of Contents for NH3CAN
Page 4: ...4...
Page 7: ...7 P N 02 12 P N 06 07...