Gwyscope documentation

open hardware SPM controller with advanced sampling support

User Tools

Site Tools


simple_scan_by_lines

Differences

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

Link to this comparison view

Next revision
Previous revision
simple_scan_by_lines [2026/05/26 14:16] – created pklapeteksimple_scan_by_lines [2026/06/01 15:07] (current) pklapetek
Line 1: Line 1:
 ===== Scan by lines ===== ===== Scan by lines =====
  
-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 built-in line scan functions and prints the result (or shows them if you use Python version). Finally, it stops the feedback, shrinks the z-piezo and exits.+This simple client scans topography in contact mode, measuring a collection of individual profiles.  
 + 
 +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 built-in line scan functions and prints the result (or shows them if you use Python version). Finally, it stops the feedback, shrinks the z-piezo and exits.
  
 Used commands and their parameters: Used commands and their parameters:
  
-''state: mode: proportional'' to set the  +''state: mode: proportional'' to set the mode, which connects inputs, outputs and sets many other parameters as defined in hwserver.ini file on the server 
-set: pid_p: 0, pid_i: 0.1, pid_d: 0, pid_setpoint: 0.2 + 
-set_feedback: feedback: true +''set: pid_p: 0, pid_i: 0.1, pid_d: 0, pid_setpoint: 0.2'' to set the feedback loop parameters 
-set_scan: speed: 1e-6 + 
-run_scan_line: n: 50, xfrom: 0, xto: 1e-6, yfrom: 0, yto: 1e-6 +''set_feedback: feedback: true'' to start the feedback loop, which should make z-piezo to extend and probe to reach the surface if the sample is in reachable distance, setpoint is correct and settings in hwserver.ini match the experimental configuration. 
-get_scan_ndata: n  (repeated until all 50 values are measured) +  
-get_scan_data: from: 0, to: 2500 +''set_scan: speed: 1e-6'' to set the scanning speed to 1 micrometer per second 
-set_feedback: feedback: false+ 
 +''run_scan_line: n: 50, xfrom: 0, xto: 1e-6, yfrom: 0, yto: 1e-6'' to set the scan parameters for individual line (single profile). 
 + 
 +''get_scan_ndata: n''  to get how many points were already measured (repeated until all 50 values are measured) 
 + 
 +''get_scan_data: from: 0, to: 2500'' to get all the data at once (data could be red also sequentially as they are measured altering the "from" and "to" value). 
 + 
 +''set_feedback: feedback: false'' to stop the feedback 
 + 
 +''move_to: zreq: 0.0'' to move the z-piezo to zero after the feedback is stopped. 
  
 To explore it further, see the [[https://sourceforge.net/p/gwyscope/code/HEAD/tree/simple_clients_c/|simple client implementations in C]] and [[https://sourceforge.net/p/gwyscope/code/HEAD/tree/simple_clients_python/|in Python]]. To explore it further, see the [[https://sourceforge.net/p/gwyscope/code/HEAD/tree/simple_clients_c/|simple client implementations in C]] and [[https://sourceforge.net/p/gwyscope/code/HEAD/tree/simple_clients_python/|in Python]].
simple_scan_by_lines.1779797782.txt.gz · Last modified: 2026/05/26 14:16 by pklapetek