7 first-order lag instruction (lag) – Yaskawa Ladder Works Programming Manual User Manual

Page 140

Advertising
background image

7.7 FIRST-ORDER LAG Instruction (LAG)

7-19

7.7 FIRST-ORDER LAG Instruction (LAG)

[Outline]

The LAG instruction calculates the first-order lag according to the contents of a previously set
parameter table. The input (Input) to the LAG 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 LAG Instruction Parameters

ADR

Type Symbol

Name

Specification

I/O

0

W

RLY

Relay I/O

Relay input, relay output *S

1

IN/OUT

1

W

T

First-order lag time
constant

First-order lag time constant(ms)

IN

2

W

Y

LAG output

LAG output (also output to the A register)

OUT

3 W REM Remainder

Storage

of

remainder

OUT

*

1

: Relay I/O Bit Assignment

BIT

Symbol

Name

Specification

I/O

0

IRST

LAG reset

"ON" is input when LAG 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 LAG Instruction Parameters

ADR

Type Symbol

Name

Specification

I/O

0

W

RLY

Relay I/O

Relay input, relay output *S

1

IN/OUT

1 W

(Reserve) Reserve

register

2

F

T

First-order lag time
constant

First-order lag time constant(s)

IN

4

F

Y

LAG output

LAG output (also output to the F register)

OUT

*

1

: Relay I/O Bit Assignment

BIT

Symbol

Name

Specification

I/O

0

IRST

LAG reset

"ON" is input when LAG is reset.

IN

1 to 7

(Reserve)

Reserve relay for input

IN

8 to F

(Reserve)

Reserve relay for output

OUT

Here, the LAG operation is expressed as follows:

Y 1
X

=

1+T×S

; ie. T× ( dY/dt ) + Y = X

The following operation is performed within the LAG instruction with dt = Ts and dY = Y-Y':

T×Y' + Ts×X + REM

Y =

T + Ts

X : input value

Y : output value
Y' : previous output value

Ts : scan time set value

Y = 0 and REM = 0 are output when the LAG reset (RST) is "ON".

Advertising