Function
This instruction is used to get the current status of the DB Connection Service. The current status is output to the
ServiceStatus output variable.
Refer to the ■ ServiceStatus of A-1-2 Variables Used in the DB Connection Instructions for the status.
Precautions for Correct Use
Execution of this instruction is continued until processing is completed even if the value of Execute changes to
FALSE or the execution time exceeds the task period. The value of Done changes to TRUE when processing
is completed. Use this to confirm normal completion of processing.
Refer to Using this Section of the NJ/NX-series Instructions Reference Manual (Cat. No. W502) for a timing
chart for Execute, Done, Busy, and Error.
This instruction cannot be used on an event task. A compiling error will occur.
An error occurs for this instruction in the following cases. Error will be TRUE.
When the instruction was executed while the initialization processing of the DB Connection Service
was in progress
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 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 Service when the trigger variable changes to TRUE.
Change the value of the Warning variable to TRUE if the number of error executions is 100 or greater.
Ladder Diagram
Main Variables