System Pointer Address of ACR Global Variables, P0-P4095
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:
AR-xxCEÂ 0xA0600020
ACR9000 0x400009Â Â Â Â (same for 9030,9040,9600,9630,9640)
ACR8020 0x400009
ACR8010 0x403E08
ACR8000 0x403E08
ACR2000 0x400008
ACR1505 0x400009
ACR1500 0xC08008
ACR1200 0x400008
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.
Â
Note for Aries Controller (AR-xxCE), all memory accesses are byte addresses, so the equation to access globals on the CE is different:
Peek address = Global_variable_address + 4 + (index*8), where index = 0 to (number of globals-1).
Â
Update 23-Mar-2012 JW