GE VersaMax PLC User Manual page 209

Table of Contents

Advertisement

FST_SCN
MOVE
INT
CONST
IN
+04608
%I0016
MOVE
INT
CONST
IN
+00000
%T0001
%I0017
%R0303
CONST
00FF
%T0001
%I0017
MIN_SEC
The Service Request Function
For public disclosure
11.8.3.3 Example of SVCREQ 7
In the example, when called for by previous logic, a parameter block for the time-of-day
clock is built. It requests the current date and time, then sets the clock to 12 noon using
BCD format. The parameter block is located at location %R0300. Array NOON has been
set up elsewhere in the program to contain the values 12, 0, and 0. (Array NOON must
also contain the data at %R0300.) BCD format requires six contiguous memory locations
for the parameter block.
MOVE
INT
Q
NOON
CONST
IN
+00000
MOVE
INT
Q
%R0300
CONST
IN
+00001
AND_
WOR
%R0303
Q
%R0303
I1
I2
MOVE
INT
IN
Q
%R0304
Q
MIN_SEC
Q
%R0301
CONST
+00007
%R0300
ADD_
INT
Q
%R0303
I1
NOON
I2
MOVE
INT
CONST
IN
Q
%R0300
+00001
%T0001
SVC_
REQ
FNC
PARM
SVC_
REQ
CONST
FNC
+00007
%R0300
PARM
GFK-1503E User Manual 209

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents