FB_SQLDatabaseEvt
Function block for opening, closing and managing a database connection.
Syntax
Definition:
FUNCTION BLOCK FB_SQLDatabaseEvt
VAR_INPUT
sNetID: T_AmsNetID := '';
tTimeout: TIME := T#5S;
END_VAR
VAR_OUTPUT
bBusy: BOOL;
bError: BOOL;
ipTcResult: Tc3_EventLogger.I_TcMessage
END_VAR
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. |
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. |
ipTcResult | Message interface from the TwinCAT 3 EventLogger, which provides details on the return value. |
Properties
Name | Type | Access | Description |
---|---|---|---|
eTraceLevel | Get, Set | Specifies the weighting of the events. Only events with a weighting higher than this value are sent to the TwinCAT system. |
Methods
Name | Definition location | Description |
---|---|---|
Local | Opens a connection to a declared database. | |
Local | Initializes an instance of the function block FB_SQLCommandEvt with the already open database connection of the function block FB_SQLDatabaseEvt. | |
Local | Initializes an instance of the function block FB_SQLStoredProcedureEvt with the already open database connection of the function block FB_SQLDatabaseEvt. | |
Local | Closes the connection to the database that was opened by this function block instance. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1 Build 4022.20 | PC or CX (x86) | Tc3_Database |