PulsedOutput
- Namespace
- ZEquipment
- Extends
- Inherited Properties
- Inherited Methods
- Implements
FUNCTION_BLOCK PulsedOutput EXTENDS ZEquipment.PulsedOutputAbstract IMPLEMENTS ZCore.IObject, ZCore.IError, ZEquipment.IPulsedOutput, ZEquipment.IDigital, ZCore.ITrigger
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
PauseStatetoNOT 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.
Constructor
FB_init
METHOD FB_init (
[input] bInitRetains : BOOL,
[input] bInCopyCode : BOOL,
[input] parent : ZCore.IManagedObject) : BOOL
Inputs
bInitRetainsBOOLif TRUE, the retain variables are initialized (warm start / cold start)
bInCopyCodeBOOLif TRUE, the instance afterwards gets moved into the copy code (online change)
parentIManagedObjectInterface to the ManagedObject that is the parent of this object
Returns
- BOOL
Properties
Busy
PROPERTY Busy : BOOL
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 Value
- BOOL
Done
PROPERTY Done : BOOL
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 Value
- BOOL
Error
PROPERTY Error : BOOL
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 Value
- BOOL
MaxIterations
PROPERTY MaxIterations : INT
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 Value
- INT
Methods
ErrorId
METHOD ErrorId () : UDINT
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.
Returns
- UDINT
ErrorMessage
METHOD ErrorMessage () : ZCore.ZString
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.
Returns
ErrorSource
METHOD ErrorSource () : ZCore.IError
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.
Returns
RunAsync
METHOD RunAsync (
[input] startToken : ZCore.IStartToken)
Starts the configured pattern for the digital output and executes it exactly 1 time before the object transitions from Busy to Idle.
Inputs
startTokenIStartToken
TraceErrorStack
METHOD TraceErrorStack (
[input] trace : ZCore.IErrorTrace)
This method is used internally when recording an error trace.
Inputs
traceIErrorTrace