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.

Interface

VAR_INPUT
bExecute          : BOOL;
bReset            : BOOL;
bLogFeederEntries : BOOL;
END_VAR
VAR_IN_OUT
stFeedGroupTable  : ST_NciFeedGroupTable;
stNciToPlc        : NciChannelToPlc;
END_VAR
VAR_OUTPUT
bFeedingDone      : BOOL;
bChannelDone      : BOOL;
bFeedBusy:        : BOOL;
bResetBusy:       : BOOL;
bError            : BOOL;
nErrorId          : UDINT;
END_VAR

Input

Data 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\CNC 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.

Input/output

Data type

Description

stFeedGroupTable

ST_NciFeedGroupTable

Table containing the rows for the NC kernel.

stNciToPlc

NciChannelToPlc

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

Output

Data 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 System

PLC Libraries to include

TwinCAT v2.10.0

PC (i386)

TcPlcInterpolation.lib