FB_MdContainer

FB_MdContainer 1:

This class is able to write data from a list of components to a file. The file format is binary and secured via a CRC checksum. This automatically makes it more difficult for unauthorized users to manipulate this file.

Syntax:

FUNCTION_BLOCK FB_MdContainer

FB_MdContainer 2: Properties

Name

Type

Access

Description

Busy

BOOL

Get

The container is busy reading or writing.

Done

BOOL

Get

Reading or writing has been successfully completed.

Error

BOOL

Get

An error has occurred while reading or writing.

FileType

E_MdFileType

Get, Set

File encoding type

IgnoreComponentType

BOOL

Get, Set

The component type is not taken into account for calling the Callback methods.

IgnoreCrc

BOOL

Get, Set

A CRC checksum that does not match will not result in an abortion of the loading process

JsonOptions

I_MdJsonOptions

Get

Formatting options for saving in Json format

Load

BOOL

Get, Set

Command to read the file.

Name

STRING

Get, Set

Name of the machine data container.

NetId

T_AmsNetID

Get, Set

AMS (ADS) network ID of the target system.
Not available for the FileType eJson

Path

T_MaxString

Get, Set

Path under which the machine data is to be saved.

Save

BOOL

Get, Set

Command for writing the file.

Timeout

LREAL

Get, Set

Time-out period of the system response of this function.

FilePath1

STRING

Get, Set

Path under which the machine data is to be saved.

1Obsolete

FB_MdContainer 3: Methods

Name

Description

Abort()

Aborts the current loading or saving process.

AddComponent()

Adds another component to the container.

ClearChain()

Deletes the list of all components.

Cyclic()

Cycle method

FB_MdContainer 4: Interfaces

Type

Description

I_MdContainer

Standard interface on FB_MdContainer.

Prerequisites

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.56

PC or CX (x64, x86)

Tc3_PlasticFunctions (>= v12.8.2.0)