FB_ShotScopeHmi

Implements the handshake procedure for the TF8550 ShotScope on the PLC side.
![]() | 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:
- Starting and stopping a Scope Server recording on the target system.
- Automatic management of file creation.
- Controlled communication with the HMI to protect against data loss.
- Self-initialization, provided that the class is called cyclically without FB_BaseRuntime.
- In this operating case, it is also not necessary to call
CoreCyclic().
Syntax:
FUNCTION_BLOCK FB_ShotScopeHmi EXTENDS FB_HandshakeHmi
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.
Properties
Name | Type | Access | Initial value | Description |
|---|---|---|---|---|
Name | STRING | Get, Set | <SourceName> | Specifies the name of the class instance. |
FB_ShotScopeHmi | ||||
Analysis | Get | <Local> | Settings for shot analysis. | |
Busy | BOOL | Get | FALSE | The scope is currently executing a command and has not yet stopped. |
ConfigFilePath | 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 | Get | <Local> | Additional information recorded by the HMI for each shot. | |
NetId | Get, Set | [0,0,0,0,0,0] | AMS (ADS) network identifier of the system running the Scope server. | |
NetIdString | 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 | 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. |
[ | STRING | Get | <SourceName> |
|
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 | Get | eNotHandled | Initialization state of the class instance. | |
Error | BOOL | Get | FALSE | Class is in an error state. |
ResultMessage | Get | - | Access to the class-internal EventLogger. | |
[ | STRING | Get | <SourceName> |
|
1Obsolete
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 | Settings for shot analysis. | |
fbLogDetails | Additional information for each shot. | |
fbQualityMonitoring | FB_ShotScopeQM | Monitored quality parameters and potential PLC interventions. |
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( | Starts recording a ShotScope video. The command is successful as soon as it was |
Stop( | Stops recording a ShotScope video. The command is successful as soon as it was |
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( | General assignment method for an The method is not implemented in the FB_Base class. If the method is not overridden by inheritance, it always fails. |
[ | Identifies whether the transferred object corresponds to its own instance. |
[ | Extracts the first part of the instance path as an object namespace. |
[ | Extracts the last part of the instance path as the object name. |
1Is obsolete
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 |
Requirements
Development environment | Target platform | PLC libraries to include |
|---|---|---|
TwinCAT 4026 >= v3.1.4026.19 | PC or CX (x64, x86) | Tc3_PlasticBaseApplication (>= v12.16.0.0) |
