Appendix A
A-62
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
Instance of RS instruction
MyStatus _sDBC_SERVICE_STATUS --- This variable is assigned to the ServiceStatus
input variable to
DB_GetServiceStatus_instance.
Warning BOOL FALSE This variable changes to TRUE when the
number of error executions is 100 or greater.
GetServiceStatus_OK BOOL FALSE This variable changes to TRUE when the
DB_GetServiceStatus instruction is completed
Sample Programming
- Change the value of the variable Warning to TRUE when the number of error executions is 100 or greater.
Check the completion of the DB_GetServiceStatus instruction.
DB_GetServiceStatus_instance.Done
DB_GetServiceStatus
_instance.Error
Get the status of the DB Connection Service.
DB_GetServiceStatus_instance
Done
Busy
Error
ErrorID
ServiceStatus
When the instruction is normally completed, change the variable Warning to TRUE if the number of error executions is 100 or greater.
DB_GetServiceStatus_instance.Done
DINT#100
MyStatus.FailedCnt
When the instruction is terminated due to an error, change the variable Warning to FALSE.
DB_GetServiceStatus_instance.Error
// Error handler
GetServiceStatus_OK := FALSE;