MC_LinTableImportFromAsciFile_BkPlcMc

MC_LinTableImportFromAsciFile_BkPlcMc 1:

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

MC_LinTableImportFromAsciFile_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_LinTableImportFromAsciFile_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_LinTableImportFromAsciFile_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 ASCI format makes it easy to manipulate such a file with a simple editor. This is possible, but not recommended. A deviation from the expected structure of the file makes it impossible to import it. Even with the correct formatting, however, a linearization table can inadvertently be created that makes it impossible for the system to function correctly. In addition, persons may be endangered and the products or plant may be damaged.