Table of Contents

PulsedOutput

Namespace
ZEquipment
Extends
Inherited Properties
Inherited Methods
Implements

This function block is an extension to a normal output, which enables advanced behavior for the digital output in the form of configurable blinking pattern.

  • RunAsync for repeating, freely configurable pattern that can be controlled by the following properties
    • Delay Initial delay before the actual pattern is started
    • PauseState Initial value of the digital output is set to (enabled v. disabled)
    • Frequency or Duration duration of a single pulse (single transition from PauseState to NOT PauseState
    • PauseDuration duration of where the digital output is set to PauseState
    • GroupCount number of iterations the digital output is toggled with the configured Frequency or Duration before the signal is set to PauseState for PauseDuration seconds.
FUNCTION_BLOCK PulsedOutput EXTENDS ZEquipment.PulsedOutputAbstract IMPLEMENTS ZCore.IObject, ZCore.IError, ZEquipment.IPulsedOutput, ZEquipment.IDigital, ZCore.ITrigger

Constructor

FB_init

METHOD FB_init (
 bInitRetains : BOOL,
 bInCopyCode : BOOL,
 parent : ZCore.IManagedObject) : 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)

parent IManagedObject

Interface to the ManagedObject that is the parent of this object

Returns

BOOL

Properties

Busy

This property returns TRUE if the object is Busy executing a sequence or still in its initialization phase (if applicable). It returns FALSE if the object is Idle or in an Error state.

Use State to find out if the object is busy executing its initialization phase, or it is busy performing an actual sequence.

PROPERTY Busy : BOOL

Property Value

BOOL

Done

If the object is in idle state (often mentioned as "the object is not busy and not on error"), this is indicated by this property returning TRUE.

PROPERTY Done : BOOL

Property Value

BOOL

Error

If the object aborts its execution with an error, this is indicated by this property returning TRUE. Information about the error may be retrieved by utilizing the methods that are implemented from the IError.

Returns TRUE if a fault occured within a sequence or the initialization phase of an object, respectively. If this property returns TRUE, use

to get insights about the origin of the fault.

PROPERTY Error : BOOL

Property Value

BOOL

MaxIterations

Number of iterations of the configured pulsing pattern, before the object is going to idle. If MaxIterations=0 the pattern will continue forever. By default MaxIterations=1

PROPERTY MaxIterations : INT

Property Value

INT

Methods

ErrorId

Returns the error code of the first error source for this object. The method recursively goes down the error stack until the initial source of error of this object can be found. For performance reasons, the error stack is not cleared when the error state is reset. So this method should always used in conjunction with Error.

METHOD ErrorId () : UDINT

Returns

UDINT

ErrorMessage

Returns the error description of the first error source for this object. The method recursively goes down the error stack until the initial source of error of this object can be found. For performance reasons, the error stack is not cleared when the error state is reset. So this method should always used in conjunction with Error.

METHOD ErrorMessage () : ZCore.ZString

Returns

ZString

ErrorSource

This method returns the direct error source of this object. This method can then be used to retrieve the actual error source by using the method of the returned IError.

METHOD ErrorSource () : ZCore.IError

Returns

IError

RunAsync

Starts the configured pattern for the digital output and executes it exactly 1 time before the object transitions from Busy to Idle.

METHOD RunAsync (
 startToken : ZCore.IStartToken)

Inputs

startToken IStartToken

TraceErrorStack

This method is used internally when recording an error trace.

METHOD TraceErrorStack (
 trace : ZCore.IErrorTrace)

Inputs

trace IErrorTrace