Appendix A
A-57
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_ControlService (Control DB Connection Service)
When start of the DB Connection Service was commanded while the DB Connection Service was
being stopped.
When this instruction was executed with _DBC_CMD_DEBUGLOG_ON selected in the Cmd input
variable when the SD Memory Card was not available or write-protected
When a value that is not defined as an enumerator was specified in the Cmd input varaible
When more than 32 DB Connection Instructions were executed at the same time
Sample Programming
This section gives sample programming for starting recording to the Debug Log when the trigger variable
changes to TRUE and finishing the recording when another trigger variable changes to FALSE.
Ladder Diagram
Main Variables
DB_ControlService_instance
Instance of DB_ControlService instruction
Variable used as a trigger for controlling the Debug Log
Operating BOOL FALSE The DB_ControlService instruction is executed when this
OperatingEnd BOOL FALSE This variable changes to TRUE when the
DB_ControlService instruction is completed.
Instance of RS instruction
MyCmd _eDBC_CMD --- This variable is assigned to the Cmd input variable to
DB_ControlService_instance.
ControlService_OK BOOL FALSE This variable changes to TRUE when the
DB_ControlService instruction is completed normally.
Sample Programming
- Start recording to the Debug Log when the variable LogOn changes to TRUE and finish the recording when the variable LogOn changes
to FALSE.
Check the completion of DB_ControlService instruction.
DB_ControlService_instance.Done
DB_ControlService_instance.Error
Accept the trigger for controlling the Debug Log.
DB Connection Instructions