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

Enable

BOOL

FALSE

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

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConC3

Error

BOOL

FALSE

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

GoToPosRef

BOOL

FALSE

2: Enables movement control block.

JogFwd

BOOL

FALSE

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

JogBwd

BOOL

FALSE

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.

PosAct

REAL

0

5: Indicates the current position of the system. Format: Degrees

PosRef

REAL

0

6: PosRef setpoint indicates the desired position to locate the system. Format: Degrees

Kp

REAL

10

7: Indicates the proportional gain of the proportional control system

SpeedMin

REAL

20

8: Minimum speed of the drive, expressed as percent of the maximum speed of drive. This value is used during positioning control (GoToPosRef = TRUE).

SpeedMax

REAL

40

9: Maximum speed of the drive, expressed as percent of the maximum speed of drive. This value is used during positioning control (GoToPosRef = TRUE).

PosErr

REAL

0.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)

VirtualLimitMin

REAL

0

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

VirtualLimitMax

REAL

360

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

StopBwd

BOOL

FALSE

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

StopFwd

BOOL

FALSE

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.

JogSpeed

REAL

30

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%

ResetAlarm

BOOL

FALSE

16: Boolean signal that allows to reset warnings.

PosDegLimit

REAL

1

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)

PosTimeLimit

UINT

9000

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

ErrorID

ERROR_ID

3: Error number.

Warning

BOOL

FALSE

4: TRUE if warning is generated.

WarningID

WARNING_ID

5: Warning number.

Run

BOOL

FALSE

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

SpeedRef

REAL

0

7: SpeedRef is input to the drive, the manipulated variable to control the system positioning. Depending on the working mode SpeedRef will be different.

Direction

BOOL

FALSE

8: Drive Direction. If SpeedRef > 0, Direction is TRUE, if SpeedRef < 0, Direction is FALSE.

PosRefReached

BOOL

FALSE

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: