Gwyscope documentation

open hardware SPM controller with advanced sampling support

User Tools

Site Tools


simple_scan_by_lua

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
simple_scan_by_lua [2026/06/01 15:04] pklapeteksimple_scan_by_lua [2026/06/03 11:47] (current) pklapetek
Line 1: Line 1:
 ===== Lua scan ===== ===== 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, 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.+This simple client scans topography in contact mode, using Lua script, going point by point. 
 + 
 +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 20: Line 22:
 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, x, y, 0)             gws_move_to(p, x, y, 0)
simple_scan_by_lua.1780319048.txt.gz · Last modified: 2026/06/01 15:04 by pklapetek