Common Commands
  • RSS Feed

Last modified on 1/4/2010 8:45 PM by User.


Common Commands

The following is a list of Igor/MFP commands that people may find useful. Please feel free to add to the list

Render images in 3D (anaglyphs) using Argyle

Argl_WriteValue(“”,”anaglyph”,1) //turns ON Anaglyph in Argyl window

Argl_WriteValue(“”,”anaglyph”,0) //turns OFF Anaglyph in Argyl window

Monitor system parameters

print td_ReadValue("Temperature%Default@Head") //reads temp at head

print td_ReadValue("Temperature%Default@scanner") //reads temp at scanner

Turn ON/OFF the blinking LED at the XYlvdt board and head

print td_WriteValue("LedBlinking%Default@XYLVDT", 1) //turns ON LED at XYLVDT board

print td_WriteValue("LedBlinking%Default@XYLVDT", 0) //turns OFF LED at XYLVDT board

print td_WriteValue("LedBlinking%Default@head", 1) //turns ON LED at head

print td_WriteValue("LedBlinking%Default@head", 0) //turns OFF LED at head

Set/read output voltage to XYZ piezo

print td_writevalue("Z%Output@Controller", 70) //sets output to Z piezo

print td_readvalue("Z%input@Controller") //reads z piezo voltage

print td_wv("y%output", 70) //sets output to Y piezo

print td_wv("x%output", 70) //sets output to X piezo

Send voltage pulse output (OutA) using DAC (eg…2V, -2)

print td_WriteValue("A%Output", 2);print td_WriteValue("A%Output", 0)

print td_WriteValue("A%Output", -2);print td_WriteValue("A%Output", 0)

Print out what 50 pN is in Volts for your given Spring constant and Invols. Useful for setting a trigger during force curves

Variable MyForce = 50e-12 //I want 50 pN.

Print MyForce/GV("SpringConstant")/GV("Invols")

Display captured video image

//First set the data folder to :root or create one like root:Video or root:Capture

//Then click capture button

NewImage capture

Better way of displaying captured video image

Display; AppendImage capture; ModifyGraph height={Plan, 1, left, bottom}

Rename captured video image so it doesn't get overwritten

Rename capture pollenA

Generate a piecewise continuous wave

Make/N=65535 wave0, wave1, wave2, wave3

wave0 = (p<32768)?(0):(1)

wave1 = (p<16384)?(0):((p<32768)?(5):((p<49152)?(-5):(0)))

piecewise linear

wave2 = (p<32768)?(-5+p*10/32768):(15-p*10/32768)

Output a wave to Out0 and collect from In0 in sync

//write crosspoint to connect Out0 to OutA and In0 to InA

print td_Stop() //usually not necessary but safest

print td_xSetOutWave(1, "2,2", "A%Output@Controller", wave2, 2)

print td_xSetInWave(1, "2,2", "A%Input@Controller", wave3, "print 42", 2)

print td_WriteString("2%Event@Controller","Once")

//wait for it to print 42

Display wave3

Note: be sure to read the help for td_xSetInWave and td_xSetOutWave on banks, decimation, and interpolation. In particular, you want the decimation and interpolation to be the same if you want to correlate input with output.

Integrate noise spectra to find biggest contributor

//From noise panel, click Save

//In Test Results:Noise, rename folder to a unique name (X01 not X, FastOffSurf not Fast)

//Make that the current data folder

Duplicate /O PSD Int

Int *= Int //omit this line if you are using *true* PSD from Mario's new panel

//old Noise panel gives amplitude spectral density as "PSD" and must be squared

Integrate Int

Display PSD; AppendToGraph /R Int

ModifyGraph log(bottom)=1

ModifyGraph RGB(Int)=(0,0,65535)


//Now look for the biggest step(s) in the blue integrated curve.