PcoPidCon (FB)

FUNCTION_BLOCK PcoPidCon

This function block is designed to be the primary controller to e.g. PCO_MOTCON or PCO_VALVCON. The function block has build in a PID-controller, and software for manual positioning.

InOut:

Scope

Name

Type

Initial

Comment

Input

SpExt

INT

0

1: External setpoint. Calculated setpoint or output from another PID controller (e.g. PCO_PIDCON) in a cascade control system.

PV

INT

0

2: Process value (to be controlled). Process value obtained from the system

Track

BOOL

FALSE

3: Tracking mode. PCO_PIDCON can be set in Tracking mode if Track = TRUE. Output of the controller will be set to TRACK_VALUE. (Track mode has higher priority compared to balancing mode). Track is independent of operation mode of PCO_PIDCON.

TrackSp

INT

0

4: Tracking value. Output of the controller will be set to TrackSp if Track = TRUE

Bal

BOOL

FALSE

5: Balancing mode. PCO_PIDCON can be set in Balancing mode if Bal = TRUE and Track = FALSE. Output of the controller will be set to BalSp. Bal is independent of operation mode of PCO_PIDCON.

BalSp

INT

0

6: Balancing setpoint. Output of the controller will be set to BalSp if Bal = TRUE

RevAct

BOOL

FALSE

7: RevAct = FALSE, controller will increase output if Setpoint is less than Process value. RevAct = TRUE, controller will decrease output if Setpoint is greater than Process value

EnAuto

BOOL

TRUE

  1. Enable auto operation of PID controller

ActPos

INT

0

9: controller position of the controller Scaling 0-10000

RampTime

TIME

TIME#30s0ms

10: Controller time. (from 0% to 100 % )

RampActive

BOOL

FALSE

11: RampActive= TRUE activates ramp under manual positioning.

Inout

Scada

PCO_PIDCON_TYPE

12: Structure variable for connection to Scada system

Output

Error

BOOL

FALSE

Operation continues with error. The output ErrorID gives more details about the error.

Out

INT

0

1: Output of the controller (0-27648)

OutMax

BOOL

FALSE

2: Output limited to the high value

OutMin

BOOL

FALSE

3: Output limited to the low value

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

4: Err number, Output provides an error identifier if an invalid value was applied to an input