Technical data

A-B SuperBridge Technical Reference
21
element requested is beyond the last element in the SB requested file, extended error code
0xF00A is returned. If too many (more than 100 for N13, 50 for F15) elements are requested,
extended error code 0xF009 is returned.
PLC Read-Modify-Write
See [6], page 3.6-5. With A-B terminology, this is command 0x0F, function 0x26. Data in N13
(only) will be modified if the last element requested to be modified is within the SB file range for
N13. If other files are requested, extended error code 0xF006 is returned. If the last element
requested is beyond the last element in N13, extended error code 0xF00A is returned.
PLC-2 UNPROTECTED MESSAGES
A PLC-2 is, from a data message standpoint, a contiguous block of memory. One element of
memory is one byte long. Address notation is typically octal. The SB files are mapped into a
virtual PLC-2 memory with an associated start address, settable in SUPERB.INI, see
[PLC2DATA] Section, PLC2Base entry (page 45). The mapping order is N12, N13, F14, F15.
There are two bytes per element in N files, and four bytes per elements in F files. There are no
spaces between the files. Since the smallest element in SB are integers (two consecutive bytes),
requests to odd addresses are rejected.
To calculate an PLC-2 address for a SB PLC-5 file element, use the following formulas, where A
is the PLC-2 address, O is the PLC2Base entry in SUPERB.INI (page 45), converted to a decimal
value, E is the element number and M is the Controllers entry in SUPERB.INI (page 41):
For N12:
A
OE=+
For N13:
A
OM E=++8
For F14:
A
OM E=+ +15 2
For F15:
A
OM E=++31 2
Most MMI applications, as well as message rungs, take an octal value for the PLC-2 address, so
A normally has to be converted to octal.
PLC-2 did not support floating point numbers. Most MMIs do, however, so when data in F14 or
F15 is manipulated, measures has to be taken to re-create the floating point numbers properly in
the MMI. Floats are accepted or transmitted as IEEE 32 bit format (4 bytes), with the least
significant byte sent or accepted first. The IEEE 32 bit floating point format looks like this:
Bit: 31 30... 23 22... 0
Content: S E7... E0 M1... M23
S: sign bit (1 = negative number, 0 = positive number)
E7-E0 8-bit exponent (bias 127)
M1-M23 23-bit mantissa with implied M0 = 1
In some instances, the word order for the floating point number has to be reversed, most notably
when using a message rung in a PLC-5. This can be done by setting the PLC2ReverseFloat
entry in the [PLC2DATA] Section (page 45) in SUPERB.INI to 1.
For older MMI system, that does not support floating point numbers, an alternate encoding is
available. The first of the two words contains the integer part of the number, maximized to 32767
and minimized to -32767. The second number contains the fractional part represented by an
positive integer, with an implied four decimal places. This encoding is enabled by setting the
PLC2ReverseFloat entry in the [PLC2DATA] Section (page 45) in SUPERB.INI to 2.