FB_PLCDBCreate

FB_PLCDBCreate 1:

Function block with two methods. One method can be used to create databases from the PLC on a database server specified in the PLC. The other method can be used to generate a new table in a specified database.

Syntax

Definition:

FUNCTION_BLOCK FB_PLCDBCreate
VAR_INPUT
    sNetID: T_AmsNetID := '';
    tTimeout: TIME := T#5S;
END_VAR
VAR_OUTPUT
    bBusy: BOOL;
    bError: BOOL;
    ipTcResultEvent: Tc3_EventLogger.I_TcResultEvent;
END_VAR

FB_PLCDBCreate 2: Inputs

Name

Type

Description

sNetID

T_AmsNetID

AMS network ID of the target device at which the ADS command is directed.

tTimeout

TIME

Indicates the time before the function is cancelled.

FB_PLCDBCreate 3: Outputs

Name

Type

Description

bBusy

BOOL

TRUE as soon as a method of the function block is active.

bError

BOOL

TRUE when an error occurs.

ipTcResultEvent

Tc3_EventLogger.I_TcResultEvent

Result interface with detailed information on the return value.

FB_PLCDBCreate 4: Methods

Name

Definition location

Description

Database

Local

Creates a new database

Table

Local

Creates a new table with a structure that is defined via an array with x elements or x columns in the PLC.

Requirements

Development environment

Target platform

PLC libraries to be linked

TwinCAT v3.1 Build 4020.10

PC or CX (x86)

Tc3_Database