Svcreq 16: Read Elapsed Time Clock; 1Output Parameter Block For Svcreq 16; 2Example Of Svcreq 16 - GE VersaMax PLC User Manual

Table of Contents

Advertisement

11.16 SVCREQ 16: Read Elapsed Time Clock

%M0223
SVC_
REQ
CONST
FNC
00016
PARM
%R0127
%M0233
%M0234
CONST
00016
%R0131
218
GFK-1503E
For public disclosure
Use SVCREQ 16 to read the system's elapsed time clock. The elapsed time clock
measures the time in seconds since the PLC was powered on.
11.16.1 Output Parameter Block for SVCREQ 16
This function has an output parameter block only. Its length is 3 words.
seconds from power on (low order)
address
seconds from power on (high order)
address + 1
address + 2
100 microsecond ticks
The first two words are the elapsed time in seconds. The last word is the number of 100
microsecond ticks in the current second.
11.16.2 Example of SVCREQ 16
In the example, when internal coil %M0233 is on, the SVCREQ with a parameter block
located at %R0127 reads the system's elapsed time clock and sets internal coil %M0234.
When coil %M0233 is off, the SVCREQ with a parameter block at %R0131 reads the
elapsed time clock again.
The subtraction function finds the difference between the first and second readings, which
have been stored in the SVCREQ parameter blocks. The subtraction ignores the hundred
microsecond ticks.
The difference between the two readings is placed in memory location %R0250.
SVC_
REQ
FNC
%R0131
%R0127
PARM
SUB_
D INT
%R0250
I1
Q
I2
%M0234
S
%M0234
R
VersaMax PLC User Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents