Appendix B
B-7
B
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
B-1-3 How to Measure Execution Time of DB Connection Instructions
The execution time of DB Connection Instructions can be measured by a Get1msCnt instruction. The
instruction calculates the value of free-running counter of the cycle from when the Busy output variable
changes to TRUE to when the variable changes to FALSE.
ï‚– Example for measuring execution time of a DB_Insert instruction
Insert a record to the DB Connection MyDB1.
DB_Insert_instance
MyDB1
MapVar_Insert
Execute
DBConnection
MapVar
TimeOut
DB_Insert
Done
Busy
Error
ErrorID
SendStatus
Measure execution time of the DB_Insert instruction and output the result to the ExecTime_msec
output variable of the SUB instruction.