FB_DBConnectionAdd
The FB_DBConnectionAdd function block permits additional database connections to be added to the XML configuration file.
VAR_INPUT
VAR_INPUT
sNetID :T_AmsNetId;
eDBType :E_DBTypes;
eDBValueType :E_DBValueType;
sDBServer :T_MaxString;
sDBProvider :T_MaxString;
sDBUrl :T_MaxString;
sDBSystemDB :T_MaxString;
sDBUserId :T_MaxString;
sDBPassword :T_MaxString;
sDBTable :T_MaxString;
bExecute :BOOL;
tTimeout :TIME;
END_VAR
sNetID : Is a string containing the AMS network identifier of the target device to which the ADS command is directed.
eDBType : Indicates the type of the database, e.g. 'Mobile server'.
eDBValueType : Indicates the form in which the values are or will be stored.
sDBServer : Provides the name of the server. Optional.
sDBProvider : Gives the provider of the database: Optional.
sDBUrl : Gives the path to the database.
sSystemDB : Only at "Access Databases". Contains the path to the MDW-file.
sUserId : Indicates the username for the registration.
sPassword : Contains the password
sDBTable : Gives the name of the table into which the values are to be written.
bExecute : The command is executed with the rising edge.
tTimeout : States the time before the function is cancelled.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
bErrID : UDINT;
hDBID : UDINT;
END_VAR
bBusy : The command is in the process of being transmitted by ADS. No new command will be accepted as long as "bBusy" remains TRUE.
bError : Becomes TRUE, as soon as an error occurs.
nErrID : Supplies the ADS Error Code when the bError output is set.
hDBID : Returns the ID of the database.
Requirements
Development environment | Target system type | PLC libraries to be linked |
---|---|---|
TwinCAT v2.10.0 | PC or CX (x86) | TcDatabase.Lib |
TwinCAT v2.10.0 | CX (ARM) |