Table of Contents

IActuatorDigital

Namespace
ZEquipment
Extends
Inherited Properties
Inherited Methods
INTERFACE IActuatorDigital EXTENDS ZCore.IObject, ZCore.IError

Interface for any actuator that can have two positions it can move to (minus and plus), hence the suffix Digital. There are many, many ways to implement such an actuators, e.g. with motors, hydraulically pneumatically.

See ActuatorDigital, which implement actuators that can be moved by [DigitalOutputs](xref:ZEquipment.DigitalOutput] and may have [DigitalInputs](xref:ZEquipment.DigitalInput] that may act as limit switches to observe if a movement was successful.

Properties

Simulation

PROPERTY Simulation : ActuatorDigitalSimulation

Enable or disable simulation for this actuator. This can be done on the fly also during execution of the PLC

Property Value

ActuatorDigitalSimulation

Methods

Duration

METHOD Duration () : LREAL

returns the duration of the actuator's last (successful and actually performed) movement in seconds The method may return very small values if the actuator already was in the correct position and larger numbers if it actually had to move.

Returns

LREAL

EnableForcedMovement

METHOD EnableForcedMovement (
 [input] on : BOOL)

Control if the movement of an actuator is forced or not. While the former means that the complete movement procedure is performed, the later means that parts of the movement procedure are skipped if (and only if) the actuator is already in the correct position. For testing the correct position the software status (stored when performing a move command) and (if available) the hardware status (e.g. limit switches) are used.

Inputs

on BOOL

IsAtMinus

METHOD IsAtMinus () : BOOL

returns if the actuator is on its minus position. For checking the position the software status (stored at every movement) and (if available*) the hardware status (e.g. limit switches) are used.

Returns

BOOL

IsAtPlus

METHOD IsAtPlus () : BOOL

returns if the actuator is on its plus position. For checking the position the software status (stored at every movement) and (if available*) the hardware status (e.g. limit switches) are used.

Returns

BOOL

MoveMinusAsync

METHOD MoveMinusAsync (
 [input] startToken : ZCore.IStartToken)

Starts a movement of the actuator to its minus position. The startToken that can be optionally returned from the method is used to give an indication if the move command started or if any error occured.

_actuators.Cylinder1.MoveMinusAsync(startToken);
IF startToken.Error
THEN
  // ... an error occured, startToken.ErrorMessage() provides more information
END

Inputs

startToken IStartToken

(optional) object to check if the method was executed successfully - may be 0

MovePlusAsync

METHOD MovePlusAsync (
 [input] startToken : ZCore.IStartToken)

Starts a movement of the actuator to its plus position. The startToken that can be optionally returned from the method is used to give an indication if the move command started or if any error occured.

_actuators.Cylinder1.MovePlusAsync(startToken);
IF startToken.Error
THEN
  // ... an error occured, startToken.ErrorMessage() provides more information
END

Inputs

startToken IStartToken

(optional) object to check if the method was executed successfully - may be 0

Name

METHOD Name (
 [output] movePlusName : ZCore.ZString,
 [output] moveMinusName : ZCore.ZString,
 [output] plusName : ZCore.ZString,
 [output] minusName : ZCore.ZString) : ZCore.ZString

Returns the names of all object that are used within this actuator and were set by calling [SetName](xref:ZEquipment.ActuatorDigital#SetName]. The names that are returned independently from the fact if an actuator actually has the appropriate digital I/Os or not.

This method should be used with care. It copies several strings and should be called rarely and that means of course not every cycle, but only at initialization phases.

Outputs

movePlusName ZString

Name of the digital output, which makes the actuator move into the plus direction

moveMinusName ZString

Name of the digital output, which makes the actuator move into the minus direction

plusName ZString

Name of the limit switch for the plus direction

minusName ZString

Name of the limit switch for the minus direction

Returns

ZString

SetSimulationUncertainty

METHOD SetSimulationUncertainty (
 [input] uncertainty : LREAL)

This simulation uncertainy parameter is used to introduce a bit more realism to movement durations if an actuators input is simulated.

Inputs

uncertainty LREAL

In percent (0-100) to control the jitter of the movement duration (1% means that that the simulated time is in the interval [MovementDuration*0.99, MovementDuration*1.01]

StopAsync

METHOD StopAsync (
 [input] startToken : ZCore.IStartToken)

Calling this method stops any kind of movement from the actuator as soon as possible The command overwrites ongoing position commands and disables the digital output(s) of the actuator. After disabling the digital outputs, the actuator will wait for the stop delay (see SetDelay) before the actuators transitions from the state Busy into Idle.

Note

If an ongoing task was started with an ExecutionToken as the token parameter (e.g. _actuator.ActuatorName.MoveMinusAsync(THIS^) in a Sequence), it gets informed (aborted), if not the same ExecutionToken is used here with this call.

Inputs

startToken IStartToken

(optional) object to check if the method was executed successfully - may be 0