Table of Contents

DigitalInput

Namespace
ZEquipment
Extends
Inherited Properties
Inherited Methods
Implements
FUNCTION_BLOCK DigitalInput EXTENDS ZEquipment.Digital IMPLEMENTS ZEquipment.IDigital, ZCore.ITrigger

This function block represents a single digital input. It includes a boolean located variable, which may be linked to a terminal. The instance can be used as is, but it is benefical to specify the following traits

  • logic (defaults to Normal, which can either be Normal (value in the PLC is the same as on the terminal) or Inverted (value in the PLC is the negation of the value on the terminal).
  • trigger logic (defaults to Normal)
  • logging (not necessary but can be useful sometimes)
  • the name of this digital input
  • simulation mode (defaults to TRUE). If simulation is enabled this function block controls an internal held state variable, which is manipulated instead of the located variable on a fieldbus terminal.
Note

By default instances are simulated. In order to make use of a physical terminal, the method SetSimulation(on:=FALSE) has to be called.

Properties

Simulation

PROPERTY Simulation : BOOL

By default all digital interfaces that extend from this function block are simulated, to disable simulation mode this can be done by changing this property. Usually, the decision if simulation is used, takes places during initialization phase. However, some applications require to switch between these modes on-the-fly. In the latter case simply call this method at any time.

Property Value

BOOL

Methods

EnableImpl

METHOD PROTECTED EnableImpl (
 [input] on : BOOL)

Inputs

on BOOL