PLS
Function Block
A function block groups an algorithm and a set of private data. It has inputs and outputs. - Pulse
When the step gets activated, the action is activated for a single execution, and possibly once again when the step is deactivated signal generator.
Inputs
|
Input |
Data Type |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
RUN |
BOOL |
|
|
|
Enabling command. |
|
CYCLE |
TIME |
|
|
|
Signal period. |
Outputs
|
Output |
Data Type |
Range |
Unit |
Description |
|---|---|---|---|---|
|
Q |
BOOL |
|
|
Output pulse signal. |
Remarks
- On every period, the output is set to TRUE during one cycle only.
Time Diagram
FBD Language Example
FFLD Language Example
- In the FFLD
"Free Form Ladder Diagram" Language, the input rung is the IN command. - The output rung is the Q output.
IL Language Example
(* MyPLS is a declared instance of PLS function block. *)
Op1: CAL MyPLS (RUN, CYCLE)
FFLD MyPLS.Q
ST
ST Language Example
(* MyPLS is a declared instance of PLS function block. *)
MyPLS (RUN, CYCLE);
Q := MyPLS.Q;
See Also





