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.

VAR_INPUT

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

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

bReset: Triggers a channel reset and also resets the function block

bLogFeederEntries: 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.

VAR_IN_OUT

VAR_IN_OUT
    stFeedGroupTable  : ST_NciFeedGroupTable;
    stNciToPlc        : NCTOPLC_NCICHANNEL_REF;
END_VAR

stFeedGroupTable: Table containing the rows for the NC kernel.

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

VAR_OUTPUT

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

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

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

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

bResetBusy: Becomes TRUE when a reset is executed.

bError: Becomes TRUE as soon as an error has occurred.

nErrorId: 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