Table of Contents

Application

Namespace
ZApplication
Extends
Inherited Properties
Inherited Methods
Implements
FUNCTION_BLOCK ABSTRACT Application EXTENDS ZCore.Object IMPLEMENTS ZCore.IManagedObject, ZCore.IRecoverable, ZCore.IBootable, ZCore.IObject, ZCore.IError (
 [output] State : ObjectState)

Constructor

FB_init

METHOD FB_init (
 [input] bInitRetains : BOOL,
 [input] bInCopyCode : BOOL,
 [input] displayName : ZCore.ZString,
 [input] com : REFERENCE TO ApplicationComPublish) : BOOL

Inputs

bInitRetains BOOL

if TRUE, the retain variables are initialized (warm start / cold start)

bInCopyCode BOOL

if TRUE, the instance afterwards gets moved into the copy code (online change)

displayName ZString

Name of the application as it is used in log messages and the com interface.

com REFERENCE TO ApplicationComPublish

Application com interface, which can be used by a third-party application (e.g. HMI) to show information about the application.

Returns

BOOL

Properties

BootingHints

PROPERTY BootingHints : ZCore.ManagedObjectBootingHintFlags

Suggests when the Cyclic method should be called during the booting phase of the application

Property Value

ManagedObjectBootingHintFlags

ExecutionHints

PROPERTY ExecutionHints : ZCore.ManagedObjectExecutionHintFlags

Suggests when the Cyclic method should be called after the booting phase of the application

The default execution hint is EveryCycle.

Property Value

ManagedObjectExecutionHintFlags

Methods

Cyclic

METHOD Cyclic ()

Name

METHOD Name () : ZCore.ZString

Returns the name of this object as it is set by construction (FB_init) This method returns a copy of the name and should be used carefully to avoid performance issues

Returns

ZString

NotifyChild

METHOD NotifyChild (
 [input] child : ZCore.IManagedObject)

This method is internally used to notify an object of a new child. The method is called whenever an object is using this object as a parent durings its construction (FB_init). The method adds the child object to an internal objectmanager, which in turn calls the Cyclic method of said object.

Inputs

child IManagedObject

Recover

METHOD Recover ()

Resets the BootFault to Boot.

SetBootFaultSequence

METHOD SetBootFaultSequence (
 [input] sequence : ZCore.ISequence)

This method allows to inject a sequence that is executing if the booting process failed for any reason.

Inputs

sequence ISequence

Zeugwerk compatible sequence implementing the [ISequence interface]

SetBootSequence

METHOD SetBootSequence (
 [input] sequence : ZCore.ISequence)

This method allows to inject a sequence into the booting phase of the application. When the PLC is restarted, this sequence is automatically started and its execution will be awaited before continuing to the Application's Busy state.

Inputs

sequence ISequence

Zeugwerk compatible sequence implementing the [ISequence interface]

SetRunningSequence

METHOD SetRunningSequence (
 [input] sequence : ZCore.ISequence)

This method allows to inject a sequence into the running phase of the application. This sequence is continuously executed while the application is running. Note that an application doesn't have a dedicated error state, thus, if the passed sequence fails for any reason it is instantly recovered and restarted. The sequence can be used to monitor periphery and take care of actions that should be executed periodically.

Inputs

sequence ISequence

Zeugwerk compatible sequence implementing the [ISequence interface]