Camming

Camming 1:

Core function is not supported by inverter axes

This core function is not supported by inverter axes. Any use will report DEVICE_NOTINIT and trigger an error message.

Camming 2:

The property provides two options: Camming.Pos for position camming and Camming.Velo for velocity camming. To do this, two classes of the same type are instantiated, but with different parameterizations.

Camming 3:

All these functions belong to the group of statically controlled core functions.

Both types of camming use a default value to identify a control value within a camming lookup table. For more information, see CammingLookUp.

Any useful information can serve as a default value. Common options are a time (LREAL variable that starts with zero and is cyclically updated by adding the cycle time of the PLC tasks) or the position of another axis.

WARNING

Unexpected responses of the controlled axis

Unsuitable default values or table points can lead to unexpected reactions of the controlled axis. This may result in risk of accident or damage.

Using a camming requires several steps:

Syntax:

FUNCTION_BLOCK FB_Camming EXTENDS FB_CorefunctionFeedback

Camming 4: Properties

Name

Type

Access

Description

InitState

BOOL

Get, Set

The core function is not completely and successfully initialized.

FB_Camming

Overrun

BOOL

Get

TRUE if the current default value is not within the range of the camming lookup table.

Synchronize

BOOL

Get, Set

With Synchronize=FALSE the axis should follow every setpoint change immediately. A TRUE requires the axis to follow setpoint changes with respect to the dynamic limit parameters.

Synchronized

BOOL

Get

TRUE if Synchronize=TRUE and the setpoint changes are within the limits of the dynamic parameters of the axis.

UseAsPosition

BOOL

Get, Set

This property defines the camming rule. A TRUE causes the core function to act as a position camming. A FALSE will cause it to act as a velocity camming.

This property is set during startup. The application must not change its setting.

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

[INTERN] AxisState

E_AxisState

Get, Set

The current state of the axis state machine.

[INTERN] Connected

BOOL

Get

The Corefunction is connected to an axis.

[INTERN] CycleTime

LREAL

Get, Set

The cycle time of the PLC task from which the method Cyclic() of the Corefunction is executed.

[INTERN] CycleTimeValid

BOOL

Get, Set

A TRUE indicates that the CycleTime of the Corefunction is defined.

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.

[INTERN] NextCore

I_Corefunction

Get, Set

This property is part of the execution chain and must not be affected by the application task.

[INTERN] OnlineChangeMark

BOOL

Get, Set

The axis uses this property to signal an Online Change to the Corefunction.

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.

Camming 5: Methods

Name

Description

[INTERN] Cyclic()

This method is called cyclically by the axis.

FB_Camming

DoCamming()

This method is used to enable and disable the core function.

SetGuidingValue()

This method is used to update the default value.

SetLookupInterface()

This method must be used to connect a camming table.

FB_Corefunction

[INTERN] ApplyCommand()

Applies the command to the axis.

[INTERN] ClearStates()

Clears up some of the possible states.

[INTERN] DoReset(bExecute)

This method is called when the axis is reset.

[INTERN] RemoveCommand()

Removes the command from the axis.

Camming 6: Interfaces

Type

Description

I_Corefunction

Standard interface on FB_Corefunction.

I_Camming

Standard interface on FB_Camming

I_CorefunctionFeedback

Standard interface on FB_CorefunctionFeedback.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.35

PC or CX (x64, x86)

Tc3_PlasticFunctions v3.12.4.26 or higher