The Nanoscale World

Using a scrypt to daisy chain programs on different scan sizes

rated by 0 users
Answered (Verified) This post has 1 verified answer | 4 Replies | 3 Followers

Top 75 Contributor
12 Posts
Points 147
Andres posted on Wed, Jul 28 2010 9:26 AM

Hello, new to the forum (and to Veeco).

 

I am very impressed by the capability to use scan Asyst and run a program so that it scans several areas without me having to lay my hands on it.

I'd like to take it a step further. I have seen that I can run a test.py that can change the scan size.  I'm guessing there should be a way to have it start a program and when it's done redo the program with a smaller scan area.  A BEEP at the end of the scan would also be a plus.

I must confess that I'm new to python, I have just done some tutorials in the last couple of days. But I think that if I had a similar example or failing that a way to call the "RUN program" from python would really get me going.

I have heard there is a module called "recepies" but I think it's a bit of an over-kill for my needs.

  • | Post Points: 14

Answered (Verified) Verified Answer

Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee
Answered (Verified) Bede Pittenger replied on Wed, Jul 28 2010 4:51 PM
Verified by Stephen Minne

Hi Andres,

If you have already succeeded in running a script to change scan size, you are well on your way to controlling your system from python!  That means that you must have a Nanoscript key (to allow access to the COM interface) and Nanoscope must be registered as a COM server. 

There is a lot of information about python online, but I like the python(x,y) package for scientific computing.  You can download it for free here: http://www.pythonxy.com/.  I'd recommend the Spyder development environment to get started -- it has both an editor for writing your program and an interactive console for testing out commands.

Good luck!

--Bede

All Replies

Top 50 Contributor
17 Posts
Points 143

Hi Andres,

Recipes is specifically designed to accomodate cases like this, where you wish to program the microscope to make multiple measurments on a same sample in a scripting type format.  Recipes is essentially a GUI based script editor.  Rather than having to know anything about scripting and python, you can use GUI elements that you drag & drop steps in the recipe to set the order of the tasks that the microscope performs. 

For example, you can have the system engage on a location perform a scan at predetermined scan size with ScanAsyst, then proceed to repeat the same measurments at different scan sizes.  You can even have the stage move to new locations between measurments.  You can program the system to make dozens of measurments while you are away from the system, and then come back to a folder of captured data and a nice summary report.  Recipes is available on NanoScope V based system, v7.x or v8.x.

Adam

  • | Post Points: 10
Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee
Answered (Verified) Bede Pittenger replied on Wed, Jul 28 2010 4:51 PM
Verified by Stephen Minne

Hi Andres,

If you have already succeeded in running a script to change scan size, you are well on your way to controlling your system from python!  That means that you must have a Nanoscript key (to allow access to the COM interface) and Nanoscope must be registered as a COM server. 

There is a lot of information about python online, but I like the python(x,y) package for scientific computing.  You can download it for free here: http://www.pythonxy.com/.  I'd recommend the Spyder development environment to get started -- it has both an editor for writing your program and an interactive console for testing out commands.

Good luck!

--Bede

Top 75 Contributor
12 Posts
Points 147

Thanks Bede and Adam.

I think I'll give a little more work in with python. I don't think I can justify the expense for an extra module.

I've been looking at the *.h files and found one for engage and scan but I haven't found one for running a program.

  • | Post Points: 12
Top 10 Contributor
280 Posts
Points 6,221
Bruker Employee

The way the COM interface works, you launch your python program and it sets up communication with Nanoscope.  Your python program has all the capabilities from python and its modules (launching other programs, beeping, analyzing, plotting, etc.) and it can control Nanoscope using the commands made available through COM. 

These commands are described in the html documentation (located in the Nanoscope directory in a subdirectory called "Nanoscript\doc").  They will be similar to those described in the *.h files, but not identical.

--Bede

Page 1 of 1 (5 items) | RSS
Copyright (c) 2011 Bruker Instruments