integral

PLCopen motion icon

 Function BlockClosed A function block groups an algorithm and a set of private data. It has inputs and outputs. - Calculates the integral of a signal with respect to time.

Inputs

Input

Data Type

Range

Unit

Default

Description

CYCLE

TIME

 

 

 

Sampling period.

Must not be less than the target cycle timing.

R1

BOOL

 

 

 

Overriding reset.

RUN

BOOL

 

 

 

Run command:

  • TRUE = integrate.
  • FALSE = hold.

X0

REAL

 

 

 

Initial value.

XIN

REAL

 

 

 

Input signal.

Outputs

Output

Data Type

Range

Unit

Description

Q

DINT

 

 

Running mode report: NOT (R1).

XOUT

REAL

 

 

Output signal.

Remarks

  • The time unit is seconds.
  • The output signal has the units of the input signal multiplied by seconds.
  • The integral block samples the input signal at a maximum rate of 1 millisecond.

FBD Language Example

IntegralFbd.gif (1683 octets)

FFLD Language Example

IntegralLd.gif (1773 octets)

IL Language Example

(* MyIntg is a declared instance of INTEGRAL function block. *)
Op1: CAL MyIntg (RUN, R1, XIN, X0, CYCLE)
     FFLD  MyIntg.Q
     ST  Q
     FFLD  MyIntg.XOUT
     ST  XOUT

ST Language Example

(* MyIntg is a declared instance of INTEGRAL function block. *)
MyIntg (RUN, R1, XIN, X0, CYCLE);
Q := MyIntg.Q;
XOUT := MyIntg.XOUT;

See Also