FB_Cylinder
Function Block
A function block groups an algorithm and a set of private data. It has inputs and outputs. - Used to control a cylinder and the Limit Switches.
Inputs
|
Input |
Data Type |
Range |
Unit |
Default |
Description |
|---|---|---|---|---|---|
|
iInA |
BOOL |
|
|
|
Set direction A. |
|
iInB |
BOOL |
|
|
|
Set direction B. |
|
iLsA |
BOOL |
|
|
|
Limit Switch at end of direction A. |
|
iLsB |
BOOL |
|
|
|
Limit Switch at end of direction B. |
|
iCtrlTime |
TIME |
|
|
|
Max time until LimitSwitch has to be reached. |
|
iResetFault |
BOOL |
|
|
|
Reset Fault (is set to FALSE by UDFB |
Outputs
|
Output |
Data Type |
Range |
Unit |
Description |
|---|---|---|---|---|
|
oDirA |
BOOL |
|
|
Direction A. |
|
oDirB |
BOOL |
|
|
Direction B. |
|
oFaultLsA |
BOOL |
|
|
Fault of LimitSwitch at the end of direction A. |
|
oFaultLsB |
BOOL |
|
|
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.
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;





