24.08.2013 Views

CAN-CBX-AI420 - esd electronics, Inc.

CAN-CBX-AI420 - esd electronics, Inc.

CAN-CBX-AI420 - esd electronics, Inc.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Device Profile Area<br />

Calculation of the measured values:<br />

The relationship of the objects is described in the figure on page 63. The single steps for the calculation<br />

of the A/D-value, returned in the objects 6401 h, and 6402 h are described in the following.<br />

Firmware-internal variables (can not be read by the user):<br />

AD-value ............measured values of the A/D-converter without correction<br />

Ana_In_16_og_x ......A/D-value corrected with Offset and Gain<br />

Ana_In_16_accu_x ....A/D-value resulting from addition of n A/D-values<br />

x ...................number of the A/D-channel (1, 2, 3, 4)<br />

Variables accessible via <strong>CAN</strong>open-objects:<br />

Gain_x ....................Gain-factor (object 2405 h, see page 79), default: Gain = 1<br />

Offset_x ...................Offset-value (object 2404 h, see page 78), default: Offset = 0<br />

n .........................Number of additions (object 2402 h, see page 76), default n = 1 (no additions)<br />

m .........................Number of the averaged values (object 2403 h, see page 77),<br />

default: m = 32 (moving average from 32 A/D-values)<br />

Read_Analogue_Input_16_x . . A/D-converter value, which has been calculated of m A/D-values (which has already<br />

been corrected by gain, offset and addition) by the moving average method<br />

(object 6401 h, 6402 h).<br />

Steps of calculation:<br />

1. Correction with gain-factor and offset-value:<br />

2. Addition of the measured values:<br />

Ana_In_16_og_x = Offset_x + (AD-value Gain_x)<br />

Ana_In_16_accu_x = Ana_In_16_og_x (1) + Ana_In_16_og_x (2) + ... + Ana_In_16_og_x (n)<br />

3. Calculation of the moving average:<br />

Ana_In_16_accu_x (1) + Ana_In_16_accu_x (2) + ... + Ana_In_16_accu_x (m)<br />

Read_Analogue_Input_16_x = ------------------------------------------------------------------------------------------------n<br />

m<br />

<strong>CAN</strong>-<strong>CBX</strong>-<strong>AI420</strong> Manual Rev. 1.3 65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!