Up | ScorpionEx.py | SetValue | GetValue | SetConfigValue | GetConfigValue | GetImageMatr | DecimateMatr | RegisterCallback | RegisterPlugin | RegisterUserManager | PluginChanged | ExecuteCmd | Other

 

  

 
ExecuteCmd


Executes a Scorpion system defined command, an action or a user defined command.

An important command is Script that can be used to execute python methods or statements.

Syntax:

ExecuteCmd(command,parameters='') 

# System Commands

Example 1: Start Scorpion - "Running Mode"

#Start Scorpion
ExecuteCmd('Start','')

Example 2: Stop Running-Mode

#Stop Scorpion
ExecuteCmd('Stop','')

Example 3: adding a value to the TDVCurve ActiveX

ExecuteCmd('Script','Curve.AddData;Name=Max;Value='+str(int(max)))
ExecuteCmd('Script','Curve.PacketEnd');

Example 4: From Python using ExecuteCmd

ExecuteCmd('SaveImage',r'imageno=1;filename=c:\binar\configureshot5.bmp')
r - the r before a string avoid the filename to be converted - it means raw in python

Example 5: Restart Central

ExecuteCmd('Script','Central Stop')
ExecuteCmd('Script','Central Start')

Example 6: TdvCmdFormat - Sends message to port 8701 Setting A and B from A.Value and B.Value

          ExecuteCmd('ImCmd','destination=localhost:8701:SetValue;A=%dA.Value;B=%.1fB.Value')

Example 7: Execute Action after non-blocking 100 ms delay

          ExecuteCmd('SendSetup','delay=100')


More information about Scorpion Commands and System Events.

Tool method executeCmd.


Scorpion Vision Version XV  : Build 764 - Date: 20200529
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2020 Tordivel AS.