When the instruction was executed while the DB Connection Service was stopped due to an error
When the instruction was executed after the DB Connection Service was shut down or while the DB
Connection Service was being shut down
When the DB Connection name specified in the DBConnectionName input variable is not set in any
DB Connection Settings
When the DBConnectionName input variable is a text string consisting of NULL characters (16#00)
only
When a space character is included in the text string specified for the DBConnectionName input
variable
When the DBConnectionName input variable does not end in NULL.
When more than 32 DB Connection Instructions were executed at the same time
Sample Programming
This section gives sample programming for the following operations.
Get the status of the DB Connection when the trigger variable changes to TRUE.
Change the value of the Warning variable to TRUE when the spool usage has exceeded 80%.
Ladder Diagram
Main Variables
Name
DB_GetConnectionStatus_instance
Trigger
Operating
OperatingEnd
RS_instance
MyStatus
Warning
GetConnectionStatus_OK
NJ/NX-series Database Connection CPU Units User's Manual (W527)
Data type
DB_GetConnectionStatus
BOOL
BOOL
BOOL
RS
_sDBC_CONNECTION_STATUS
BOOL
BOOL
Initial value
Comment
---
Instance of DB_GetConnectionStatus
instruction
FALSE
Variable used as a trigger for getting
the status of the DB Connection
FALSE
The DB_GetConnectionStatus
instruction is executed when this
variable is TRUE.
FALSE
This variable changes to TRUE when
the DB_GetConnectionStatus
instruction is completed.
---
Instance of RS instruction
---
This variable is assigned to the
ConnectionStatus output variable
from
DB_GetConnectionStatus_instance.
FALSE
This variable changes to TRUE when
the Spool usage has exceeded 80%.
FALSE
This variable changes to TRUE when
the DB_GetConnectionStatus
instruction is completed normally.
Appendix A
A
A-67