Skip to content

Commit

Permalink
Merge #483
Browse files Browse the repository at this point in the history
483: docs: mention that some instrument may require a delay between write … r=MatthieuDartiailh a=MatthieuDartiailh

…and read.

Co-authored-by: MatthieuDartiailh <marul@laposte.net>
  • Loading branch information
bors[bot] and MatthieuDartiailh committed Dec 14, 2019
2 parents eae079d + b163f5f commit 09078c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/source/introduction/communication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ start communicating as follows::
Here we use `'\n'` known as 'line feed'. This is a common value, another one is
`'\r'` i.e. 'carriage return', and in some cases the null byte '\0' is used.

In in an ideal world, this will work and you will be able to get an answer from
In an ideal world, this will work and you will be able to get an answer from
your instrument. If it does not, it means the settings are likely wrong (the
documentation does not always shine by its clarity). In the following we will
discuss common debugging tricks, if nothing works feel free to post on the
Expand Down Expand Up @@ -174,6 +174,13 @@ too fast for it, so you can try waiting a bit before reading (using
that does not cause any answer or actually your write does not work (go back
up a couple of paragraph).

.. note::

Some instruments may be slow in answering and may require you to either
increase the timeout or specify a delay between the write and read
operation. This can be done globally using |query_delay| or passing
``query=0.1`` for example to wait 100 ms after writing before reading.

The above focused on using only PyVISA, if you are running Windows, or MacOS
you are likely to have access to third party tools that can help. Some tips to
use them are given in the next section.
Expand Down
2 changes: 2 additions & 0 deletions docs/source/substitutions.sub
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

.. |MessageBasedResource| replace:: :class:`~pyvisa.resources.MessageBasedResource`

.. |query_delay| replace:: :attr:`~pyvisa.resources.MessageBasedResource.query_delay`

.. |read_bytes| replace:: :meth:`~pyvisa.resources.MessageBasedResource.read_bytes`

.. |read_ascii_values| replace:: :meth:`~pyvisa.resources.MessageBasedResource.read_ascii_values`
Expand Down

0 comments on commit 09078c2

Please sign in to comment.