Up | Interface | Property Page | Script

 

  

 
Script

#This script drives the curve activeX
#Note that data can be manipulated within the script

import fpformat
min = GetTagValue('RunningMin.Value')
max = GetTagValue('RunningMax.Value')
mean = GetTagValue('RunningMean.Value')
std = GetTagValue('RunningStd.Value')

print min,max, mean, std
minStd = mean - std
maxStd = mean + std
print minStd,maxStd


ExecuteCmd('Script','Width.AddData;Name=Min;Value='+fpformat.fix(min,0))
ExecuteCmd('Script','Width.AddData;Name=Max;Value='+fpformat.fix(max,0))
ExecuteCmd('Script','Width.AddData;Name=Mean;Value='+fpformat.fix(mean,0))

ExecuteCmd('Script','Width.AddData;Name=MinStd;Value='+fpformat.fix(minStd,0))
ExecuteCmd('Script','Width.AddData;Name=MaxStd;Value='+fpformat.fix(maxStd,0))

if ( current > 10 ): #current value is defined
  ExecuteCmd('Script','Width.AddData;Name=Current;Value='+fpformat.fix(current,0))

ExecuteCmd('Script','Width.PacketEnd')

 

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