Supplement to ACR Programmers Guide,Binary Host Interface "Application: Binary Global Parameter Access"
The memory address for the global user variables (P0-4095) can be read at the "System Pointer Address" Each controller has a different address based upon it's firmware:
This could be used with the ComACRserver's "GetACRMemory" to retrieve the value of up to 255 global variables at a time.
Using the GetACRMemory for the above address retrieves the Global_Variable_Address.
If the returned address is zero, there are no dimensioned global variables (see the DIM command).
If the returned address is other than zero, use GetACRMemory at this address to receive the number of dimensioned global variables.
Read a global variable P(index) using the following addressing scheme for Peek:
Peek address = Global_Variable_Address + 1 + ( index * 2 )
Where index = 0 to ( number of dimensioned global variables - 1 )
Even though global variables are stored on-board as floating point 64 (FP64) numbers, they are returned as IEEE32 numbers.