END IF
END DO
END FOR
TRANSMIT CRC_REGISTER as 2-byte CRC field
The host software sends two kinds of commands: block reads and block
writes. This section shows examples of both commands.
NOTE
If you read data from a loop set to SKIP, the controller will
send an empty packet for that loop.
This section does not show how to calculate the error check value
included with every packet. For help calculating the error check value,
see the section on BCC or CRC earlier in this chapter.
Block Read
This example shows the block read command the host software sends,
the controller’s responses, and the software's acknowledgment.
Situation: Read process variables for loops 1 to 8.
• 8 process variables 2 bytes each = 16 bytes from data table address
x0280.
• Character values are represented in hex.
• The sender is device address 0.
• The destination is device address 8 (controller address 1).
• The software sends transaction number 00
Data for a Write Command
For a block write command, the block contains the bytes to write (up to
242 bytes of data). The controller sends back a message packet without
data.
Two-Byte Data Types
For two-byte data types, like process variable and setpoint, the
controller or host software sends the data in two-byte pairs with the least
significant byte first.
Figuring Block Size
In order to read parameter values, you must know how many bytes to
request. Parameter values are stored contiguously such that the setpoints
for all the loops are stored together and in loop number order. For
example, to read the deviation alarm deadband value for loops one to
five, you would read five bytes starting at x05A0. Some parameters,
such as setpoint, require two bytes of memory to store. So, for example,
if you want to read the setpoint for four loops, you must read eight
bytes.
Figure total block size in bytes for most loop parameters this way (do
not forget the pulse loop):
(Data Size) * (Number of Loops)
Some parameters have values for both heat and cool. Figure block size
for such a parameter this way:
2 * (Data Size) * (Number of Loops)
One exception is the units for each loop. Figure the data size for the
units this way:
3 * (Number of Loops)
Parameters that are not loop parameters (like system status, digital
inputs, or digital outputs) have specific data sizes. These data sizes are
listed in the data table in the next section
Anafaze/AB Data Table Summary
Each address holds one byte of data. Each parameter value requires one
or two addresses to store depending on the type of data. The table below
indicates the number of bytes for each data type. The data type for each
parameter is indicated in the tables on the following pages.
Because each loop is individually configurable, the number of instances
of many parameters depends on the number of loops in the controller.
Therefore, the number of bytes for these parameters is listed in the
tables on the following pages in terms of the number of loops in the
controller.
The storage requirements for some parameters depend on the number of
digital inputs or digital outputs in the controller (MAX_DIGIN_BYTES
and MAX_DIGOUT_BYTES). The storage of ramp-soak profile
parameters depend on the number of profiles (MAX_RSP), the number
of segments per profile (MAX_SEG), the number of triggers per
segment (MAX_TRIG) and the number of events per segment
(MAX_EVENT).
The table below shows the values for each of these factors. Use them to
calculate the number of bytes for each parameter.
Data Type and Symbol Data Size
Unsigned char (UC) 1 byte
Signed char (SC) 1 byte
Unsigned int (UI) 2 bytes
Signed int (SI) 2 bytes
Ordering of Heat and Cool Channel Parameters
For parameters that have both heat and cool settings the heat values are
stored in the first registers and the cool values are stored in the registers
starting at the listed address plus MAX_CH.
NOTE
Data table parameters 46 to 60 and 100 are ramp-soak
parameters. They are only used in controllers with the
ramp-soak option. Parameters 81 to 95 are enhanced features and only available in controllers with the enhanced
features option.
Ordering of Ramp-Soak Profile Parameters
Ramp-soak profile parameters are ordered first by profile, then by
segment where applicable. So, for example, the first eight bytes of the
Ready Events parameter are the ready segment event states for the first
profile (profile A) and the next eight bytes are for profile B and so on. In
the case of the segment triggers, the first byte contains the first trigger
setting for the first segment of profile A, the second byte contains the
settings for the second trigger for the first segment of profile A, the third
byte contains the settings for the first trigger for the second segment of
profile A and so on.
Anafaze/AB Protocol Data Table
Number Description Address
in Hex Type Number of Bytes
0 Proportional Band/Gain 0020 UC MAX_CH * 2
1 Derivative Term 0060 UC MAX_CH * 2
2 Integral Term 00A0 UI MAX_CH * 4
3 Input Type 0120 UC MAX_CH
4 Output Type 0180 UC MAX_CH * 2
5 Setpoint 01C0 SI MAX_CH * 2
6 Process Variable 0280 SI MAX_CH * 2
7 Output Filter 0340 UC MAX_CH * 2
8 Output Value 0380 UI MAX_CH * 4
9 High Process Alarm Setpoint 0400 SI MAX_CH * 2