Omron NX701-1620 User Manual page 261

Machine automation controller nj/nx-series database connection cpu units
Hide thumbs Also See for NX701-1620:
Table of Contents

Advertisement

 An error occurs for this instruction in the following cases. Error will be TRUE.
 When the Resend Spool Data operation was executed by this instruction when the DB Connection
Service was not running
 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 the value of the DBConnection input variable is invalid or the specified DB Connection is
already closed
 When a value that is not defined as an enumerator was specified in the Cmd input variable
 When the executed SQL statement resulted in an error in the DB
 When the DB Connection Service cannot communicate with the DB due to a network failure or other
causes
 When more than 32 DB Connection Instructions were executed at the same time
Sample Programming
This section gives sample programming for resending the SQL statements stored in the Spool memory if the
status of the DB Connection is Connected when the trigger variable changes to TRUE
Ladder Diagram
 Main Variables
Name
DB_GetConnectionStatus_instance
DB_ControlSpool_instance
Trigger
Operating
OperatingEnd
RS_instance
MyStatus
Resend
Nosent
ControlSpool_OK
NJ/NX-series Database Connection CPU Units User's Manual (W527)
Data type
DB_GetConnectionStatus
DB_ControlSpool
BOOL
BOOL
BOOL
RS
_sDBC_CONNECTION_STATUS
BOOL
BOOL
BOOL
Initial value
Comment
---
Instance of DB_GetConnectionStatus
instruction
---
Instance of DB_ControlSpool
instruction
FALSE
Variable used as a trigger for
resending the Spool data
FALSE
When this variable is TRUE, the
resending processing of Spool data is
executed if necessary.
FALSE
This variable changes to TRUE when
the resending processing of Spool
data 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 status of the DB Connection is
Connected.
FALSE
This variable changes to TRUE when
the status of the DB Connection is not
Connected.
FALSE
This variable changes to TRUE when
the DB_ControlSpool instruction is
completed normally.
Appendix A
A
A-73

Advertisement

Table of Contents

Troubleshooting

loading

Table of Contents