Appendix A
A-81
A
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
DB_PutLog (Record Operation Log)
Sample Programming
-Record the log code 100, log name Production Order, and log message Production Start, RecipeCode=12345678 into the Execution Log.
Check the completion of the DB_PutLog instruction.
Msg := CONCAT(‘Production Start,RecipeCode=
’,UDINT_TO_STRING(RecipeCode));
Record the log message into the Execution Log.
Execute
LogType
LogCode
LogName
LogMsg
_eDBC_LOGTYPE#_DBC_LOGTYPE_EXECUTION
100
‘Production Order’
Msg
When the instruction is normally completed, change the variable PutLog_OK to TRUE.
// Normal end processing
PutLog_OK := TRUE;
When the instruction is terminated due to an error, change the variable PutLog_OK to FALSE.
// Error handler
PutLog_OK := FALSE;
DB Connection Instructions