Igor Sleep Controller

Creates a graphical slider that will control the responsiveness of Igor. The lowest setting is the most energy-efficient (longest battery life for laptops) but the least responsive. The highest setting is the most energy/CPU intensive but the most responsive. Access it from the "Misc" menu under "Igor Speed Controller"

Menu "Misc"
    "Igor Sleep Controller",/Q,InitSleepControl(0)
End

function InitSleepControl(keepWin)
    variable keepWin
   
    if(!keepWin)
        dowindow /k SleepControlWin
        NewPanel /k=1/w=(25,25,149,123)/n=SleepControlWin
    endif
    newdatafolder /o root:Packages
    newdatafolder /o root:Packages:SleepControl
    dfref df=root:Packages:SleepControl
    nvar /z/sdfr=df sleepControlVal
    if(!nvar_exists(sleepControlVal))
        variable /g df:sleepControlVal=3
        nvar /z/sdfr=df sleepControlVal
    endif
    Slider sleepControl pos={5,2}, size={25,86}, vert=1, variable=sleepControlVal, limits={0,4,1}, ticks=-1, proc=SleepControlSlider
    TitleBox fast_,pos={42,2},size={63,21},title="High Power"
    TitleBox slow_,pos={42,70},size={61,21},title="Low Power"
end

function SleepControlSlider(info)
    struct wmslideraction &info
   
    if(info.eventCode & 1)
        variable sleepTicks=min(60,(4-info.curVal)^3)
        string cmd
        sprintf cmd,"SetProcessSleep %d",sleepTicks
        Execute/P/Q cmd
    endif
end

Forum

Support

Gallery

Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More