MC_AxTableToBinFile_BkPlcMc (from V3.0)

MC_AxTableToBinFile_BkPlcMc (from V3.0) 1:

The function block writes the contents of a table to a binary file.

MC_AxTableToBinFile_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
    Execute:    BOOL:=FALSE;
    pTable:     POINTER TO LREAL:=0;
    LowIdx:     INT:=0;
    HighIdx:    INT:=0;
    FileName:   STRING(255):='';
END_VAR

Name

Type

Description

Execute

BOOL

The writing process is initiated by a rising edge at this input.

pTable

POINTER TO LREAL

This parameter is used to transfer the address of an ARRAY[nFirstIdx..nLastIdx,1..2].

LowIdx

INT

This parameter is used to transfer the lower index of the ARRAY, whose address is transferred as pTable.

HighIdx

INT

This parameter is used to transfer the upper index of the ARRAY, whose address is transferred as pTable.

FileName

STRING

This parameter can be used to specify a file name.

MC_AxTableToBinFile_BkPlcMc (from V3.0) 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_AxTableToBinFile_BkPlcMc (from V3.0) 4: Outputs

VAR_OUTPUT
    Busy:       BOOL;
    Done:       BOOL;
    Error:      BOOL;
    ErrorID:    UDINT;
END_VAR

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

Done

BOOL

Successful processing of the homing is indicated here.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

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

Behavior of the function block

A rising edge at Execute causes the function block to check the transferred parameters. A number of problems can be detected and reported during this process:

If these checks were performed without problems, the write operation is started. Busy is TRUE for the duration of the operation. This can lead to some further problems, which are indicated by various error codes. Successful writing of the file is indicated with Done.

A falling edge at Execute clears all the pending output signals. If Execute is set to FALSE while the process is still active, the process that had started continues unaffected. The signals at the end of the process (Error, ErrorID, Done) are made available for one cycle.

If a FileName is specified, it must be complete (including the drive letter and the path, if applicable, always including the file type), since it is used by function block without any further modification or amendment.

If no FileName is specified, the function block uses the path and the file name, which were specified through the MC_AxUtiStandardInit_BkPlcMc function block. File type TBL is used here, to distinguish from the parameter file with file type DAT.

MC_AxTableToBinFile_BkPlcMc (from V3.0) 5:

The file contents cannot be read or modified with an ASCII editor.