Table of Contents

AnalogOutputDint

Namespace
ZEquipment
Extends
Inherited Properties
Inherited Methods
Implements
FUNCTION_BLOCK AnalogOutputDint EXTENDS ZEquipment.Analog IMPLEMENTS ZEquipment.IAnalog, ZEquipment.IDigital, ZCore.ITrigger

Implementation of an analog output with the underlying datatype DINT. The function block implements convenient methods to interact with a physical output or (by default) allows to simulate an analog output. for details refer to Analog

Constructor

FB_init

METHOD FB_init (
 [input] bInitRetains : BOOL,
 [input] bInCopyCode : BOOL) : 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)

Returns

BOOL

Properties

PROPERTY Link : DINT

Returns the raw value of the actuator as it is written/read from the bus

Property Value

DINT

Simulation

PROPERTY Simulation : BOOL

This property is used to enable or disable the simulation mode for the analog terminal. Internally the pointer to the variable that is written to or read from, respectively, is swapped by toggling this property. Simulated inputs behave different with respect to actual terminals with regard to the Write method. Phyisical terminals can not be written to, for simulated terminal this is totally fine though (and even needed most of the times).

Property Value

BOOL

Methods

ReadImpl

METHOD PROTECTED ReadImpl () : LREAL

This method reads a physical value from the terminal. The raw value that is read from the terminal is converted by applying a linear conversion that can be set by using the SetConversionLinear method. If no conversion is specified, the method returns a number between 0 and 1 (default linear conversion).

Returns

LREAL

ReadRaw

METHOD ReadRaw () : DINT

This method returns the raw value that is given by the terminal. No linear conversion is applied.

Returns

DINT

WriteImpl

METHOD PROTECTED WriteImpl (
 [input] value : LREAL)

This method writes a physical value from the terminal. The value that is passed as a parameter is converted to a value that is actually usable for the terminal. This is achieved by applying a linear conversion that has been set using the SetConversionLinear method. By default the conversion assumes that values are scaled between 0-1.

Inputs

value LREAL

WriteRaw

METHOD WriteRaw (
 [input] value : DINT)

This method writes a raw value to the terminal. No linear conversion is applied.

Inputs

value DINT