FB_Temperature

FB_Temperature 1:

Main class of temperature control to manage all temperature channels and groups.

Internal functions:

Syntax:

FUNCTION_BLOCK FB_Temperature EXTENDS FB_BaseMd

FB_Temperature 2: Properties

Name

Type

Access

Initial value

Description

Name

STRING

Get, Set

<SourceName>

Specifies the name of the class instance.

FB_Temperature

DisableAlarms

BOOL

Get, Set

FALSE

Suppresses alarms triggered by errors of a temperature channel.

DisableMessages

BOOL

Get, Set

FALSE

Suppresses debug messages of the TF8540 library.

EnableCallback

BOOL

Get, Set

TRUE

Enables communication with the I/O components.

EnableConfig

BOOL

Get, Set

TRUE

Enables the configuration of all temperature channels.

EnableLooptest

BOOL

Get, Set

FALSE

Enables current monitoring of all zones.

LibScopeVars

REFERENCE TO FB_Scope_TempCtrlVariables

Get

-

Access to an overview of TF8540 live data.

Timer

I_TempSchedule

Get

NULL

Access to the connected scheduler.

FB_BaseMd

MachineData

I_MdBaseContainer

Get

-

Interface for machine data handling.

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'.

FB_Temperature 3: Methods

Name

Description

Reset()

Resets the error state of the class.

FB_Temperature

Channels(x)

Returns an interface to the xth temperature channel of TF8540.

CreateDefaultParams()

Creates a default parameterization for all temperature channels.

EnableAll()

Enables all temperature channels on the PLC side.

Groups(x)

Returns an interface to the xth temperature group.

LinkGroup()

Assigns a linear arrangement of temperature channels to a group.

LinkSupply()

Assigns a group to a supply channel.

LinkZone()

Assigns a temperature channel to a group.

SetScheduler(iScheduler)

Assigns a schedule to the temperature control.

StandbyAll()

Sets all temperature channels to standby.

Supply(x)

Returns an interface to the xth supply unit.

SupplyLines(x)

Returns an interface to the xth supply channel.

UnlinkGroup(x)

Removes all temperature channels from the xth group.

FB_BaseMd

[PROTECTED] AddMdComp()

Adds a component of type I_MdComponent to the machine data container.

FB_Base

SetHMI(ipBase)

General assignment method for an FB_BaseHmi extending class.

Notice This method always fails in the FB_Base implementation. Overwriting is therefore absolutely necessary.

[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_Temperature 4:

Exceptions avoidance

The list access functions (e.g. Channels(x), Groups(x), etc...) return a pseudo variable if the requested index is invalid. In addition, a message is thrown in the EventLogger.

FB_Temperature 5: Cycle methods

Name

Description

Cyclic()

Slow cycle method (default 25 ms)

FB_Temperature 6: Possible events

ID

Description

Alarm/Message

20x

Invalid interface queried

Message

FB_Temperature 7: Machine data

Component

Description

Index range

Number of instances

FB_MdFileInfo

File information

0x0000 Fxxx

1

FB_MdTempSupply

Parameters of the supply units

0x0000 4Dxx

4 (Default)

FB_MdTempGroup

Grouping configuration

0x0000 4Exx

5 (Default)

FB_Temperature 8: Interfaces

Type

Description

I_Base

Standard interface on FB_Base.

I_Temperature

Standard interface on FB_Temperature.

I_TempTaskInterface

Runtime interface for a slow PLC task.

I_BaseMd

Standard interface on FB_BaseMd.

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 v3.1.4024.42

PC or CX (x64, x86)

Tc3_PlasticBaseApplication (>= v3.12.6.0)