VGEN (FB)
The 'VGEN' function block is a velocity generator.
The output value is a position setpoint which changes in proportion with the velocity. It is also possible to output a defined number of increments.
The following functions are supported:
- Generation of an increment increase in accordance with a definable velocity.
- Online changes to input parameters
- Modes for continuous and cyclic increment generation
Abbildung 23: VGEN: Block diagram
User interface
|
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. |
|||||||||||
|
boControl |
BOOL |
Start / Stop
|
|||||||||||
|
enMode |
ENUM |
EN_VGEN_MODE Selection mode of the operating mode
|
|||||||||||
|
diVelocity |
DINT |
Setpoint velocity Definition of the final velocity
|
|||||||||||
|
udModPos |
UDINT |
Modulo position Number of increments to be output in mode 'enMode' = VGEN_CYCLE
|
|||||||||||
|
siOverride |
SINT |
Velocity output factor
|
|||||||||||
|
Name |
Type |
Description |
|||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
boEnabAck |
BOOL |
Acknowledgement: Function block is initialised and enabled |
|||||||||||||||||||
|
boErr |
BOOL |
The function block is in an error state
|
|||||||||||||||||||
|
iErrID |
INT |
Error identity number: Diagnostic number is output
Warning
Error
|
|||||||||||||||||||
|
boSetVel |
BOOL |
When 'boSetVel' is active, the target velocity has been reached. |
|||||||||||||||||||
|
diOutVal |
DINT |
Output value |
|||||||||||||||||||
|
Name |
Type |
Description |
|---|---|---|
|
stDevice |
STRUCT |
The device description structure assigns the block a device. |
Description
Abbildung 24: VGEN: Principle of operation
'enMode' is used to differentiate between continuous and cyclic operation.
- Continuous operation: 'enMode' = VGEN_CONT
Generation of a continuous increment increase, corresponding to a predefined setpoint velocity ('diVelocity' [incr/s]). The increment increase is controlled with the control signal ('boControl').'boControl' = TRUE
t1 ≤ t ≤ t2; t3 < t
'boControl' = FALSE
t < t1; t2 ≤ t ≤ t3
- Cyclic operation: 'enMode' = VGEN_CYCLE
Generation of a defined increment increase ('udModPos' [incr]) corresponding to a predefined setpoint velocity ('diVelocity' [incr/s]). The increment increase is controlled with the positive edge of the control signal ('boControl').'boControl' =FALSE -> TRUE (t = t1; t = t3):
Increment increase udModPos
t1 ≤ t ≤ t2; t3 ≤ t ≤ t4