Table of Contents

AxisBridge

Namespace
ZApplication
Implements
FUNCTION_BLOCK AxisBridge IMPLEMENTS ZApplication.IAxisBridgeBuilder

The axis bridge offers an interface to control several axis instances, which are instantiated in the application. It is possible to communicate through publish and subscribe structures from external applications (i.e. HMI) or other PLCs. In a Zeugwerk Application communication structures are instantiated in ZGlobal.Com, in general these structure should be instantiated in a location that is accessible by external applications.

This object offers a basic interface to control several different axes without any other observations or external limits. It should only be used by skilled operators because usually axes are used inside more or less complex processes and without any checks there could be done damage on the mechanical and electrical system easily. If an operator should not use an axis directly, it is recomended to implement separate sequences in which all necessary checks despite other sensors or systems can be done.

However, commanding and controlling an axis without any checks can sometimes also be useful and neccessary especially in the commissioning phase of an application.

Interface to build a bridge between communication interfaces (AxisComPublish and AxisComSubscribe) and an implementation of an Axis/Drive. Not all axis implementation implement all features that the Zeugwerk Framework implements. Most notably, Vfd drives usually do not implement positioning interfaces. Use the "With methods" to build a control instance in the following way. In the following example the actual datatype of axis refers to a specific implementation, which implements all features of the Framework. Note that some calls to With may not be supported for the specific implementation that you are using. In the latter case remove the relevant `"With methods".

 _axis1 : ZExperimental.AxisLenzei950;
 -----------------------------------
 _axisBridge.WithAbsolute(_axis1)
            .WithBrake(_axis1)
            .WithHoming(_axis1)
            .WithFeedbackCurrent(_axis1).WithFeedbackVelocity(_axis1).WithFeedbackPosition(_axis1)
            .WithMoveCurrent(_axis1).WithMoveVelocity(_axis1) .WithMovePosition(_axis1)
            .AddAxis(_axis1, _parent._com._axis1.publish, _parent._com._axis1.subscribe);

Constructor

FB_init

METHOD FB_init (
 [input] bInitRetains : BOOL,
 [input] bInCopyCode : BOOL,
 [input] parent : ZCore.IManagedObject) : BOOL

In order to let the axis bridge function correctly, it is neccessary to call its cyclic method somewhere in the application For Zeugwerk Framework application this is done by an object manager which gets initialized by providing its instance here with the parent input

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 a valid parent, which usually forwards this instance to an ObjectManager

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

AddAxis

METHOD AddAxis (
 [input] axis : REFERENCE TO ZEquipment.Axis,
 [input] publish : REFERENCE TO AxisComPublish,
 [input] subscribe : REFERENCE TO AxisComSubscribe)

Inputs

axis REFERENCE TO Axis

provides a basic axis instance with all its status and actions which are implemented for all axis types

publish REFERENCE TO AxisComPublish

axis publish structure instantiated somewhere in the plc (usually separated from the actual application code like Global.com)

subscribe REFERENCE TO AxisComSubscribe

axis subscribe structure instantiated in the plc (usually separated from the actual application code like Global.com)

AddAxisPlcOpenMc

METHOD AddAxisPlcOpenMc (
 [input] axis : REFERENCE TO ZEquipment.AxisPlcOpenMc,
 [input] publish : REFERENCE TO AxisComPublish,
 [input] subscribe : REFERENCE TO AxisComSubscribe)

convenient method to add this specific type of axis, see AddAxis for detailed information on how to add an axis to this function block This method is a shortcut for calling

_axisBridge.WithHoming(axis)
     .WithMovePosition(axis)
     .WithMoveVelocity(axis)
     .WithHalt(axis)
     .WithVelocityFeedrate(axis)
     .WithFeedbackPosition(axis)
     .WithFeedbackVelocity(axis)
     .WithFeedbackCurrent(axis)
     .AddAxis(axis := axis,
              publish := publish,
              subscribe := subscribe);

Inputs

axis REFERENCE TO AxisPlcOpenMc

provides zeugwerk plc open compatible axis instance with all its status and actions which are implemented for this specifix axis types

publish REFERENCE TO AxisComPublish

axis publish structure instantiated somewhere in the plc (usually separated from the actual application code like Global.com)

subscribe REFERENCE TO AxisComSubscribe

axis subscribe structure instantiated in the plc (usually separated from the actual application code like Global.com)

AddAxisSimulated

METHOD AddAxisSimulated (
 [input] axis : REFERENCE TO ZEquipment.AxisSimulated,
 [input] publish : REFERENCE TO AxisComPublish,
 [input] subscribe : REFERENCE TO AxisComSubscribe)

convenient method to add this specific type of axis, see AddAxis for detailed information on how to add an axis to this function block This method is a shortcut for calling

_axisBridge.WithHoming(axis)
     .WithMovePosition(axis)
     .WithMoveVelocity(axis)
     .WithHalt(axis)
     .WithVelocityFeedrate(axis)
     .WithFeedbackPosition(axis)
     .WithFeedbackVelocity(axis)
     .WithFeedbackCurrent(axis)
     .WithHalt(axis)
     .AddAxis(axis := axis,
              publish := publish,
              subscribe := subscribe);

Inputs

axis REFERENCE TO AxisSimulated

provides zeugwerk plc open compatible axis instance with all its status and actions which are implemented for this specifix axis types

publish REFERENCE TO AxisComPublish

axis publish structure instantiated somewhere in the plc (usually separated from the actual application code like Global.com)

subscribe REFERENCE TO AxisComSubscribe

axis subscribe structure instantiated in the plc (usually separated from the actual application code like Global.com)

SetLogger

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

Setting a logger instance allows this instance to log commands that it ultimately forwards to an axis. Leaving this function block without a logger instance (logger=0) disables logging for this object.

Inputs

logger ILogger

interface to a logger instance

WithAbsolute

METHOD WithAbsolute (
 [input] absolute : ZEquipment.IAxisAbsolute) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

absolute IAxisAbsolute

Interface to an implementation with an absolute encoder

Returns

IAxisBridgeBuilder

WithBrake

METHOD WithBrake (
 [input] brake : ZEquipment.IAxisBrake) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

brake IAxisBrake

Interface to close/open a brake of an axis

Returns

IAxisBridgeBuilder

WithFeedbackCurrent

METHOD WithFeedbackCurrent (
 [input] feedbackCurrent : ZEquipment.IAxisFeedbackCurrent) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

feedbackCurrent IAxisFeedbackCurrent

Current feedback

Returns

IAxisBridgeBuilder

WithFeedbackPosition

METHOD WithFeedbackPosition (
 [input] feedbackPosition : ZEquipment.IAxisFeedbackPosition) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

feedbackPosition IAxisFeedbackPosition

Position feedback

Returns

IAxisBridgeBuilder

WithFeedbackVelocity

METHOD WithFeedbackVelocity (
 [input] feedbackVelocity : ZEquipment.IAxisFeedbackVelocity) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

feedbackVelocity IAxisFeedbackVelocity

Velocity feedback

Returns

IAxisBridgeBuilder

WithHalt

METHOD WithHalt (
 [input] halt : ZEquipment.IAxisHalt) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

halt IAxisHalt

provides an interface to the axis halt function

Returns

IAxisBridgeBuilder

WithHoming

METHOD WithHoming (
 [input] homing : ZEquipment.IAxisHoming) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

homing IAxisHoming

provides an interface to the axis homing functions

Returns

IAxisBridgeBuilder

WithMoveCurrent

METHOD WithMoveCurrent (
 [input] current : ZEquipment.IAxisMoveCurrent) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

current IAxisMoveCurrent

provides an interface to the axis move current function

Returns

IAxisBridgeBuilder

WithMovePosition

METHOD WithMovePosition (
 [input] position : ZEquipment.IAxisMovePosition) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

position IAxisMovePosition

provides an interface to the axis move position function

Returns

IAxisBridgeBuilder

WithMoveVelocity

METHOD WithMoveVelocity (
 [input] velocity : ZEquipment.IAxisMoveVelocity) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

velocity IAxisMoveVelocity

provides an interface to the axis move velocity function

Returns

IAxisBridgeBuilder

WithVelocityFeedrate

METHOD WithVelocityFeedrate (
 [input] velocityFeedrate : ZEquipment.IAxisVelocityFeedrate) : IAxisBridgeBuilder

see IAxisBridgeBuilder

Inputs

velocityFeedrate IAxisVelocityFeedrate

provides an interface to the axis velocity feedrate function

Returns

IAxisBridgeBuilder