Post by radiationmedicinellu on Aug 6, 2019 13:50:36 GMT -5
I am having trouble communicating with my F71 Teslameter on my Windows computer using the Lakeshore python library.
I am connecting through a serial port (COM5) and using the Lakeshore driver ver 6.7.0.0., and Windows recognizes the meter.
There are three different ways that I have tried. Below is the code and the error messages that appear.
1. Using com_port
Code:
from lakeshore import FastHall
tesla = FastHall(com_port='COM5')
print(tesla.query('*IDN?'))
Stacktrace:
Traceback (most recent call last):
File "tesla_comport.py", line 3, in <module>tesla = FastHall(com_port='COM5')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\fast_hall.py", line 92, in __init__XIPInstrument.__init__(self, serial_number, com_port, baud_rate, flow_control, timeout, ip_address)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 104, in__init__self.connect_usb(serial_number, com_port, baud_rate, timeout, flow_control)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 259, in connect_usb
"No serial connections found with a matching COM port and/or matching serial number")
lakeshore.xip_instrument.XIPInstrumentException: No serial connections found with a matching COM port and/or matching serial number
2. Using serial_number
Code:
from lakeshore import Teslameter
tesla = Teslameter(serial_number='LSA23GN')
print(tesla.query('*IDN?'))
Stacktrace:
Traceback (most recent call last):
File "tesla_serialnumber.py", line 3, in <module>tesla = Teslameter(serial_number='LSA23GN')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\teslameter.py", line 94, in __init__XIPInstrument.__init__(self, serial_number, com_port, baud_rate, flow_control, timeout, ip_address)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 107, in __init__idn_response = self.query('*IDN?', check_errors=False).split(',')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 182, in queryresponse = self._usb_query(query_string)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 308, in _usb_queryraise XIPInstrumentException("Communication timed out")
lakeshore.xip_instrument.XIPInstrumentException: Communication timed out
3. Using teslameter()
Code:
from lakeshore import Teslameter
tesla = Teslameter()
print(tesla.query('*IDN?'))
Stacktrace:
Traceback (most recent call last):
File "tesla_teslameter.py", line 3, in <module>tesla = Teslameter()
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\teslameter.py", line 94, in __init__XIPInstrument.__init__(self, serial_number, com_port, baud_rate, flow_control, timeout, ip_address)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 107, in __init__idn_response = self.query('*IDN?', check_errors=False).split(',')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 182, in queryresponse = self._usb_query(query_string)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 308, in _usb_queryraise XIPInstrumentException("Communication timed out")
lakeshore.xip_instrument.XIPInstrumentException: Communication timed out
Any help would be much appreciated.
I am connecting through a serial port (COM5) and using the Lakeshore driver ver 6.7.0.0., and Windows recognizes the meter.
There are three different ways that I have tried. Below is the code and the error messages that appear.
1. Using com_port
Code:
from lakeshore import FastHall
tesla = FastHall(com_port='COM5')
print(tesla.query('*IDN?'))
Stacktrace:
Traceback (most recent call last):
File "tesla_comport.py", line 3, in <module>tesla = FastHall(com_port='COM5')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\fast_hall.py", line 92, in __init__XIPInstrument.__init__(self, serial_number, com_port, baud_rate, flow_control, timeout, ip_address)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 104, in__init__self.connect_usb(serial_number, com_port, baud_rate, timeout, flow_control)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 259, in connect_usb
"No serial connections found with a matching COM port and/or matching serial number")
lakeshore.xip_instrument.XIPInstrumentException: No serial connections found with a matching COM port and/or matching serial number
2. Using serial_number
Code:
from lakeshore import Teslameter
tesla = Teslameter(serial_number='LSA23GN')
print(tesla.query('*IDN?'))
Stacktrace:
Traceback (most recent call last):
File "tesla_serialnumber.py", line 3, in <module>tesla = Teslameter(serial_number='LSA23GN')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\teslameter.py", line 94, in __init__XIPInstrument.__init__(self, serial_number, com_port, baud_rate, flow_control, timeout, ip_address)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 107, in __init__idn_response = self.query('*IDN?', check_errors=False).split(',')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 182, in queryresponse = self._usb_query(query_string)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 308, in _usb_queryraise XIPInstrumentException("Communication timed out")
lakeshore.xip_instrument.XIPInstrumentException: Communication timed out
3. Using teslameter()
Code:
from lakeshore import Teslameter
tesla = Teslameter()
print(tesla.query('*IDN?'))
Stacktrace:
Traceback (most recent call last):
File "tesla_teslameter.py", line 3, in <module>tesla = Teslameter()
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\teslameter.py", line 94, in __init__XIPInstrument.__init__(self, serial_number, com_port, baud_rate, flow_control, timeout, ip_address)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 107, in __init__idn_response = self.query('*IDN?', check_errors=False).split(',')
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 182, in queryresponse = self._usb_query(query_string)
File "C:\shared\Python\Python37\lib\site-packages\lakeshore\xip_instrument.py", line 308, in _usb_queryraise XIPInstrumentException("Communication timed out")
lakeshore.xip_instrument.XIPInstrumentException: Communication timed out
Any help would be much appreciated.