FB_Cylinder
Function Block - Used to control a cylinder and the Limit Switches.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
iInA |
BOOL |
FALSE, TRUE |
N/A |
No default |
Set direction A. |
iInB |
BOOL |
FALSE, TRUE |
N/A |
No default |
Set direction B. |
iLsA |
BOOL |
FALSE, TRUE |
N/A |
No default |
Limit Switch at end of direction A. |
iLsB |
BOOL |
FALSE, TRUE |
N/A |
No default |
Limit Switch at end of direction B. |
iCtrlTime |
TIME |
0ms - 24hr |
TIME |
No default |
Max time until LimitSwitch has to be reached. |
iResetFault |
BOOL |
FALSE, TRUE |
N/A |
No default |
Reset Fault (is set to FALSE by UDFB!). |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
oDirA |
BOOL |
FALSE, TRUE |
N/A |
Direction A. |
oDirB |
BOOL |
FALSE, TRUE |
N/A |
Direction B. |
oFaultLsA |
BOOL |
FALSE, TRUE |
N/A |
Fault of LimitSwitch at the end of direction A. |
oFaultLsB |
BOOL |
FALSE, TRUE |
N/A |
Fault of LimitSwitch at the end of direction B. |
Remarks
- There are two inputs, iLnA and iInB, to set the direction of the movement and the belonging LimSwitches iLsA and iLsB.
- If iInA is set to TRUE, the output oDirA is set to TRUE.
- After a time value defined by CtrlTime, the iLsA has to become TRUE otherwise a fault FaultLsA appears.
- Just as in direction B.
- After a time value defined by CtrlTime, the iLsA has to become TRUE otherwise a fault FaultLsA appears.
- If both iLsA and iLsB are TRUE, then a Fault depending of the output is set.
- If both iLnA and iLnB are given (e.g., to stop the cylinder movement), no limit switch is controlled.
- All faults can be reset by input iResetFault.
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.
Figure 1: FB_Cylinder Usage 1
Figure 2: FB_Cylinder Usage 2
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//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;