Examples

All examples use from smartlab_studio_ctrl import SmartLabUIA and initialize one controller per script. They are in example/.

File

Action

get.py

Read 12 parameter fields without changing settings.

set.py

Write six enabled sample settings; other settings remain commented out. Moves instrument settings.

scan.py

Request a scan once.

stop.py

Request cancellation once.

test_seq1.py

Start, wait 2 seconds, then poll every 1 second until is_running() is false. False is not proof of success.

test_seq2.py

Start, wait 2 seconds, monitor, and request cancellation after another 2 seconds if still running.

export_data.py

Open export and Save dialog; default SAVE_FILE=False, FILENAME=None.

The scripts use constants in source rather than command-line arguments. test_seq1.py and test_seq2.py do not test is_running() is None: the current method returns bool or raises. These scripts demonstrate individual GUI operations; they are not a higher-level SmartLabCtrl workflow or a server.

Export details