Jul-06-2018, 08:07 PM
Thank you Larz60+, i will be sure to correctly post in the future. Here is the error i am seeing.
Error:Traceback (most recent call last):
File "C:\Users\JeffF\Desktop\Python 3.7\Fluke 8846A Mesurement.py", line 18, in <module>
ser.write('SENS:VOLT:RANG 10 \r\n')
File "C:\Users\JeffF\AppData\Local\Programs\Python\Python37\lib\site-packages\serial\serialwin32.py", line 308, in write
data = to_bytes(data)
File "C:\Users\JeffF\AppData\Local\Programs\Python\Python37\lib\site-packages\serial\serialutil.py", line 63, in to_bytes
raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
TypeError: unicode strings are not supported, please encode to bytes: 'SENS:VOLT:RANG 10 \r\n'
Looking up this error it seems that i should be using the following: ser.write('SENS:VOLT:RANG 10 \r\n'.encoder())but using this function causes an endless loop after the time sleep command