4

SVCREQ #6: Change/Read Number of Words to Checksum

Use the SVCREQ function with function number 6 in order to:

Read the current word count.

Set a new word count.

Successful execution will occur, unless some number other than 0 or 1 is entered as the requested operation (see below).

For the Checksum Task functions, the parameter block has a length of 2 words.

To Read the Current Word Count:

Enter SVCREQ function 6 with this parameter block:

0

ignored

address

address + 1

After the function executes, the function returns the current checksum in the second word of the parameter block. No range is specified for the read function; the value returned is the number of words currently being checksummed.

0

current word count

address address + 1

To Set a New Word Count:

Enter SVCREQ function 6 with this parameter block:

1

new word count

address address + 1

Entering 1 causes the PLC to adjust the number of words to be checksummed to the value given in the second word of the parameter block. For either the 331 or 311 CPU, the number can be either 0 or 32; in the 211 CPU, the value can be either 0 or 4.

Note

This Service Request is not available on Micro PLCs.

GFK-0467K

Chapter 4 Series 90-30/20/Micro Instructions Set

4-143

Page 224
Image 224
GE 90-30/20/Micro manual Svcreq #6 Change/Read Number of Words to Checksum, To Read the Current Word Count