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
GrabTime R time from grab command until image(s) received (ms)
AnalyzeTime R time of toolbox execution (ms)
ManagementTime R inspection management overhead time (ms), GUI update
CmdTime R command execution time, approximately value since some commands may be nested and difficult to separate (ms)
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)
ActiveTime R time from grab command is given and the images are received and analyzed (ms)
IdleTime R IdleTime = CycleTime - ActiveTime (ms)
ImageUpdateTime R time of drawing the images and graphics. In high speed systems graphics may be turned off to speed up update time
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.
Running R/W boolean state whether the system is running or not. Start is pressed. Useful for guarding commands to avoid commands executing while configuring/manually inspecting images
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.
Inspecting R boolean state of toolbox processing, system managed
Note: Inspect button is disabled when Inspecting or Grabbing is True.
CameraSimulation R/W boolean state whether images is read from camera or file
TargetComputer R/W boolean state of current computer, Target or Maintenance
LiveVideo R/W boolean status of live video flag
ImageMode R/W boolean state of image mode
Settings R boolean state is settings enabled
Service R boolean state is service enabled
ModifiedProfile R returns 1 if the profile is modified since last backup
QAlarm R Alarm state bits, System=1, Inspection=2, Curves=4, Commands=8
Profile R the full path of current profile
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
ProfileVersion R current profile version (text)
Version R current Scorpion version as string (ex. 8.2.0.462)
ScorpionDir R the full path of the running Scorpion.exe
ComputerName R name of computer
HWID R/W the hardware identification, found in the Service-General-Profile tab
LID R/W language ID, used for profile localization. Each language has a predefined integer number. Found in the Service-General-Profile tab
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.

Classification R Current classification value, from State configuration
State R last inspection state
Result R last inspection result. This is the same text as in the result panel and history list. May be localized in multilanguage profiles
ImageDiscards R/W no of discarded incoming images while image processing
Batch R/W user defined variable
Recipe R/W user defined variable
UserName R/W current logged on user, used in conjunction with the UserManager python plugin
OperationState R/W current state, used in conjunction with OperationalState python plugin
Usernames R/W defined users, used in conjunction with the UserManager python plugin
OperationStates R/W defined states, used in conjunction with OperationalState python plugin
Recipes R/W defined recipes, used in conjunction with RecipeManager python plugin
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
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


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 Software Version: 9.2.0.515 - Date: 20120502
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2012 Tordivel AS.