simple_scan_by_lua
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| simple_scan_by_lua [2026/06/01 13:55] – pklapetek | simple_scan_by_lua [2026/06/03 11:47] (current) – pklapetek | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Scan by Lua ===== | + | ===== Lua scan ===== |
| - | This simple client connects to the server and sets the operation regime to proportional feedback (typically used in contact mode, difference between value of signal on input and some setpoint value makes piezo to extend or shrink, depending on settings). Then it sets some basic parameters of feedback loop and sets feedback on. It sets the scanning velocity and then it scans 1x1 micrometer in 50x50 pixels using a Lua script. Finally, it stops the feedback, shrinks the z-piezo and exits. | + | This simple client |
| + | |||
| + | It connects to the server and sets the operation regime to proportional feedback (typically used in contact mode, difference between value of signal on input and some setpoint value makes piezo to extend or shrink, depending on settings). Then it sets some basic parameters of feedback loop and sets feedback on. It sets the scanning velocity and then it scans 1x1 micrometer in 50x50 pixels using a Lua script, scanning point by point, i.e. using the simplest possible commands (see [[simple_scan_by_lua_lines|Lua line scan]] for an alternative). Finally, it stops the feedback, shrinks the z-piezo and exits. | ||
| Used commands and their parameters: | Used commands and their parameters: | ||
| Line 14: | Line 16: | ||
| '' | '' | ||
| - | $$ | ||
| + | < | ||
| local scan = {} | local scan = {} | ||
| function scan.runit() | function scan.runit() | ||
| gws_clear(p) | gws_clear(p) | ||
| - | for x = 0, 10e-6, 0.2e-6 | + | for x = 0, 9.8e-6, 0.2e-6 |
| do | do | ||
| - | for y = 0, 10e-6, 0.2e-6 | + | for y = 0, 9.8e-6, 0.2e-6 |
| do | do | ||
| gws_move_to(p, | gws_move_to(p, | ||
| Line 30: | Line 32: | ||
| end | end | ||
| return scan | return scan | ||
| - | $$ | + | </ |
| '' | '' | ||
simple_scan_by_lua.1780314912.txt.gz · Last modified: 2026/06/01 13:55 by pklapetek
