Beckhoff Device

Documentation from the Advanced Electronics group:

Communication Patterns

For simplicity, Karabo mirrors the structure of the PLC’s soft-devices in multiple Karabo devices.

These are proxies of the PLC status, as viewed by the TCP interface.

The PLC does not send each single updates happening on the Hardware to the TCP layer, but applies the following data reduction strategies:

  • Event driven/Epsilon: the soft-device will send a specific value only in case that a change is larger than a fixed threshold (e.g. temperature for temperature sensors, position for motors)
  • Scheduled push: The soft-device can be programmed to send periodic updates.
  • Polling: Explicit request of an attribute in a defined time interval. This mode of communication is inefficient with respect to the PLC and network load and should therefore be used for debugging purposes only.

Common Properties

Epsilon

The epsilon is void for many device classes (e.g. Boolean properties..). In the devices which use epsilon it is used for one property only. E.g. Motor: position, AnalogIn: Value.

“Throttling” of fast changing properties

The maximum update rate coming from each Soft device can be set using the property Maximum Update Frequency

Each device can be included in a technical interlock implementation. This Karabo device is capable of decoding the information coming from the PLC. More information is available the section Interlock. .. _BeckhoffGeneric:

Commands

Key Displayed Name Alias Access Level Allowed States Description
reset Reset CError USER ERROR, INTERLOCK_BROKEN Resets the PLC hardware
readHardware Read   EXPERT
Requests value updates from the PLC for the properties listed under ‘Properties to read’
requestHardwareValues Request hardware values CSendAll EXPERT
Ask for all property values on the device
CReInit Reinit CReInit ADMIN
Reinitialize device
disableInterlockedSlots Disable Interlocked Slots   ADMIN INTERLOCK_BROKEN Send device into INTERLOCKED state, thus enabling all interlocked slots.
enableInterlockedSlots Enable Interlocked Slots   ADMIN INTERLOCKED Send device into INTERLOCK_BROKEN state, thus enabling all interlocked slots.

Properties

Key Displayed Name Alias Type Access Level Access Mode Allowed States Description
beckhoffComDevice BeckhoffCom Device   String OBSERVER READONLY
InstanceId of the BeckhoffCom device that forwards commands to the PLC.
busy Interface Busy   Bool OBSERVER READONLY
Defines whether the PLC softdevice is busy.
hardwareErrorDescription Hardware error description   String OBSERVER READONLY
Error Code description
hardwareErrorDescriptor Hardware error descriptor AError UInt32 OBSERVER READONLY
This word encodes in bits describing the hardware error
hardwareStatusBitField Hardware state (hex) AState UInt32 OBSERVER READONLY
This word encodes in bits the hardware-status information of this device
interlockOk Interlock Ok   Bool OBSERVER READONLY
Defines whether interlock is ok (true) or broken (false).
interlockOn Interlock On   Bool OBSERVER READONLY
Defines whether interlock surveillance is on or off.
interlockReadOnly Interlock Read Only   Bool USER INITONLY
Defines whether interlock conditions are configurable from this interface.
triggers.trigX.enable Enable   Bool USER RECONFIGURABLE
Enable/disable scheduled push for the specified property.
triggers.trigX.interval Interval   Double USER RECONFIGURABLE
Push interval in milliseconds. Minimum 100 ms (TrainId Frequency) maximum 3e5 ms (5 minutes PLC limit).
triggers.trigX.property Property   String USER RECONFIGURABLE
Alias name of the property to push.
epsilon Epsilon AEpsilon Float EXPERT RECONFIGURABLE
The epsilon determines the amount of change until a new physical value is posted from the hardware
hardwareRegion Hardware Region   String EXPERT READONLY
The current region of the hardware decoded
hardwareState Hardware state   String EXPERT READONLY
The current state of the hardware decoded
maxUpdateFrequency Maximum Update Frequency AMaxUpdFrq Float EXPERT RECONFIGURABLE
set to limit maximum update frequency for some values.
pollInterval Poll interval   Float EXPERT RECONFIGURABLE
Hardware poll interval in seconds
propertiesToPoll Properties to poll   VectorString EXPERT RECONFIGURABLE
All specified properties will be polled from the PLC with the given poll-rate
propertiesToRead Properties to read   VectorString EXPERT RECONFIGURABLE
The specified properties will be read from the PLC by activating the Read button
softDeviceId Soft device id   UInt32 EXPERT READONLY
 
waitingFor Waiting For Command Reply   String EXPERT READONLY
Any call to the PLC will be published here, once the reply is received this property will be cleared. Commands will not be sent to the PLC until this property is cleared.
force Force AForce Bool ADMIN RECONFIGURABLE
???
functionBlockName PLC Function Block Type AFWBlock String ADMIN READONLY
The type of the firmware block.
fwInstanceName PLC Instance name AName String ADMIN READONLY
The name of the firmware block instance.
fwVersion Framework Version APlcFramworkVersion String ADMIN READONLY
The version of the PLC framework.
isInterlockOverridden Interlocked Slots Enabled   Bool ADMIN READONLY
 
terminal Terminal ATerminal UInt32 ADMIN READONLY
???