Up | Common Tool Elements | Toolbox Menu | Image Visualisation | System Registers | Tool Templates

 

  

 
System Registers

Scorpion contains a tag database where all values are stored. There are two sections of system defined values.

System Registers - note that some of the tags are read only, writing has no effect.

Parameter Access Description
ActiveTime R time from grab command is given and the images are received and analyzed (ms)
AnalyzeTime R time of toolbox execution (ms)
Batch R/W user defined variable
CameraSimulation R/W boolean state whether images is read from camera or file. Same as Offline
Classification R Current classification value, from State configuration
CmdTime R command execution time, approximately value since some commands may be nested and difficult to separate (ms)
ComputerName R name of computer
Context R/W Read/Write context is a text parameter allowing the user to switch context of the toolbox.

Default context is empty (""), but if the user changes the textual value of the context parameter, Scorpion loads an external toolbox from an external configuration file. The name of the configuration file is <context>.spb.

Note that only the toolbox is reloaded on context changes, any references to tools and tool parameters in other subsystems within Scorpion (ie. central, curves, commands) may cause errors if the new context don't contain referred tools/parameters.

CurveUpdateTime R curve update execution time (ms), increases with the curve history length and the number of curves
CycleTime R total cycle time between two inspections, mainly useful for periodically systems (ms)
DataLogging R/W User controlled persistant flag suitable for data logging
Grabbing R/W boolean state of grabbing state, user managed only.
Note: Snapshot button is disabled when Grabbing is True.
Please observe that not releasing Grabbing will inhibit Snapshot infinitely.
GrabTime R time from grab command until image(s) received (ms)
HWID R/W the hardware identification, found in the Service-General-Profile tab
IdleTime R IdleTime = CycleTime - ActiveTime (ms)
ImageConvertTime R image convertion time between color planes during inspection (convertion time is included in AnalyzeTime)
ImageDiscards R/W no of discarded incoming images while image processing
ImageLogging R/W User controlled persistant flag suitable for image logging
ImageMode R/W boolean state of image mode
ImageUpdateTime R time of drawing the images and graphics. In high speed systems graphics may be turned off to speed up update time
Inspecting R boolean state of toolbox processing, system managed
Note: Inspect button is disabled when Inspecting or Grabbing is True.
LID R/W language ID, used for profile localization. Each language has a predefined integer number. Found in the Service-General-Profile tab
LiveVideo R/W boolean status of live video flag
ManagementTime R inspection management overhead time (ms), data and image logging, GUI update
ModifiedProfile R returns 1 if the profile is modified since last backup
Offline R/W boolean state whether images is read from camera or file. Same as CameraSimulation
Online R/W opposite as Offline
OperationState R/W current state, used in conjunction with OperationalState python plugin
OperationStates R/W defined states, used in conjunction with OperationalState python plugin
Pass R boolean state of last inspection. The value of true/false is defined in states (Service)
Product R/W user controlled string
Profile R the full path of current profile
ProfileClass R classname/family of the profile
ProfileVersion R current profile version (text)
QAlarm R Alarm state bits, System=1, Inspection=2, Curves=4, Commands=8
Recipe R/W user defined variable
Recipes R/W defined recipes, used in conjunction with RecipeManager python plugin
Result R last inspection result. This is the same text as in the result panel and history list. May be localized in multilanguage profiles
Running R/W boolean state whether the system is running or not. Useful for guarding commands to avoid commands executing while configuring/manually inspecting images
SaveQueue R number of image sets queued for saving. When saving images in a separate thread this number indicates if the saving thread is synchronized with the measuring cycle. In case of measuring cycle is too fast, only 5 image sets may be scheduled in queue. If the queue is full this the SaveQueue equals -1.
ScorpionDir R Full path of Scorpion.exe
Service R boolean state of service enabled
Settings R boolean state of settings enabled
ShowConsole R/W boolean state of console visibility
State R last inspection state
Stopped R/W opposite of Running
Storage R full path of the profiles data storage folder (data, image and video logging)
SystemName R/W the system name, name of mainform caption, found in the Service-General-Profile tab
SystemShortName R/W the system short name, name of the taskbar button, found in the Service-General-Profile tab
TargetComputer R/W boolean state of current computer, Target or Maintenance
UserName R/W current logged on user, used in conjunction with the UserManager python plugin
Usernames R/W defined users, used in conjunction with the UserManager python plugin
Version R current Scorpion version as string (ex. 8.2.0.462)
VersionLabel R the profile class version
MemoryAllocated R total allocated internal memory for the application
VirtualMemory R total allocated virtual memory for the application. This is the same number as found in the Task Manager
     
Date R a value representing the number of days that have elapsed since 12/30/1899
Time R a value representing the fraction of a 24 hour day that has elapsed
DateStr R current data as string - fixed format 'yyyy-mm-dd'
TimeStr R current time as sting - fixed format 'hh:mm:ss'
TimeMsStr R current time as string, milliseconds included - fixed format 'hh:mm:ss.nnn'
SecSinceMidnight R seconds since midnight
MSecSinceMidnight R milliseconds since midnight
FreeDiskC R total free size of the C-drive in MB
FreeDiskD R total free size of the D-drive in MB
FreeDiskE R total free size of the E-drive in MB
     
Pages.TCPIP.Active R/W mirrored configuration value of TCPIP communication setup
Pages.TCPIO.SendResponse R/W mirrored configuration value of TCPIP communication setup
Pages.TCPIP.Port R/W mirrored configuration value of TCPIP communication setup
Pages.TCPIP.Params R/W mirrored configuration value of TCPIP communication setup
Pages.TCPIP.CanReceive R mirrored value of TCPIP port state
     
Pages.RS232.Active R/W mirrored configuration value of RS232 communication setup
Pages.RS232.SendResponse R/W mirrored configuration value of RS232 communication setup
Pages.RS232.Port R/W mirrored configuration value of RS232 communication setup
Pages.RS232.Params R/W mirrored configuration value of RS232 communication setup
pages.RS232.Open R mirrored value of RS232 port state


Register  - Read/Write persistent tags with user defined content.

Parameter   Description
B0..B15 R/W Boolean user data
S0..S15 R/W Single (floating point) user data
T0..T15 R/W Text user data

Example 1 - Using System Register S0 as acounter

# connect IncTrigger to a system action like AfterGrab
# use ReserTrigger to zero the counter
# the register can be displayed in the result panel of scorpion
def IncTrigger():
  SetValue('Register.S0',GetValue('Register.S0')+1)
def ResetTrigger():
  SetValue('Register.S0',0)

Example 2 - Set Scorpion in Running Mode

SetBoolValue('System.Running',1)

Example 3 - Deativate Live Video

SetBoolValue('System.LiveVideo',0)

       
 

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