Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.

Commit 6be5aa3

Browse files
committed
Default name for InterfaceDevice is gpib0
1 parent 579f5d1 commit 6be5aa3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

vxi11/vxi11.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,18 @@ class InterfaceDevice(Device):
785785
def __init__(self, host, name = None, client_id = None, term_char = None):
786786
"Create new VXI-11 488.1 interface device object"
787787

788+
if host.upper().startswith('TCPIP') and '::' in host:
789+
res = parse_visa_resource_string(host)
790+
791+
if res is None:
792+
raise Vxi11Exception('Invalid resource string', 'init')
793+
794+
host = res['arg1']
795+
name = res['arg2']
796+
797+
if name is None:
798+
name = "gpib0"
799+
788800
super(InterfaceDevice, self).__init__(host, name, client_id, term_char)
789801

790802
self._bus_address = 0

0 commit comments

Comments
 (0)