4

Example:

In the following example, when enabling contact FST_SCN is set, the parameter blocks for the checksum task function are built. Later in the program when input %I0137 turns on, the number of words being checksummed is read from the PLC operating system. This number is increased by 16, with the results of the ADD_INT function being placed in the “hold new count for set” parameter. The second service request block requests the PLC to set the new word count.

 

_____

 

 

_____

 

FST_SCN

 

 

 

——— ——— XOR_—————————————————MOVE_

 

 

 

 

 

 

WORD

 

 

INT

 

 

 

 

 

%R0150 —I1

Q— %R0150 CONST —IN

Q— %R0152

 

 

 

+00001 LEN

 

 

 

 

00001

 

%R0150 —I2

 

 

_____

 

 

_____

 

 

 

 

 

 

 

 

 

 

 

 

 

.

 

 

 

 

 

 

 

 

.

 

 

 

 

 

 

 

 

 

 

_____

 

_____

_____

 

%I0137

 

——— —————— SVC_————————— ADD_————————————————— SVC_—

 

 

 

REQ

INT

REQ

 

 

CONST —FNC

%R0151 —I1

Q— %R0153 CONST —FNC

00006

 

00006

 

 

%R0150 —PARM

CONST —I2

%R0152 —PARM

 

_____

+00016 _____

_____

 

 

 

 

 

 

 

 

The example parameter blocks are located at address %R0150. They have the following content:

0 = read current count

hold current count

1 = set current count

hold new count for set

%R0150

%R0151

%R0152

%R0153

4-144

Series 90-30/20/Micro Programmable Controllers Reference Manual–September 1998

GFK-0467K

Page 225
Image 225
GE 90-30/20/Micro manual Word INT