Table of Contents

IoBridge

Namespace
ZApplication
FUNCTION_BLOCK IoBridge

IO instances are created in the application context and only the PLC should read and write to these instances. However, an HMI or other external applications have to be able to read and write to IOs as well. This function block is the connection and synchronization object between IO instances and appropriate communication structs for these applications. The later may be instantiated at a location that is read & writeable by ADS and also separated from the actual IO. In the framework, communication structs are created in the Global.Com context, whereas IOs are instantiated in the MAIN context. It is not a good approach to contact these FBs directly by external applications!

This function block manages lists for all IO types ( DigitalInput ; DigitalOutput ; AnalogInput ;AnalogOutput ) that are available in the framework. Synchronization of communication structs and IO instances occures with a load balancer. Usually, HMIs do not need an update for every PLC task cycle. The load balancer can be used to adjust synchronization according to the performance needs of the actual application.

Constructor

FB_init

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

Returns

BOOL

Properties

LoadBalancer

PROPERTY LoadBalancer : ILoadBalancer

Returns the load balancer of this bridge, which in turn can be used to adjust how the bridge updates its componeents

Property Value

ILoadBalancer

Methods

AddAnalogInput

METHOD AddAnalogInput (
 [input] io : ZEquipment.IAnalog,
 [input] publish : REFERENCE TO AnalogComPublish,
 [input] subscribe : REFERENCE TO AnalogComSubscribe)

Adds an analog input to the bridge, allowing synchronization between the io instance and a communciation struct that may be accessed externally.

Note, that inputs are usually not writeable - only if the io is simulated write access is allowed. This bahavior is implemented in AnalogInput .

Inputs

io IAnalog
publish REFERENCE TO AnalogComPublish
subscribe REFERENCE TO AnalogComSubscribe

AddAnalogOutput

METHOD AddAnalogOutput (
 [input] io : ZEquipment.IAnalog,
 [input] publish : REFERENCE TO AnalogComPublish,
 [input] subscribe : REFERENCE TO AnalogComSubscribe)

Adds an analog output to the bridge, allowing synchronization between the io instance and a communciation struct that may be accessed externally.

Inputs

io IAnalog
publish REFERENCE TO AnalogComPublish
subscribe REFERENCE TO AnalogComSubscribe

AddDebouncedInput

METHOD AddDebouncedInput (
 [input] input : ZEquipment.IDebouncedInput,
 [input] publish : REFERENCE TO DebouncedInputComPublish,
 [input] subscribe : REFERENCE TO DebouncedInputComSubscribe)

Adds an debounced input to the bridge, allowing synchronization between the io instance and a communciation struct that may be accessed externally.

Note, that inputs are usually not writeable - only if the io is simulated write access is allowed. This bahavior is implemented in DigitalInput.

Inputs

input IDebouncedInput
publish REFERENCE TO DebouncedInputComPublish
subscribe REFERENCE TO DebouncedInputComSubscribe

AddDigitalInput

METHOD AddDigitalInput (
 [input] io : ZEquipment.IDigital,
 [input] publish : REFERENCE TO DigitalComPublish,
 [input] subscribe : REFERENCE TO DigitalComSubscribe)

Adds an digital input to the bridge, allowing synchronization between the io instance and a communciation struct that may be accessed externally.

Note, that inputs are usually not writeable - only if the io is simulated write access is allowed. This bahavior is implemented in DigitalInput .

Inputs

io IDigital
publish REFERENCE TO DigitalComPublish
subscribe REFERENCE TO DigitalComSubscribe

AddDigitalOutput

METHOD AddDigitalOutput (
 [input] io : ZEquipment.IDigital,
 [input] publish : REFERENCE TO DigitalComPublish,
 [input] subscribe : REFERENCE TO DigitalComSubscribe)

Adds an digital output to the bridge, allowing synchronization between the io instance and a communciation struct that may be accessed externally.

Inputs

io IDigital
publish REFERENCE TO DigitalComPublish
subscribe REFERENCE TO DigitalComSubscribe

AddImpulseOutput

METHOD AddImpulseOutput (
 [input] impulseOutput : REFERENCE TO ZEquipment.ImpulseOutput,
 [input] publish : REFERENCE TO ImpulseOutputComPublish,
 [input] subscribe : REFERENCE TO ImpulseOutputComSubscribe)

This method adds an impluse output to the bridge, allowing synchronization between the output instance and a communciation struct that may be accessed externally.

Inputs

impulseOutput REFERENCE TO ImpulseOutput
publish REFERENCE TO ImpulseOutputComPublish
subscribe REFERENCE TO ImpulseOutputComSubscribe

AddLight

METHOD AddLight (
 [input] light : REFERENCE TO ZEquipment.Light,
 [input] publish : REFERENCE TO DigitalComPublish,
 [input] subscribe : REFERENCE TO DigitalComSubscribe)

Adds an light to the bridge, allowing synchronization between the io instance and a communciation struct that may be accessed externally.

Note, that inputs are usually not writeable - only if the io is simulated write access is allowed. This bahavior is implemented in DigitalInput .

Inputs

light REFERENCE TO Light
publish REFERENCE TO DigitalComPublish
subscribe REFERENCE TO DigitalComSubscribe

AddOnOffController

METHOD AddOnOffController (
 [input] onOffController : REFERENCE TO ZEquipment.OnOffController,
 [input] publish : REFERENCE TO OnOffControllerComPublish,
 [input] subscribe : REFERENCE TO OnOffControllerComSubscribe)

Adds an OnOffController to the bridge, allowing synchronization between the controller instance and communciation structs that may be accessed externally.

Inputs

onOffController REFERENCE TO OnOffController
publish REFERENCE TO OnOffControllerComPublish
subscribe REFERENCE TO OnOffControllerComSubscribe

AddPidController

METHOD AddPidController (
 [input] pidController : REFERENCE TO ZEquipment.PidController,
 [input] publish : REFERENCE TO PidControllerComPublish,
 [input] subscribe : REFERENCE TO PidControllerComSubscribe)

Adds an PidController to the bridge, allowing synchronization between the controller instance and communciation structs that may be accessed externally.

Inputs

pidController REFERENCE TO PidController
publish REFERENCE TO PidControllerComPublish
subscribe REFERENCE TO PidControllerComSubscribe

AddPulsedOutput

METHOD AddPulsedOutput (
 [input] pulsedOutput : REFERENCE TO ZEquipment.PulsedOutput,
 [input] publish : REFERENCE TO PulsedOutputComPublish,
 [input] subscribe : REFERENCE TO PulsedOutputComSubscribe)

This method adds a pulsed output to the bridge, allowing synchronization between the output instance and a communciation struct that may be accessed externally.

Inputs

pulsedOutput REFERENCE TO PulsedOutput

Reference to a PulsedOutput instance in the application

publish REFERENCE TO PulsedOutputComPublish

Reference to the communication struct for read access to the PulsedOutput data

subscribe REFERENCE TO PulsedOutputComSubscribe

Reference to the communication struct for write access to the PulsedOutput data

AddPwmController

METHOD AddPwmController (
 [input] pwmController : REFERENCE TO ZEquipment.PwmController,
 [input] publish : REFERENCE TO PwmControllerComPublish,
 [input] subscribe : REFERENCE TO PwmControllerComSubscribe)

Adds an PwmController to the bridge, allowing synchronization between the controller instance and communciation structs that may be accessed externally.

Inputs

pwmController REFERENCE TO PwmController
publish REFERENCE TO PwmControllerComPublish
subscribe REFERENCE TO PwmControllerComSubscribe

SetLogger

METHOD SetLogger (
 [input] logger : ZCore.ILogger)

Setting a logger instance allows this instance to log commands that it receives over the com interface. Leaving this function block without a logger instance (logger=0) disables logging for this object.

Inputs

logger ILogger