FB_Cylinder![This function or function block supports PLCopen motion PLCopen motion icon](../Resources/Images/Icon_PLCopen.png)
![This function or function block supports Pipe Network motion Pipe Network motion icon](../Resources/Images/Icon_PipeNetwork.png)
Description
This function block can be used to control a cylinder and the Limit Switches.
There are two inputs InA and InB to set the direction of the movement and the belonging LimSwitches LsA and LsB.
If InA is set to TRUE the output DirA is set to TRUE and after a time value defined by CtrlTime the LsA has to become TRUE otherwise a fault FaultLsA appears. Just as in direction B.
If both LsA and LsB are TRUE then a Fault depending of the output is set. If both InA and InB are given (e.g. to stop the cylinder movement) no limit switch is controlled.
All faults can be reset by input iResetFault.
Arguments
Input
iInA |
Description |
Set direction A |
Data type |
BOOL |
|
iInB |
Description |
Set direction B |
Data type |
BOOL |
|
iLsA |
Description |
Limit Switch at End of direction A |
Data type |
BOOL |
|
iLsB |
Description |
Limit Switch at End of direction B |
Data type |
BOOL |
|
iCtrlTime |
Description |
Max Time till Lim.Sw. has to be reached |
Data type |
TIME |
|
iResetFault |
Description |
Reset Fault (Is set to FALSE by UDFB |
Data type |
BOOL |
Output
oDirA |
Description |
Direction A |
Data type |
BOOL |
|
oDirB |
Description |
Direction B |
Data type |
BOOL |
|
oFaultLsA |
Description |
Fault of Lim.Sw. at End direction A |
Data type |
BOOL |
|
oFaultLsB |
Description |
Fault of Lim.Sw. at End direction B |
Data type |
BOOL |
Usage
The signal flow is valid for both directions (A and B)
If oDirA AND oDirB are active there is no Fault Control.
The Fault can be reset by iRestFault = True.
Example
ST
//Electric Cylinder with limit switch controls
Inst_FB_Cylinder( dirA, dirB, LimitSwitchA, LimitSwitchB, CtrlTime, ResetFault );
A := Inst_FB_Cylinder.oDirA;
B := Inst_FB_Cylinder.oDirB;
FaultLimitSwitchA := Inst_FB_Cylinder.oFaultLsA;
FaultLimitSwitchB := Inst_FB_Cylinder.oFaultLsB;
Function Block Diagram
FFLD