MC_LinTableImportFromBinFile_BkPlcMc

MC_LinTableImportFromBinFile_BkPlcMc 1:

The function block imports a linearization table from a file in binary format.

MC_LinTableImportFromBinFile_BkPlcMc 2: Inputs

VAR_INPUT
    Execute:     BOOL:=FALSE;
    FileName:    STRING(255):=’’;
END_VAR

Name

Type

Description

Execute

BOOL

A rising edge initiates the import.

FileName

STRING

 

MC_LinTableImportFromBinFile_BkPlcMc 3: Inputs/outputs

VAR_INOUT
    Axis:           Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

Axis

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

MC_LinTableImportFromBinFile_BkPlcMc 4: Outputs

VAR_OUTPUT
    Busy:           BOOL;
    Done:           BOOL;
    Error:          BOOL;
    ErrorID:        UDINT;
    LastIdx:        INT:=0;
END_VAR

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

Done

BOOL

This indicates successful identification.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

LastIdx

INT

 

Behavior of the function block

The function block reads the contents of the file and interprets it line by line according to the following rules:

Manipulation of the file

The binary format makes it practically impossible to manipulate such a file with a simple editor. This is possible with an appropriate program, but absolutely not recommended. The expected structure of the file is hardly visible and it is practically impossible to maintain the formatting. Even with the correct formatting, however, it will hardly be possible to create a usable linearization table. The correct function of the system will not be possible. In addition, persons may be endangered and the products or plant may be damaged.