The merit function operand MXAI uses field number, not Px and Py.
From help file:
Maximum angle of incidence. This boundary operand traces the marginal and chief rays from defined Field and reports the maximum angle at the surface defined by Surf. See MNAI for more details about the input parameters.
However, if there is a ray somewhere else in the pupil with AOI larger than one of the marginal or chief rays available with this operand, you may need an alternate approach. For instance, you could use a ZPL macro to loop through a grid of Px and Py values and calculate the RAID operand. Here is a simple bit of code that would do it. This uses a 101 x 101 grid of pupil coordinates, but you can adjust accordingly. Also, the normalized field coordinates Hx, Hy are both set to 0 so this only evaluates a single field. You can add another 2 layers of FOR loops to iterate through Hx and Hy values as well, but this should get you started.
C = OCOD("RAID")
FOR i, 1, 101, 1
PX = (i-1)/50-1
FOR j, 1, 101, 1
PY = (j-1)/50-1
AOI = OPEV(C, 0, 1, 0, 0, PX, PY)
PRINT PX, $TAB(), PY, $TAB(), AOI
NEXT
NEXT
Edited to add: normalized pupil and field coordinates should really be accessible as independent variables in universal plots.