FB_WtcTimer

FB_WtcTimer 1:

Implements a timer as master for WTC camming.

Syntax:

FUNCTION_BLOCK FB_WtcTimer EXTENDS FB_Base

FB_WtcTimer 2: Properties

Name

Type

Access

Initial value

Description

Name

STRING

Get, Set

<SourceName>

Specifies the name of the class instance.

FB_WtcTimer

ActualTime

LREAL

Get

0.0 [s]

Elapsed time since start of WTC cycle in seconds.

ActualTimeLatched

LREAL

Get

0.0 [s]

Stored time of the last WTC cycle in seconds.

AttachableMdInterface

I_MdComponent

Get

-

Interface to the machine data component.

GuidingValue

LREAL

Get

0.0

Time as a scaled camming master value. Depends on FB_WtcTimerHmi.MasterTime and GuidingMax.

GuidingMax

LREAL

Get, Set

400.0

Maximum guiding value of the timer as camming master.

MaxMeasureTime

LREAL

Get

0.0 [s]

Maximum overflow time of the timer.

MaxMeasureTimeFactor

LREAL

Get, Set

1.5

Overflow factor for the set target time.

ProfileStarted

BOOL

Get

FALSE

TRUE if the timer has been started.

UseTriggeredStart

BOOL

Get, Set

FALSE

The Start() command is only accepted with a rising edge.

FirstStart1

BOOL

Get

FALSE

WTC is in its first cycle since the last launch.

FB_Base

BaseState

E_BaseState

Get

eNotHandled

Initialization state of the class instance.

Error

BOOL

Get

FALSE

Class is in an error state.

ResultMessage

I_AppMessage

Get

-

Access to the class-internal EventLogger.

[PROTECTED] _Name

STRING

Get

<SourceName>

.Name without leading 'fb'.

1Obsolete

FB_WtcTimer 3: Methods

Name

Description

Reset()

Resets the error state of the class.

FB_WtcTimer

ProfileStartAck(bAck)

Resets the ProfileStarted feedback signal.

Start(bCommand)

Starts the timer. If the timer is already running, the elapsed time is reset.
Notice The timer is reset with each call. To use edge-triggered behavior, UseTriggeredStart must be enabled.

Stop(bCommand)

Stops the timer at the current time value.

FB_Base

GetHMI()

Returns the assigned HMI object.

Notice The method is not implemented in the FB_Base class. If the method is not overwritten by inheritance, a pseudo variable is always returned.

SetHMI(ipBase)

General assignment method for an FB_BaseHmi extending class as a local HMI.

Notice The method is not implemented in the FB_Base class. If the method is not overridden by inheritance, it always fails.

[PROTECTED] _QueryNamespace()

Extracts the first part of the instance path as an object namespace.

[PROTECTED] _QueryObjectName()

Extracts the last part of the instance path as the object name.

FB_WtcTimer 4: Interfaces

Type

Description

I_Base

Standard interface on FB_Base.

I_WtcTimer

Standard interface on FB_WtcTimer.

I_WtcMaster

General interface of a WTC master axis.

I_TwoTaskInterface

Runtime interface for two PLC tasks.

I_AttachableMdInterface

Interface for containerless machine data components.

I_BaseEmpty

For extension without standard interface.

I_BaseDev

Covers all methods and properties of the base class.

Requirements

Development Environment

Target platform

PLC libraries to include

TwinCAT 4026 >= v3.1.4026.16
TwinCAT 4024 >= v3.1.4024.66

PC or CX (x64, x86)

Tc3_PlasticBaseApplication (>= v12.12.0.0)