PMAC/PMAC2 V1.17C Addendum 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:
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 I75=$00D00D ; Select ANAI05 and ANAI08 (if present) bipolar I76=$00E00E ; Select ANAI06 and ANAI08 (if present) bipolar I77=$00F00F ; Select ANAI07 and ANAI08 (if present) bipolar Once this setup has been made, PMAC2 will automatically cycle through the analog inputs, copying the converted digital values into RAM. These image registers can then be read as if they were the actual A/D converters.
For user program use, the image registers would be accessed with M-variables. Suggested definitions for unipolar (unsigned) values are:
M1000->Y:$0708,0,12,U ; ANAI00 image register; from J1 pin 1 M1001->Y:$0709,0,12,U ; ANAI01 image register; from J1 pin 2 M1002->Y:$070A,0,12,U ; ANAI02 image register; from J1 pin 3 M1003->Y:$070B,0,12,U ; ANAI03 image register; from J1 pin 4 M1004->Y:$070C,0,12,U ; ANAI04 image register; from J1 pin 5 M1005->Y:$070D,0,12,U ; ANAI05 image register; from J1 pin 6 M1006->Y:$070E,0,12,U ; ANAI06 image register; from J1 pin 7 M1007->Y:$070F,0,12,U ; ANAI07 image register; from J1 pin 8 M1008->Y:$0708,12,12,U ; ANAI08 image register; from J1 pin 9 M1009->Y:$0709,12,12,U ; ANAI09 image register; from J1 pin 10 4 V1.17C Firmware Version 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