PressureControl.PID

PressureControl.PID 1:

This core function implements an extended PID controller functionality. The pressure value read by the Supervisor is used as the controlled variable. The velocity of the axis is controlled as the manipulated variable. Accordingly, this control structure can be used for a range of tasks:

PressureControl.PID 2: Properties

Name

Type

Access

Description

InitState

BOOL

Get, Set

The core function is not completely and successfully initialized.

FB_PressureControl_PID

Actual

BOOL

Get

Current actual pressure value.

AllowSwitchOver

BOOL

Get, Set

Allows switching from another active Corefunction to pressure control.

Notice Currently, only Ptp is supported for switching.

Limiting

LREAL

Get, Set

Setpoint for the limitation (e.g., torque, pressure) during pressure control.

Parameters

I_PressureControlParams_PID

Get, Set

Parameter set that is used for control. The parameter sets can be switched by assignment. If a 0 is assigned, the internal parameter set is used.

PressureLookUp

I_PressureLookUp

Get, Set

Print setpoint table for sequential processing of print setpoints.
Notice Preliminary implementation

Target

LREAL

Get, Set

Command variable (setpoint) of the controller.

IsEnabled1

BOOL

Get

A TRUE signals the active state of the pressure switchover.
Alternatively:
.AllowSwitchOver

FB_CorefunctionFeedback

AbortedState

BOOL

Get, Set

Signals the abort of a command by another Corefunction.

BusyState

BOOL

Get, Set

Signals the active execution of a command.

DoneState

BOOL

Get, Set

Signals the successful execution of a command.

IdleState

BOOL

Get, Set

The Corefunction is ready for operation and commandable.

IsCommanded

BOOL

Get

Signals the pending of a command.

FB_Corefunction

FailedState

BOOL

Get, Set

If IsActivated is TRUE at the same time: Signals the failure of an accepted command.

If IsActivated is FALSE at the same time: Signals the rejection of a command.

HasFeedback

BOOL

Get

The core function has responded to a pending command.

IsActivated

BOOL

Get

The core function has an accepted command pending.

IsLocalCmd

BOOL

Get

Signals that the axis is assigned with a command of this core function.

ReadyState

BOOL

Get, Set

The Corefunction is ready for operation, but is not commandable at this time.

Possible reasons are:
- The axis is not enabled.
- Another Corefunction is active.
- The Corefunction does not support any commands.

PressureControl.PID 3: Methods

Name

Description

Activate()

Activate / deactivate the controller.

SwitchOver()

Activate the controller by switching another command.

EnableSwitchOver()1

Enable for automatic activation by a PressureHandler.
Alternatively:
AllowSwitchOver

GetActual()1

The actual value of the controller is determined.
Alternatively:
Actual

GetParams()1

An interface to the connected parameter set is determined.
Alternatively:
Parameters

SetParams()1

A parameter set is connected to the controller.
Alternatively:
Parameters

Setpoint()1

Set the command variable (setpoint) of the controller.
Alternatively:
Target

1Obsolete

PressureControl.PID 4: Interfaces

Type

Description

I_Corefunction

Standard interface on FB_Corefunction.

I_PressureControl

Standard interfaces on FB_PressureControl_PID.

I_CorefunctionFeedback

Standard interface on FB_CorefunctionFeedback.

Example:

// Requires connected pressure input, e.g. via PressureControl.Supervisor.Sensor
// Start pressure control on application start signal
IF bStart THEN
    
    // Assign pressure setpoint
    iAxisBase.PressureControl.PID.Target := 20.0;
    
    // parameterize once before activation and activate
    IF iAxisBase.PressureControl.PID.IdleState THEN
            
        iAxisBase.PressureControl.PID.Limiting := 80.0;
        iAxisBase.PressureControl.PID.Parameters.Kp := 0.5;
        iAxisBase.PressureControl.PID.Parameters.EnableI := TRUE;
        iAxisBase.PressureControl.PID.Parameters.Tn := 1.0;

        iAxisBase.PressureControl.PID.Activate(TRUE);
        
    // wait until function is terminated
    ELSIF bStop THEN
        
        bStart := FALSE;
        iAxisBase.PressureControl.PID.Activate(FALSE);    
    
    END_IF        
END_IF    

Requirements

Development Environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.66

PC or CX (x64, x86)

Tc3_PlasticFunctions (>= v12.10.0.0)