2.2.2 PLC

The PLC structure is an array of character positions followed by an array of data elements. The data elements for any PLC MUST be the same size of zero or more bytes. The number of CPs MUST be one more than the number of data elements. The CPs MUST appear in ascending order. There are different types of PLC structures, as specified in section 2.8. Each type specifies whether duplicate CPs are allowed for that type.

If the total size of a PLC (cbPlc) and the size of a single data element (cbData) are known, the number of data elements in that PLC (n) is given by the following expression:

Formula for number of data elements in the PLC. N =  cbplc minus 4 over 4+ cbdata

The preceding expression MUST yield a whole number for n.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

aCP (variable)

aData (variable)

aCP (variable length): An array of CP elements. Each type of PLC structure specifies the meaning of the CP elements and the allowed range.

aData (variable length): Each type of PLC structure specifies the structure and meaning of the data elements, any restrictions on the number of data elements, and any restrictions on the data contained therein. It also specifies the relationship between the data elements and the corresponding CPs.