Pacific Research Solutions PET-820 User Manual

Page 41

Advertising
background image

Pacific Research

PET-820 User Manual

Page 40

4.6.12.1

SET OFFSET VALUES

This command may be used to add or subtract a value or voltage from the analog to digital converter in order to set a zero
point for your scaled reading. We recommend that when setting this value, you establish an analog input voltage that
represents a zero value within your scale. Using command code 63 to read the current analog voltage, add or subtract an
equal value from this reading to set a zero value (the offset will only effect command code 67, the scaled value). When
programming the offset, you may use any ADC value in millivolts or 100 microvolt depending on the analog scale selected.

COMMAND CODE:

56

PROGRAM SYNTAX:

56 [Input] [Sign] [Data] #

READ BACK SYNTAX:

56 [Input] #

WHERE:

Input = 1 through 8
Sign = Zero or Non Zero,

Zero = negative (subtract), Non Zero = positive (add)

Data = 0000 through 4095, the analog converter value

EXAMPLE:

56 1 0 2000 # = Subtract 2000 from the ADC value input #1, 2.000 volts

or 0.2000 volts depending on the range selected

DEFAULT:

All inputs = 0000

4.6.12.2

SET FACTORIAL VALUES

A factorial value is a positive integer that is multiplied with the ADC value in order to setup a volts per scaled unit. You then
use the decimal point position command in order to create a decimal value of this integer. The equation that is performed in
software is:

ADC VALUE:

(ADC+OS) * FACT = RESULT, THEN DECIMAL ADJUST
ADC = Analog to Digital Converter value
OS = OFFSET
FACT = FACTORIAL

As an example, if the transducer that you had connected to the analog board had an output of 2.500 volts which represented
300.0 scaled units and assuming that 0.0 volts represented 0.0 scaled units. We would normally multiply the 2.500 volts by
120 in order to get 300.0 scaled units. With the PET-820, you must first convert your analog voltage to the correct ADC
count, in this case 2500, and multiply that value by 1200 (which is the same as 120.0). The result will be an integer of
3,000,000 or 300.0000 if the decimal point was 4 places to the left. Now to place your decimal point in the proper position,
you count the total number of digits right of the decimal point that were used in the original values. In this case 2.500 used 3
and 120.0 used 1 for a total of 4 which is programmed at the next command code (decimal point position). If you had chosen
a factorial value of 0120 than a value of 3 would have been programmed for the decimal point position, except this would
have left one less digit right of the decimal point in your result. The following table provides examples of different values
that can be used to solve the appropriate conditions.

------ Analog voltage ------

ADC

ADC

Offset

Fact.

D.P.

Round

Full scale

Zero scale

Full scale

value

range

value

value

pos.

off

units

+0.1010 +0.3010 3010

LOW

-0110

0862

5

2

+25.00

-0.000

+1.225

1225

HIGH

+0000

0816

6

2

+1.00

-0.000

+1.225

1225

HIGH

+0000

0816

4

1

+100.0

-2.335

-3.335

3335

HIGH

+2335

0770

4

3

-77.000

Advertising