Remote-processing RPC-2300 Manuel d'utilisateur Page 26

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 36
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 25
ANALOG I/O CHAPTER 8
Page 24 RPC-2300
Converting analog measureme nts
Inputs can be converted to engineering units of
measurement by performing scaling calculations in the
program. The AIN function returns values from 0 to
4095. To change these numbers into something more
meaningful, use the following formula:
var = K * AIN(n)
n is the analog channel to read. K is the scaling
constant. K is obtained by dividing the highest number
in the range of units by the maximum AIN count (4095).
Example 1: To measure the results of an A/D
conversion in volts and the voltage range is 0 to 5V,
divided 5 by 4095 to obtain K.
K = 5/4095
K = .001221
Your program could look something like:
1000 C = .001221 * AIN(N)
Example 2: You want to measure a 0 to 200 PSI
pressure transducer with a 0 to + 5V output. Divide 200
by 4095 to obtain the constant K.
K = 200 / 4095
K = .0488
The code can then look like:
1000 B = .0488*AIN(0)
CALIBRATION
The A/D converter is calibrated using an external
voltmeter. For 12 bit accuracy, you must use a
voltmeter with an accuracy of 0.02% or better.
To calibrate the SBS-2300:
1. Connect the digital voltmeter ground to U10,
pin 11.
2. Connect the digital voltmeter '+ ' lead to U10,
pin 14.
3. Adjust trim pot R7 for 5.000VDC.
You may increase the reference voltage to a higher
value, up to 5.12V. This will allow you to detect if an
input device is at or above its output range (5V).
ASSEMBLY LANGUAGE ACCESS
The A/D converter is serially accessed. The routines
used to initialize, read and write to this chip are a part of
CAM BASIC II and are not available for distribution.
There are no external assembly language accesses (calls
or jumps) available.
ANALOG OUTPUT
Two optional analog output channels can be
independently configured for three voltage ranges.
These ranges are jumpered in hardware. Refer to the
following table for jumper settings.
Range J7-17 J7-19
(AOT 0) (AOT 1)
0 - + 5 W2[2-4] W2[1-3]
0 - + 10 W2[8-10] W2[7-9]
±5V W2[6-8] W2[5-7]
W3 is always set [1-2] and [5-6]. Channel 0 output is
pin 17 and channel 1 is pin 19.
Programming voltage output
The AOT command is used to send data to an analog
output. The syntax is:
AOT channel, value
Where:
channel specifies the analog channel to write data to
and can be either 0 or 1. channel 0 is on pin 17 and
1 is on pin 19.
value is the value to output from 0 to 4095.
Use the following table to convert from a desired voltage
to a value.
Range Formula
0 - 5 value= V * 819
Vue de la page 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 35 36

Commentaires sur ces manuels

Pas de commentaire