FB_MdBaseContainer

FB_MdBaseContainer 1:

The class extends the TF8560 FB_MdContainer by the machine data encoding of the TwinCAT 3 Plastic Application. In addition, errors that occur can be evaluated using Boolean values and file storage is simplified.

Syntax:

FUNCTION_BLOCK FB_MdBaseContainer EXTENDS FB_MdContainer

FB_MdBaseContainer 2: Properties

Name

Type

Access

Initial value

Description

Aborted

BOOL

Get

FALSE

The error that occurred was caused by an abort

AllowFolderCreation

BOOL

Get, Set

TRUE

Allows the container to create the folder structure for storing the machine data.

CrcInvalid

BOOL

Get

FALSE

The error that occurred was caused by an incorrect CRC checksum.

Created

I_Time

Get

-

Time of the first creation of a file

Details

I_MdBaseContainerDetails

Get

THIS^

Summarizes the properties of the file details.

ErrorDetails

I_MdBaseContainerErrors

Get

THIS^

Summarizes the properties of the error information.

ErrorId

UDINT

Get

0

Error ID of the last occurred error

FileAccessDenied

BOOL

Get

FALSE

The error that occurred was caused by missing file access rights.

FileNotfound

BOOL

Get

FALSE

The error that occurred was caused by the absence of the file.

IgnoreMissmatches

BOOL

Get, Set

FALSE

Forces the container to load a file despite version collision.

LastStored

I_Time

Get

-

Time of the last storage process

MissmatchBaseApp

BOOL

Get

FALSE

The version conflict that has occurred is in the versions of the TwinCAT Base Application library.

MissmatchDetected

BOOL

Get

FALSE

The error that occurred was caused by a version conflict.

MissmatchIdxFormat

BOOL

Get

FALSE

The version of the index coding causes the version conflict that occurred.

StoreCount

UDINT

Get

0

Counts the iterations of file write operations since the file was created.

UnknownParameter

BOOL

Get

FALSE

The occurred error was caused by an unknown parameter in the file.

VersionBaseApp

I_LibVersion

Get

-

Version of the Plastic Base Application library

VersionBaseAppLoaded

I_LibVersion

Get

-

Version of the Plastic Base Application library from the loaded file

VersionIdxFormat

I_IdxFormatVersion

Get

-

Index coding version

CreationDate1

DATE_AND_TIME

Get

DT#1970-1-1-0:0:0

Date of the first creation of a file

Alternatively: Created.DnT

StoreDate1

DATE_AND_TIME

Get

DT#1970-1-1-0:0:0

Date of the last saving process

Alternatively: LastStored.DnT

1 obsolete

FB_MdBaseContainer 3: Methods

Name

Description

AbortLoading()

Cancels the loading process of a file

AbortSaving()

Cancels the saving process of a file

AddComponent(iNew)

Adds another component to the container.

[INTERN] CompareFileVersion()

Compares the passed versions with the defined version in the source code.

CreateFilepath(sNamespace)

Creates a new file path based on the container name

[INTERN] OverwriteFromFile()

Used by the FB_MdFileInfo class to update the loaded version in the container.

FB_MdBaseContainer 4: Machine data

Component

Description

Index range

Number of instances

FB_MdFileInfo

File information

0x0000 Fxxx

1

FB_MdBaseContainer 5: Interfaces

Type

Description

I_MdBaseContainer

Standard interface on FB_MdBaseContainer

I_MdBaseContainerDev

Extended interface with access to the methods marked as "[INTERN]"

I_MdBaseContainerDetails

Interface to the properties with file-related information (e.g. CreationDate)

I_MdBaseContainerErrors

Interface to the properties with error information

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT >= v3.1.4024.54 (recommended)
TwinCAT >= v3.1.4024.42 (required)

PC or CX (x64, x86)

Tc3_PlasticBaseApplication (>= v3.12.7.0)