Skip to content
Snippets Groups Projects
Commit 1a290ddb authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

remote connection to cv tool with python

parent 4f9bf431
No related branches found
No related tags found
No related merge requests found
import pyvisa
class hp4194(object):
def __init__(self,address="GPIB3::17::INSTR"):
self.adress = address
self.rm = pyvisa.ResourceManager()
self.inst = self.rm.open_resource(address)
self.inst.control_ren(5) #local lockout
self.inst.timeout = None
def __del__(self):
self.inst.control_ren(0)
self.inst.close()
%% Cell type:code id:5ab6142f-2352-48c4-9736-3de2785360ff tags:
``` python
from command_lib import hp4194
```
%% Cell type:code id:d9ca0544-775f-4300-a3f5-3d1eeda1f3ec tags:
``` python
cv_tool = hp4194()
```
%% Cell type:code id:b9922caa-0f61-4147-8734-1abbfa9339d1 tags:
``` python
del cv_tool
```
%% Cell type:code id:233f60eb-f684-48d3-b328-5c83dac24c73 tags:
``` python
cv_tool.inst.write("RST")
```
%% Output
5
%% Cell type:code id:81aa39f3-df70-4a08-99f1-a54f17e8fa88 tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment