Reference Manual

PMAC 2 Software Reference
PMAC I-Variable Specification 49
CONFIG_W2 is the selection word for the second A/D converter set (Option 12A)
CONFIG_W1 is the selection word for the first A/D converter set (Option 12)
DATA_W2 is the matching A/D data from the second A/D converter set (Option
12A)
DATA_W1 is the matching A/D data from the first A/D converter set (Option 12)
A value of 0-7 in CONFIG_W1 tells PMAC2 to read channel ANAI00-07, respectively, as
a 0 to+5V input, resulting in an unsigned value.
A value of 8-15 in CONFIG_W1 tells PMAC2 to read ANAI00-07, respectively, as a -2.5
to +2.5V input, resulting in a signed value.
A value of 0-7 in CONFIG_W2 tells PMAC2 to read channel ANAI08-15, respectively, as
a 0 to+5V input, resulting in an unsigned value.
A value of 8-15 in CONFIG_W1 tells PMAC2 to read ANAI08-15, respectively, as a -2.5
to +2.5V input, resulting in a signed value.
Each phase update (9 kHz default), PMAC2 increments through one line of the table. It
copies the ADC reading(s) selected in the previous cycle into RAM, then writes the next
configuration words to the ADC(s). Typically, this will be used to cycle through all 8
ADCs or pairs of ADCs. To cycle through all 8 pairs of ADCs in unsigned mode, the table
should look like this:
Setup
I-Variable
X Word
Upper 12 Bits
X Word
Lower 12 Bits
Result
Address
Y Word
Upper 12 Bits
Y Word
Lower 12 Bits
I70 0 0 Y:$0708 ANAI08 ANAI00
I71 1 1 Y:$0709 ANAI09 ANAI01
I72 2 2 Y:$070A ANAI10 ANAI02
I73 3 3 Y:$070B ANAI11 ANAI03
I74 4 4 Y:$070C ANAI12 ANAI04
I75 5 5 Y:$070D ANAI13 ANAI05
I76 6 6 Y:$070E ANAI14 ANAI06
I77 7 7 Y:$070F ANAI15 ANAI07
If you wanted to set up all ADCs for a unipolar (unsigned) conversion, the following
commands could be issued
I70=$000000 ; Select ANAI00 and ANAI08 (if present) unipolar
I71=$001001 ; Select ANAI01 and ANAI09 (if present) unipolar
I72=$002002 ; Select ANAI02 and ANAI10 (if present) unipolar
I73=$003003 ; Select ANAI03 and ANAI11 (if present) unipolar
I74=$004004 ; Select ANAI04 and ANAI12 (if present) unipolar
I75=$005005 ; Select ANAI05 and ANAI13 (if present) unipolar
I76=$006006 ; Select ANAI06 and ANAI14 (if present) unipolar
I77=$007007 ; Select ANAI07 and ANAI15 (if present) unipolar
To set up the configuration words for bipolar analog inputs, the commands could look like
this:
I70=$008008 ; Select ANAI00 and ANAI08 (if present) bipolar
I71=$009009 ; Select ANAI01 and ANAI09 (if present) bipolar
I72=$00A00A ; Select ANAI02 and ANAI10 (if present) bipolar
I73=$00B00B ; Select ANAI03 and ANAI08 (if present) bipolar
I74=$00C00C ; Select ANAI04 and ANAI08 (if present) bipolar