Table of Contents

ActuatorDigitalMonoPlusLsNoUM

Namespace
ZEquipment
Extends
Inherited Properties
Inherited Methods
Implements
FUNCTION_BLOCK ActuatorDigitalMonoPlusLsNoUM EXTENDS ZEquipment.ActuatorDigital IMPLEMENTS ZCore.IUnmanagedObject, ZEquipment.IActuatorDigital, ZCore.IObject, ZCore.IError (
 [output] Diagnostics : ZCore.DiagnosticMessage,
 [output] PlusOutput : DigitalOutput)

Implementation of a digital actuator that uses one digital output for moving the actuator to it's plus position without any kind of hardware monitoring the actuators position. Usually, the actuator automatically moves back to its minux position if the plus output is not switched on. However, there is no way to monitor either side of the actuator because this actuator doesn't use any limit switches.

For details see ActuatorDigital.

Here is short code snippet with all important initialization setters for this type of actuator, you just have to edit the names and durations. Also make sure that the simulation property is set according to your testing environment:

Actuator.SetLogger(Logger);
Actuator.SetName(name:='MonostablePlusLsNo', movePlusName:='Open', moveMinusName:='Close', plusName:='IsOpen', minusName:='IsClosed');
Actuator.SetSimulation(mode:=ZEquipment.ActuatorDigitalSimulation.Automatic);
Actuator.SetSimulationUncertainty(uncertainty:=10);
Actuator.SetDelay(plusStartDuration:=0, plusEndDuration:=0, minusStartDuration:=0, minusEndDuration:=0, stop:=0);
Actuator.SetSwitchDuration(plusDuration:=0, minusDuration:=0);
Actuator.SetMovementDuration(plusDuration:=3, minusDuration:=3);
Actuator.SetTimeout(plusDuration:=0, minusDuration:=0);

Copy this example for a first test:

PROGRAM MAIN
VAR
  DateTime : ZAux.DateTimeUM;
  Logger : ZAux.LoggerFile7FFUM(datetime:=DateTime, filePath:='C:\temp\logfile.log', target:='');
  Actuator : ZEquipment.ActuatorDigitalMonoPlusLsNoUM;
  Step : ZCore.Step(begin:=0, end:=100);
END_VAR
--------------------------------------
DateTime.Cyclic();
Logger.Cyclic();
Actuator.Cyclic();

CASE Step.Index OF
  0:
    Actuator.SetLogger(Logger);
    Actuator.SetName(name:='MonostablePlusLsNo', movePlusName:='Open', moveMinusName:='Close', plusName:='IsOpen', minusName:='IsClosed');
    Actuator.SetSimulation(mode:=ZEquipment.ActuatorDigitalSimulation.Automatic);
    Actuator.SetSimulationUncertainty(uncertainty:=10);
    Actuator.SetDelay(plusStartDuration:=0, plusEndDuration:=0, minusStartDuration:=0, minusEndDuration:=0, stop:=0);
    Actuator.SetSwitchDuration(plusDuration:=0, minusDuration:=0);
    Actuator.SetMovementDuration(plusDuration:=3, minusDuration:=3);
    Actuator.SetTimeout(plusDuration:=0, minusDuration:=0);

    Step.SetNext(10);

  10:
    IF Step.OnEntry() THEN
      Actuator.MovePlusAsync(0);
    END_IF

    IF Actuator.Done THEN
      Step.SetNext(20);
    END_IF

  20:
    ;
END_CASE

Outputs

PlusOutput DigitalOutput

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

Methods

Cyclic

METHOD Cyclic ()

the IUnmanagedObjects cyclic method must be implemented by any function block that implements IUnmanagedObjects. This method should be called from the creator of the object and is not automatically taken care of from the framework.