ProSoft Technology PTQ-AFC User Manual
Page 104
Quick Start
PTQ-AFC ♦ Modicon Quantum Platform
User Manual
Liquid and Gas Flow Computer for Hydrocarbon Products
Page 104 of 259
ProSoft Technology, Inc.
June 23, 2011
Meter
Daily Archive Start
(Input Register)
Daily Archive End
(Input Register)
Hourly Archive Start
(Input Register)
Hourly Archive End
(Input Register)
6
60500 60549
60550
60599
7
60600 60649
60650
6069 9
8
60700 60749
60750
60799
9
60800 60849
60850
60899
10
60900 60949
60950
60999
11
61000 61049
61050
61099
12
61100 61149
61150
61199
13
61200 61249
61250
61299
14
61300 61349
61350
61399
15
61400 61449
61450
61499
16
61500 61549
61550
61599
Note: Meters 9 through 16 are only available for the PTQ-AFC and MVI56-AFC modules.
The Selected Archive start address can be calculated as (assumes meters are
numbered starting at 1):
Daily Archive Start Address = 60000 + ((Meter Number -1) * 100)
Hourly Archive Start Address = 60000 + (((Meter Number -1) * 100) + 50)
Note: When using processor logic to retrieve extended archives, when possible, use unsigned 16-
bit integer data type variables to hold archive addresses. Unsigned 16-bit integers display data in
the range 0 to 65535.
If your programming software (such as Rockwell Automation
®
RSLogix™5000) does not support
unsigned integer data types, there are a couple of possible alternatives. If your programming
software supports signed 32-bit double integer data types, you may use that type of variable to
hold the addresses above.
If you must use signed 16-bit integer data type variables to contain addresses (such as in the case
of Rockwell Automation RSLogix5 or RSLogix500), you will not be able to enter the values in the
previous table as positive numbers. This is because 16-bit signed integers display values only in
the range -32768 to +32767. But, it is the underlying bit pattern and not the displayed decimal
value that is important to the AFC module.
To enter the correct bit pattern for these addresses into a signed 16-bit integer, you will need to
enter them as negative numbers. To determine the correct negative number, simply subtract 65536
from the address in the table, which will result in a negative number being displayed in the signed
integer variable. This negative number (a binary twos-compliment form of the archive address) will
contain the equivalent bit pattern for the value in the chart if it were held in an unsigned integer
variable.
Use these modified versions of the above formulas to calculate the address values for signed 16-
bit integer variables:
Daily Archive Start Address = ((60000 + ((Meter Number -1) * 100)) - 65536)
Hourly Archive Start Address = ((60000 + (((Meter Number -1) * 100) + 50)) - 65536)
The Selected Archive is continuously maintained to be a copy of the archive
record having the age given in the corresponding "Archive Select" holding
register, as listed in the following table. This means that the Selected Archive
changes whenever either (a) the age in the Open Archive Select register is
changed or (b) when the posting of a new archive causes the ages of all archives
to be increased by 1.