Skip to content

Commit 8141e08

Browse files
committed
Set timeout info
1 parent bc7fee6 commit 8141e08

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scan/commands/set.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,18 @@ class Set(Command):
2323
2424
Example:
2525
>>> cmd = Set('position', 10.5)
26-
26+
27+
Note usage of timeout:
28+
When the command awaits completion, the timeout is applied to the completion check,
29+
i.e. we await the completion callback for `timeout` seconds.
30+
If another readback check is performed after the completion,
31+
this check is immediate, comparing the readback right now,
32+
and not waiting for the readback to match within another `timeout` seconds.
33+
34+
On the other hand, if completion is not used,
35+
the timeout is applied to the readback check.
36+
So in case a readback comparison is requested,
37+
we wait for up to `timeout` seconds for the readback to be within tolerance.
2738
"""
2839

2940
def __init__(self, device, value, completion=False, readback=False, tolerance=0.0, timeout=0.0, errhandler=None):

0 commit comments

Comments
 (0)