File: virtualbench.rst

package info (click to toggle)
python-pymeasure 0.14.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 8,788 kB
  • sloc: python: 47,201; makefile: 155
file content (49 lines) | stat: -rw-r--r-- 1,255 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
################
NI Virtual Bench
################

*******************
General Information
*******************

The `armstrap/pyvirtualbench <https://github.com/armstrap/armstrap-pyvirtualbench>`_ 
Python wrapper for the VirtualBench C-API is required.
This Instrument driver only interfaces the pyvirtualbench Python wrapper.

********
Examples
********
To be documented. Check the examples in the pyvirtualbench repository to get an idea.

Simple Example to switch digital lines of the DIO module.

.. code-block:: python

    from pymeasure.instruments.ni import VirtualBench
    
    vb = VirtualBench(device_name='VB8012-3057E1C')
    line = 'dig/2'  # may be list of lines
    # initialize DIO module -> available via vb.dio
    vb.acquire_digital_input_output(line, reset=False)

    vb.dio.write(self.line, {True})
    sleep(1000)
    vb.dio.write(self.line, {False})

    vb.shutdown()

****************
Instrument Class
****************

.. autoclass:: pymeasure.instruments.ni.virtualbench.VirtualBench
    :members:
    :show-inheritance:
    :inherited-members:
    :exclude-members:

.. autoclass:: pymeasure.instruments.ni.virtualbench.VirtualBench_Direct
    :members:
    :show-inheritance:
    :inherited-members:
    :exclude-members: