Table of Contents

AxisBridge

Namespace
ZApplication
Implements

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);
FUNCTION_BLOCK AxisBridge IMPLEMENTS ZApplication.IAxisBridgeBuilder

Constructor

FB_init

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

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

Returns

BOOL

Properties

LoadBalancer

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

PROPERTY LoadBalancer : ILoadBalancer

Property Value

ILoadBalancer

Methods

AddAxis

This method adds a manually controlable axis to the axis bridge. Note that different axis types are providing different actions (e.g. moving velocity controlled, moving position controlled, homing, torque control, ...) use the With Methods of this object to setup the instance correctly (see IAxisBridgeBuilder

For example a simple stepper motor will not have the ability for a torque controlled movement so for a stepper implementation the IAxisMoveCurrent interface is usually not available and so, WithMoveCurrent can not be called for said implementation.

The publish and subscribe should be accessible for other applications, PLCs or also protocols like OPC-UA in order to control axis over the publish & subscribe structures. In a Zeugwerk Application communication structures are generally instantiated in ZGlobal.com.

If any of the passed references is invalid, the axis is not added to the axis bridge.

METHOD AddAxis (
 axis : REFERENCE TO ZEquipment.Axis,
 publish : REFERENCE TO AxisComPublish,
 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

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);
METHOD AddAxisPlcOpenMc (
 axis : REFERENCE TO ZEquipment.AxisPlcOpenMc,
 publish : REFERENCE TO AxisComPublish,
 subscribe : REFERENCE TO AxisComSubscribe)

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

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);
METHOD AddAxisSimulated (
 axis : REFERENCE TO ZEquipment.AxisSimulated,
 publish : REFERENCE TO AxisComPublish,
 subscribe : REFERENCE TO AxisComSubscribe)

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

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.

METHOD SetLogger (
 logger : ZCore.ILogger)

Inputs

logger ILogger

interface to a logger instance

WithAbsolute

see IAxisBridgeBuilder

METHOD WithAbsolute (
 absolute : ZEquipment.IAxisAbsolute) : IAxisBridgeBuilder

Inputs

absolute IAxisAbsolute

Interface to an implementation with an absolute encoder

Returns

IAxisBridgeBuilder

WithBrake

see IAxisBridgeBuilder

METHOD WithBrake (
 brake : ZEquipment.IAxisBrake) : IAxisBridgeBuilder

Inputs

brake IAxisBrake

Interface to close/open a brake of an axis

Returns

IAxisBridgeBuilder

WithFeedbackCurrent

see IAxisBridgeBuilder

METHOD WithFeedbackCurrent (
 feedbackCurrent : ZEquipment.IAxisFeedbackCurrent) : IAxisBridgeBuilder

Inputs

feedbackCurrent IAxisFeedbackCurrent

Current feedback

Returns

IAxisBridgeBuilder

WithFeedbackPosition

see IAxisBridgeBuilder

METHOD WithFeedbackPosition (
 feedbackPosition : ZEquipment.IAxisFeedbackPosition) : IAxisBridgeBuilder

Inputs

feedbackPosition IAxisFeedbackPosition

Position feedback

Returns

IAxisBridgeBuilder

WithFeedbackVelocity

see IAxisBridgeBuilder

METHOD WithFeedbackVelocity (
 feedbackVelocity : ZEquipment.IAxisFeedbackVelocity) : IAxisBridgeBuilder

Inputs

feedbackVelocity IAxisFeedbackVelocity

Velocity feedback

Returns

IAxisBridgeBuilder

WithHalt

see IAxisBridgeBuilder

METHOD WithHalt (
 halt : ZEquipment.IAxisHalt) : IAxisBridgeBuilder

Inputs

halt IAxisHalt

provides an interface to the axis halt function

Returns

IAxisBridgeBuilder

WithHoming

see IAxisBridgeBuilder

METHOD WithHoming (
 homing : ZEquipment.IAxisHoming) : IAxisBridgeBuilder

Inputs

homing IAxisHoming

provides an interface to the axis homing functions

Returns

IAxisBridgeBuilder

WithMoveCurrent

see IAxisBridgeBuilder

METHOD WithMoveCurrent (
 current : ZEquipment.IAxisMoveCurrent) : IAxisBridgeBuilder

Inputs

current IAxisMoveCurrent

provides an interface to the axis move current function

Returns

IAxisBridgeBuilder

WithMovePosition

see IAxisBridgeBuilder

METHOD WithMovePosition (
 position : ZEquipment.IAxisMovePosition) : IAxisBridgeBuilder

Inputs

position IAxisMovePosition

provides an interface to the axis move position function

Returns

IAxisBridgeBuilder

WithMoveVelocity

see IAxisBridgeBuilder

METHOD WithMoveVelocity (
 velocity : ZEquipment.IAxisMoveVelocity) : IAxisBridgeBuilder

Inputs

velocity IAxisMoveVelocity

provides an interface to the axis move velocity function

Returns

IAxisBridgeBuilder

WithVelocityFeedrate

see IAxisBridgeBuilder

METHOD WithVelocityFeedrate (
 velocityFeedrate : ZEquipment.IAxisVelocityFeedrate) : IAxisBridgeBuilder

Inputs

velocityFeedrate IAxisVelocityFeedrate

provides an interface to the axis velocity feedrate function

Returns

IAxisBridgeBuilder