SolarPositionControl (FB)
FUNCTION_BLOCK SolarPositionControl EXTENDS AbbLConC3
Function block to manage the positioning control.
According to the positioning reference, it gets the speed parameters to set the system in the desired position. Output parameters are Run-Stop, Direction and Speed to reach the calculated position of the system.
Depends on the input parameters, the manipulated variable (Speed) to control the actuators will be:
If GoToPosRef = TRUE
Select pulse start for positioning: Start by rising edge of a pulse. The signal has to stay TRUE during the positioning task.
According to the reference of positioning gets the Speed parameter to set the system in this position, by calculating the control action by using a proportional controller.
SpeedRef = (PosRef - PosAct) * Kp * (limit of [SpeedMin and SpeedMax])
If JogFwd = TRUE
SpeedRef = JogSpeed. To move the system forward manually.
If JogFwd = TRUE
SpeedRef = (-1) * JogSpeed. To move the system backward manually
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConC3
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConC3
ErrorBOOLFALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConC3
Input
GoToPosRefBOOLFALSE
2: Enables movement control block.
JogFwdBOOLFALSE
3: In order to manually move the system forward. As long as inptut is to TRUE, and StopFwd is deactivated, Speed = JogSpeed. VirtualLimitMax is not considered when JogFwd is activated
JogBwdBOOLFALSE
4: In order to manually move the system backward. As long as input is set to TRUE, and StopBwd is deactivated, SPEED = (-1) * JogSpeed. VirtualLimitMax is not considered when JogBwd is activated.
PosActREAL0
5: Indicates the current position of the system. Format: Degrees
PosRefREAL0
6: PosRef setpoint indicates the desired position to locate the system. Format: Degrees
KpREAL10
7: Indicates the proportional gain of the proportional control system
SpeedMinREAL20
8: Minimum speed of the drive, expressed as percent of the maximum speed of drive. This value is used during positioning control (GoToPosRef = TRUE).
SpeedMaxREAL40
9: Maximum speed of the drive, expressed as percent of the maximum speed of drive. This value is used during positioning control (GoToPosRef = TRUE).
PosErrREAL0.01
- 10: Indicates the area where the system is considered correctly enough positioned (the control loop considers the PosRef reached.
Note
PosErr value must be larger than resolution of the positioning devices (encoders or inclinometers)
VirtualLimitMinREAL0
11: The lower limit of the movement range of the system. This value is only considered during positioning control (GoToPosRef = TRUE). Jog movements are not influenced by this limit value
VirtualLimitMaxREAL360
12: The upper limit of the movement range of the system. This value is only considered during positioning control (GoToPosRef = TRUE). Jog movements are not influenced by this limit value
StopBwdBOOLFALSE
13: This input should be used in order to integrate the lower limit switch signal which indicates the mechanical lower limit of the movement of the system
StopFwdBOOLFALSE
14: This input should be used in order to integrate the upper limit switch signal which indicates the mechanical upper limit of the movement of the system.
JogSpeedREAL30
15: JogSpeed indicates the Jog speed of drive. This value is expressed as percent of the maximum speed of the drive. During a Jog movement this value will set to Speed output. Range 0-100%
ResetAlarmBOOLFALSE
16: Boolean signal that allows to reset warnings.
PosDegLimitREAL1
- 17: When primary axis of the actuator (gear or hydraulic piston) changes its direction of rotation, this axis covers an angular distance, PosDegLimit, whereas tracker will not change its position.
Only when PosDegLimit is reached, the tracker starts its movement. This concept is similar to “backlash” in gear trains
- PosAct (t) - PosAct (t + PosTimeLimit) > PosDegLimit where ttime,
Note
This value depends on each tracker and its actuator (motors, gears or hydraulic systems)
PosTimeLimitUINT9000
18: Indicates the needed time to cover PosDegLimit distance without any fault. The expected distance must be covered in a time smaller than PosTimeLimit milliseconds. Otherwise, it generates error and corresponding error is displayed. Format: miliseconds
Output
ErrorID3: Error number.
WarningBOOLFALSE
4: TRUE if warning is generated.
WarningID5: Warning number.
RunBOOLFALSE
6: Used as start command for the drive. Is TRUE, if no limit is reached, no error occurred and either a jog command is set or normal operation sets the SpeedRef not to zero
SpeedRefREAL0
7: SpeedRef is input to the drive, the manipulated variable to control the system positioning. Depending on the working mode SpeedRef will be different.
DirectionBOOLFALSE
8: Drive Direction. If SpeedRef > 0, Direction is TRUE, if SpeedRef < 0, Direction is FALSE.
PosRefReachedBOOLFALSE
9: Is TRUE as long as the system has reached the PosRef or it is inside the area between PosErr > (PosRef - PosAct).
Methods:
A_StartAction
B_CyclicAction
C_CleaningAction
D_AbortAction
E_ResetAction
Structure: