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 periodClosed Motor systems having a reciprocating or oscillating motor that operates synchronously with the periodicity of the source which supplies the electrical energy. The period of execution of a pipe is the time spent between two successive computations of set values for the same pipe. The period of execution of a pipe is specified by the PERIOD parameter of the input pipe block..

Must not be less than the target cycle timing.

R1

BOOL

 

 

 

Overriding resetClosed New start of the microprocessor..

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

FFLD Language Example

  • In the FFLD Language, the input rung is the RUN command.
    • The output rung is the Q report status.

IL Language Example

(* MyIntg is a declared instance of INTEGRAL functionClosed A function calculates a result according to the current value of its inputs. 
A function has no internal data and is not linked to declared instances. 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