PD File structures are extremely large (41 real values) and can be addressed using two different methods.
The first method addresses the complete 41word real array (164 bytes) so that the entire PD structure can be read/written.
For example: PD30:5 returns 164 bytes.
You can access multiple PD structures by creating larger arrays, which would be in increments of 41 real words or 164 bytes.
The second method of addressing is to access each PID Mnemonic individually by using the .XXX format.
For example: PD30:5.SP returns the Setpoint value.
These points may also be accessed as arrays. For example, to read the 8 setpoint values for PD30:0.SP through PD30:7.SP, you can create a standard real array of 8 elements with a starting at address at PD30:0.SP.
The first two mnemonics in the array are actually short integers called CTL1 and CTL2. These integers are mapped into the first real array value like this:
When you request CTL1 or CTL2 the appropriate 16 bit unsigned integer is returned.
The table below identifies each item within the array so that they can be paired up with their mnemonic. Information for this table can be found in the Rockwell Software Hardware Interface Configuration User's Guide and the Instruction Set Reference for PLC-5 Programmable Controllers. Bit access mnemonics are not implemented. They are supported using the same method as Timers and Counters. The particular bits are also listed in the table below.
Mnemonic |
Bit |
Index as Real |
Description |
|
CTL1 |
|
|
0 |
Control Word 0 |
|
EN |
15 |
|
Enable |
|
CT |
9 |
|
Cascaded Type |
|
CL |
8 |
|
Cascaded Loop |
|
PVT |
7 |
|
Process variable tracking |
|
DO |
6 |
|
Derivative action |
|
SWM |
4 |
|
Set Output |
|
CA |
2 |
|
Control Action |
|
MO |
1 |
|
Mode |
|
PE |
0 |
|
PID Equation |
CTL2 |
|
|
0 |
Control Word 1 |
|
INI |
12 |
|
PID Initialized. This bit is cleared during pre-scan |
|
SPOR |
11 |
|
Set Point out of range |
|
OLL |
10 |
|
Output alarm, lower limit |
|
OLH |
9 |
|
Output alarm, upper limit |
Allen-Bradley communications features. |