8 phase lead/lag instruction (llag) – Yaskawa Ladder Works Programming Manual User Manual
Page 142

7.8 PHASE LEAD/LAG Instruction (LLAG)
7-21
7.8 PHASE LEAD/LAG Instruction (LLAG)
[Outline]
The LLAG instruction calculates the phase lead/lag according to the contents of a previously set
parameter table. The input (Input) to the LLAG operation must be integer or real number data.
Double-length integer data cannot be used. The configurations of the parameter tables for integer
and real number data are different. Operations are performed by processing each parameter as an
integer consisting of the lower-place 16 bits.
Table of Integer Type LLAG Instruction Parameters
ADR
Type Symbol
Name
Specification
I/O
0
W
RLY
Relay I/O
Relay input, relay output
*1
IN/OUT
1
W
T2
Phase lead time
constant
Phase lead time constant (ms)
IN
2
W
T1
Phase lag time
constant
Phase lag time constant (ms)
OUT
3
W
Y
LLAG output
LLAG output (may also be output to the A register)
OUT
4 W REM Remainder
Storage
of
remainder
OUT
5
W
X
Input value storage
Storage of the input value
OUT
*
1
: Relay I/O Bit Assignment
BIT
Symbol
Name
Specification
I/O
0
IRST
LLAG reset
"ON" is input when LLAG is reset.
IN
1 to 7
-
(Reserve)
Reserve relay for input
IN
8 to F
-
(Reserve)
Reserve relay for output
OUT
Table of Real Type LLAG Instruction Parameters
ADR
Type Symbol
Name
Specification
I/O
0
W
RLY
Relay I/O
Relay input, relay output
*1
IN/OUT
1 W
-
(Reserve) Reserve
register
-
2
W
T2
Phase lead time
constant
Phase lead time constant (s)
IN
3
W
T1
Phase lag time
constant
Phase lag time constant (s)
IN
4
W
Y
LLAG output
LLAG output (may also be output to the F register)
OUT
5
W
X
Input value storage
Storage of the input value
OUT
*
1
: Relay I/O Bit Assignment
BIT
Symbol
Name
Specification
I/O
0
IRST
LLAG reset
"ON" is input when LLAG is reset.
IN
1 to 7
-
(Reserve)
Reserve relay for input
IN
8 to F
-
(Reserve)
Reserve relay for output
OUT
Here, the LLAG operation is expressed as follows:
Y
1 + T2×S
X
=
1 + T1×S
; ie. T× ( dY/dt ) + Y = T2× ( dX/dt ) + X
The following operation is performed within the LLAG instruction with dt = Ts, dY = Y-Y', and dX = X-X'
T1×Y' + ( T2 + Ts )×X – T2×X' + REM
Y =
T1 + Ts
X : input value
Y : output value
X' : previous input value
Y' : previous output value
Ts : scan time set value
Y = 0, REM = 0, X = 0, are output when the LLAG reset (RST) is "ON".