Up | AccessControl | Shutdown | Profile | Backup | Curves | Delay | LogMsg | Console | QAlarm | QAlarmReset | RefCmds | InitSaveImage | SaveImage | Script | Start | Statistics | Stop | WebBrowser

 

  

 
LogMsg

Writes a message in the Scorpion event log.

Syntax:

LogMsg;Level=[-1|0|1|2|3];<Msg=<free text>>;<Sender=<txt>>

where

  • Level - default is 1 = info1
    • -1 : error
    • 0  : warning
    • 1 : info1
    • 2 : info2
    • 3: info3
  • Sender
    • sender column in the event log, optional, default 'LogMsg'
  • Msg 
    • The message cannot include ’;’ or ’=’ as they are the protocol’s separation signs.

Example:

LogMsg; msg='This is an Info1 message'
LogMsg; level=-1; msg=This is an error message
LogMsg; level=0; msg=This is a warning
LogMsg; level=1; msg=This is an info1 message
LogMsg; level=2; msg=This is an info2 message
LogMsg; level=3; msg=This is an info3 message

Note:

These can be useful as 'debug' messages to control command sequences and program flow. Guard used with the command can be useful. Put several messages in a command sequence and use Guards to control which message to write in the event log.

Example: Adding an Alarm event to SystemLog from Script

ExecuteCmd('LogMsg','Sender=Script;Level=-1;Msg=Alarm')

Example: Defining a python method

def Message(sender,level,msg):
  ExecuteCmd('LogMsg','Sender='+sender+';level='+str(int(level))+';msg='+msg)
 

 

 

Scorpion Vision Version XII : Build 646 - Date: 20170225
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.