Project

General

Profile

AutoIt program and script compilation » History » Version 6

Anchi Cheng, 04/29/2020 06:58 PM

1 2 Anchi Cheng
h1. AutoIt program, script compilation and testing
2 1 Anchi Cheng
3
h2. Download AutoIt Scripting program on microscope computer
4
5
see https://www.autoitscript.com/site/autoit/downloads/
6
7
h2. Compile *.au3 files
8
9 2 Anchi Cheng
These are found in your_myami/pyscope/autoit/.  Right-click on the file icon should allow you to compile.  Place the resulting exe files at a common place, for example, *C:\Program Files\AutoIt3\* and remember its location to be added to fei.cfg
10 1 Anchi Cheng
11 2 Anchi Cheng
h2. Add the locations of the exe files to fei.cfg of your leginon installation if you have not done so.
12 1 Anchi Cheng
13
# make a copy of your_myami/pyscope/fei.cfg.template and call it fei_temp.cfg
14
# compare fei_temp.cfg with your current fei.cfg used for leginon and modify fei_temp.cfg according to your current configuration.
15
# find the entries related to AUTOIT and fill in the location of your autoit exe files.
16
17 6 Anchi Cheng
h2. Beamstop Testing
18 1 Anchi Cheng
19 2 Anchi Cheng
# You can double click on BeamstopIn.exe and Beamstopout.exe to see if it does what it should be doing. 
20
21 6 Anchi Cheng
h2. TUIAcquire Testing
22 2 Anchi Cheng
23
# Go to TUI interface and CCD/TV Camera panel.
24
# Select BM-Ceta
25 5 Anchi Cheng
# Double click on TuiAcquire.exe to execute.  This is most likely to fail in some of the validation steps.  Make correction to these settings and try again.  See the screenshot below.  The items in the blue boxes are what it validate. The items in the red boxes are what it controls.
26 2 Anchi Cheng
# When all validations are passed, you should see TIA starts acquiring movie series using Acquire preset of the CCD/TV Camera panel.
27 1 Anchi Cheng
# Double click on TuiAcquire.exe again to stop movie series acquisition.
28
29 5 Anchi Cheng
!tui_acquire.png!
30 2 Anchi Cheng
31 6 Anchi Cheng
h2. TiaExportSeries Testing
32 2 Anchi Cheng
33 3 Anchi Cheng
# Select TEM Imaging & Analysis (TIA) Window that has the series movie acquired from TuiAcquire.exe test above.
34
# Make sure Export Series Shortcut is expanded like in this screenshot
35
## !TIAexport.png!
36
# Double click TiaExportSeries.exe
37
38 4 Anchi Cheng
You should see the cursor moving to the shortcut, click it and going through the export process.  The script should save the series as C:\Users\supervisor\Documents\FEI\TIA\Exported Data\test_t_*.bin
39 3 Anchi Cheng
40
AutoIt Script clicks Export Series shortcut icon at a relative position to the corner of the window. If you observe that the position is off, please edit the script at the line
41
<pre>
42
   Local $aExportPos[2] = [47, 273]
43
</pre>
44
You can use AutoIt Window Info (part of AutoIt program installation) to find the coordinates that needs to replace 47, 273 (col, row).