Pacific Research Solutions PET-820 User Manual

Page 42

Advertising
background image

Pacific Research

PET-820 User Manual

Page 41

The following list are items to consider while you are setting up values for the purpose of scaling.

1.

Use the offset value to set a zero point, remember that if your span was 2.000 volts (-1.000V to +1.000V) and you
want to offset the -1.000V to 0.000V. Adding 1.000V to the ADC value will still have a span of 2.000 volts
(0.000V to +2.000V).

2.

Pay attention to high and low range mode of the ADC, this will effect the decimal point position.

3.

To divide an ADC value, use a factorial value less than one. This is done by increasing the decimal point position so
that the factorial value becomes a 0.XXXX value.

4.

If the sign identifier is disabled, keep in mind that -0.1 and +0.1 will now appear to have the same value "zero point
one".

COMMAND CODE:

57

PROGRAM SYNTAX:

57 [Input] [Data] #

READ BACK SYNTAX:

57 [Input] #

WHERE:

Input = 1 through 8
Data = 0000 through 2047

EXAMPLE:

57 1 1200 # = Multiply analog input #1 value by 1200

DEFAULT:

All inputs = 1000

4.6.12.3

SET DECIMAL POINT POSITION

The decimal point position is used to convert the scaled integer value to a decimal value. When the PET-820 multiplies the
ADC and factorial values, the result is returned as an integer. To convert this integer to a decimal value you must define the
decimal point position. This is done by counting the total number of digits right of the decimal point that were used in the
ADC and factorial values. (For more detailed information on this procedure, please refer to section 4.6.12.2 Set Factorial
Values).

COMMAND CODE:

58

PROGRAM SYNTAX:

58 [Input] [Data] #

READ BACK SYNTAX:

58 [Input] #

WHERE:

Input = 1 through 8
Data = 0 through 7

EXAMPLE:

58 1 4 # = Set the decimal point position 4 digits to the left
ADC + offset = 0345 (0.345), decimal point position = 3
Factorial = 0255 (25.5), decimal point position = 1
Then 0345 X 0255 = 87975 with a decimal point position of 4 the result would be 8.7975

DEFAULT:

All inputs = 6

Advertising