FB_NciFeedTable

FB_NciFeedTable 1:

The function block FB_NciFeedTable transfers a given table to the NC kernel. If the override is set and the approvals are enabled, execution is started immediately. bFeedingDone becomes TRUE when the transfer is complete. This signal can be used for overwriting the table with NciFeedTablePreparation. In NciFeedTablePreparation the table first has to be reset.

bChannelDone indicates complete execution of the tables in the NC kernel. The identifier ST_NciEndOfTables must therefore be placed at the end of the last table.

FB_NciFeedTable 2: Inputs

VAR_INPUT
    bExecute          : BOOL;
    bReset            : BOOL;
    bLogFeederEntries : BOOL;
END_VAR

Name

Type

Description

bExecute

BOOL

The command is triggered by a rising edge at this input.

bReset

BOOL

Triggers a channel reset and also resets the function block.

bLogFeederEntries

BOOL

If TRUE, a log file 'PlcItpFeed.log' is written in the TwinCAT\Mc\Nci folder. It contains all entries that are sent to the NC kernel via ADS. If bLogFeederEntries = TRUE, more time is required until bFeedingDone becomes TRUE.

FB_NciFeedTable 3:/FB_NciFeedTable 4: Inputs/Outputs

VAR_IN_OUT
    stFeedGroupTable  : ST_NciFeedGroupTable;
    stNciToPlc        : NCTOPLC_NCICHANNEL_REF;
END_VAR

Name

Type

Description

stFeedGroupTable

ST_NciFeedGroupTable

Table containing the rows for the NC kernel.

stNciToPlc

NCTOPLC_NCICHANNEL_REF

The structure of the cyclic channel interface between NCI and PLC.

FB_NciFeedTable 5: Outputs

VAR_OUTPUT
    bFeedingDone      : BOOL;
    bChannelDone      : BOOL;
    bFeedBusy:        : BOOL;
    bResetBusy:       : BOOL;
    bError            : BOOL;
    nErrorId          : UDINT;
END_VAR

Name

Type

Description

bFeedingDone

BOOL

Becomes TRUE once all table rows have been sent to the NC kernel.

bChannelDone

BOOL

Becomes TRUE once all entries of the table in the NC kernel were executed and ST_NciEndOfTables was detected.

bFeedBusy

BOOL

Becomes TRUE when the function block sends entries to the NC kernel.

bResetBusy

BOOL

Becomes TRUE when a reset is executed.

bError

BOOL

Becomes TRUE as soon as an error has occurred.

nErrorId

UDINT

Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of a command at the inputs. The error numbers in ErrId can be looked up in the ADS error documentation or in the NC error documentation.

Requirements

Development environment

Target platform

PLC libraries to be linked

TwinCAT v3.1.0

PC or CX (x86 or x64)

Tc2_PlcInterpolation