VIRTUAL_RFGEN (FB)
The function block 'VIRTUAL_RFGEN' (Ramp Function Generator) implements an acceleration ramp generator. The output 'diOutVal' is adapted by ramp times in order to avoid sudden changes of the setpoint values.
Properties of VIRTUAL_RFGEN
- When the block is enabled by 'boEnable', the output is set to 'diMinVal'.
- If 'diPreset' > 'diMinVal', the output is incremented during the selected ramp time up to 'diPreset'.
- By means of 'boStop' = TRUE, the output is decremented to 'diMinVal' during the selected ramp time.
- It depends on the inputs 'boExecRampTime1' and 'boExecRampTime2', which ramp time will become active.
If none of these inputs is set TRUE, 'diRampTime3' is valid. - By means of the inputs 'boPlus' and 'boMinus', the output can be incremented and decremented with the active ramp.
- The output is limited by 'diMaxVal' and 'diMinVal'. They both have to be positive values.
The function block is called in the asynchronous program level PLC_PRG.
VIRTUAL_RFGEN |
|||||
FB enable |
- |
boEnable |
boEnabAck |
- |
Ackn. "FB enable" |
Incrementation |
- |
boPlus |
diOutVal |
- |
Output value |
Decrementation |
- |
boMinus |
|
|
|
Stop |
- |
boStop |
|
|
|
ramp time 1 active |
- |
boExecRampTime1 |
|
|
|
ramp time 2 active |
- |
boExecRampTime2 |
|
|
|
Preset value |
- |
diPreset |
|
|
|
Upper limit |
- |
diMaxValue |
|
|
|
Lower limit |
- |
diMinValue |
|
|
|
Ramp time 1 |
- |
diRampTime1 |
|
|
|
Ramp time 2 |
- |
diRampTime2 |
|
|
|
Ramp time 3 |
- |
diRampTime3 |
|
|
|
millisecond clock |
- |
diClock |
|
|
Name |
Type |
Description |
---|---|---|
boEnable |
BOOL |
Enable signal: With a positive edge, the initialisation of the block starts. As long as 'boEnable' = TRUE, the block remains enabled and is processed by the PLC. In the state 'boEnable' = FALSE the block is no longer enabled and is thus no longer processed. |
boPlus |
BOOL |
Activate increment counting |
boMinus |
BOOL |
Activate decrement counting |
boStop |
BOOL |
Stop (decrement counting) |
boExecRampTime1 |
BOOL |
Ramp time 'diRampTime1' is active |
boExecRampTime2 |
BOOL |
Ramp time 'diRampTime2' is active |
diPreset |
DINT |
Preset value |
diMaxVal |
DINT |
Upper limit |
diMinVal |
DINT |
Lower limit |
diRampTime1 |
DINT |
Ramp time 1 [s] (Default: 5s) |
diRampTime2 |
DINT |
Ramp time 2 [s] (Default: 10s) |
diRampTime3 |
DINT |
Ramp time 3 [s] (Default: 20s) |
diClock |
DINT |
ms counter [ms] |
Name |
Type |
Description |
---|---|---|
boEnabAck |
BOOL |
Acknowledgement: Function block is initialised and enabled |
diOutVal |
DINT |
Output value |
PLC_PRG (asynchronous part of the program) | FPLC_PRG (synchronous part of the program) |
---|---|
VIRTUAL_RFGEN |
|
Associated with this function block, a visualisation is prepared in CoDeSys. |