FB_ShotScopeHmi

FB_ShotScopeHmi 1:

Implements the handshake procedure for the TF8550 ShotScope on the PLC side.

FB_ShotScopeHmi 2:

Required installation on the target system

If you want to run ShotScope on a target system without engineering, you must first have completed the TF3300 installation on the target system.

In addition, on non-Beckhoff devices, you must activate a valid TF3300 Scope Server license. A trial license works only on Beckhoff devices with a valid BTN number.

Internal functions:

Syntax:

FUNCTION_BLOCK FB_ShotScopeHmi EXTENDS FB_HandshakeHmi

FB_ShotScopeHmi 3: Handshake signal properties

Name

Type

Access

Initial value

Description

PLC / HMI1

Reset

BOOL

Get, Set

FALSE

Request to reinitialize the communication.

HMI

FB_ShotScopeHmi

DataValidHmi

BOOL

Get, Set

FALSE

Confirmation from HMI that the server extension is ready.

HMI

DataValidPlc

BOOL

Get, Set

FALSE

The data from the PLC is ready to be processed.

PLC

HasNewRecord

BOOL

Get

FALSE

A recording has been completed and is ready to be processed by the HMI.

PLC

Lock

BOOL

Get, Set

FALSE

TRUE, while the HMI is processing the last recording.

HMI

ShotNumber

ULINT

Get, Set

0

Shot No. (or production cycle) to be used as a reference for the database.

PLC

FB_HandshakeHmi

CompanionID

UINT

Get, Set

0

ID of the currently connected HMI Companion.

HMI

LiveSignHMI

UINT

Get, Set

0

Changing value of the HMI client to signal an active connection.

HMI

1The PLC/HMI column describes the assignment of the write access.

FB_ShotScopeHmi 4: Properties

Name

Type

Access

Initial value

Description

Name

STRING

Get, Set

<SourceName>

Specifies the name of the class instance.

FB_ShotScopeHmi

Analysis

I_ShotScopeAnalysis

Get

<Local>

Settings for shot analysis.

Busy

BOOL

Get

FALSE

The scope is currently executing a command and has not yet stopped.

ConfigFilePath

T_MaxString

Get, Set

FALSE

Path to the .tcscopex configuration file on the target system. The base path is also used to store the database and the generated files.

Done

BOOL

Get

FALSE

The scope recording was successfully stopped.

Error

BOOL

Get, (Set)

FALSE

The scope is in an error state.

ErrorID

UDINT

Get, (Set)

0

Error code of the last error that occurred.

LogDetails

I_ShotScopeLogDetails

Get

<Local>

Additional information recorded by the HMI for each shot.

NetId

AMSNETID

Get, Set

[0,0,0,0,0,0]

AMS (ADS) network identifier of the system running the Scope server.

NetIdString

T_AmsNetID

Get, Set

‘‘

AMS (ADS) network identifier of the system running the Scope server.

QualityMonitoring

I_ShotScopeQM

Get

<Local>

Monitored quality parameters and potential PLC interventions.

RecordFileName

T_MaxString

Get, Set

‘{ShotNumber}_Beckhoff’

Provides the name of the recorded shot. After the initial assignment, the name can and must be created in the application.

Recording

BOOL

Get

FALSE

If TRUE, the scope is currently recording and is ready to record.

TimeLimit

LREAL

Get, Set

30.0 [s]

The maximum duration of a recording before it ends automatically.

[PROTECTED] _Name_

STRING

Get

<SourceName>

_Name without "HMI" following it

FB_HandshakeHmi

CompanionTimeout

LREAL

Get, Set

5.0

Time after which the Companion is considered disconnected (no longer connected) if there is no sign of life.

Disconnected

BOOL

Get

FALSE

The connection to the Companion has been lost.

FB_Base

BaseState

E_BaseState

Get

eNotHandled

Initialization state of the class instance.

Error

BOOL

Get

FALSE

Class is in an error state.

ResultMessage

I_AppMessage

Get

-

Access to the class-internal EventLogger.

[PROTECTED] _Name

STRING

Get

<SourceName>

.Name without leading 'fb'.

1Obsolete

FB_ShotScopeHmi 5: Local HMI variables

Name

Data type

Description

aCustomSettings

ARRAY[1…20] OF FB_ParameterHmi

List of configured user-specific settings.

aCustomValues

ARRAY[1…20] OF FB_ParameterHmi

List of configured user-specific values for quality monitoring.

fbAnalysis

FB_ShotScopeAnalysis

Settings for shot analysis.

fbLogDetails

FB_ShotScopeLogDetails

Additional information for each shot.

fbQualityMonitoring

FB_ShotScopeQM

Monitored quality parameters and potential PLC interventions.

FB_ShotScopeHmi 6: Methods

Name

Description

Reset()

Resets the error state of the class.

FB_ShotScopeHmi

CoreCyclic()

Fast-cycle method for accelerating the response to commands within a sequence.

Start(bCommand)

Starts recording a ShotScope video. The command is successful as soon as it was Recording = TRUE.

Stop(bCommand)

Stops recording a ShotScope video. The command is successful as soon as it was Done = TRUE.

FB_HandshakeHmi

Cyclic()

Cycle method

FB_Base

GetHMI()

Returns the assigned HMI object.

The method is not implemented in the FB_Base class. If the method is not overwritten by inheritance, a pseudo variable is always returned.

SetHMI(ipBase)

General assignment method for an FB_BaseHmi extending class as a local HMI.

The method is not implemented in the FB_Base class. If the method is not overridden by inheritance, it always fails.

[PROTECTED] _IsMyself(iCmp)

Identifies whether the transferred object corresponds to its own instance.

[PROTECTED] _QueryNamespace()

Extracts the first part of the instance path as an object namespace.

[PROTECTED] _QueryObjectName()

Extracts the last part of the instance path as the object name.

1Is obsolete

FB_ShotScopeHmi 7: Interfaces

Type

Description

I_Base

Standard interface on FB_Base.

I_ShotScopeHmi

Standard interface on FB_ShotScopeHmi.

I_TwoTaskInterface

Runtime interface for two PLC tasks.

I_HandshakeHmi

Standard interface on FB_HandshakeHmi

I_BaseDev

Covers all methods and properties of the base class.

I_Comparable

Enables comparisons via _IsMyself() or F_IsSameInstance().

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT 4026 >= v3.1.4026.19
TwinCAT 4024 >= v3.1.4024.71

PC or CX (x64, x86)

Tc3_PlasticBaseApplication (>= v12.16.0.0)