Programming techniques chapter 5 – Rockwell Automation 1775-MX_S4A,D17756.3.1 User Manual PLC-3 BACKUP CONC(OR.DU1 User Manual

Page 92

Advertising
background image

Programming Techniques

Chapter 5

5-11

The checksum is stored in file 0, word 5 and the checksum done bit is
stored in file 0, word 4, bit 17 of the data table status section. The done bit
is set when the checksum operation is completed. It remains set until reset
manually or cleared automatically by the application program.

Figure 5.4 shows one use of the checksum. In this example, the status
value is compared to a known good value, which you previously stored in
file 0, word 1 of the binary section. If the values are not equal, the program
jumps to an unused label (label 255). The PLC-3 processor then declares a
major fault (BAD ADDRESS) and shuts down. The checksum done bit
(S0:4/17) keeps the PLC-3 processor from performing the comparison
before a checksum is calculated.

Figure 5.4

Checksum Operation

| S0:4 +NEQ–––––––––––––––+ 255

|

+––] [––+A <> B

+–––––––––––––––––––––––––––––––––––––––––––––(JMP)–+

| 17 |Source A S0:5|

|

| | 0000000000000000|

|

| |Source B B0:1|

|

| | 0000000000000001|

|

| +––––––––––––––––––+

|

| S0:4 S0:4

|

+––]

[––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––(U)––+

| 17 17

|

10983ĆI

Important: When using rungs like those in Figure 5.4, be sure to disable
the rungs before editing the program. The PLC-3 does not calculate a
checksum during on-line editing, but when on-line editing is complete, it
recalculates the checksum. You can re-enable the rungs after editing is
complete and you update the reference value.

Advertising