1

I am using a RS-232 to USB converter to connect my Agilent E3640A to my laptop. I am trying to return the manufacture's name using the command "*IDN" as stated in their manual. When i try to read the line, I get an empty string. I am also just having trouble putting the device in remote mode. Here is the link to their manual : https://all-guidesbox.com/model/agilent-technologies/e3640a.html

It seems that my power supply is not properly connected to my PC according to Keysight Connection Helper. It produces this error code:

! VI_ERROR_TMO: A timeout occurred
Visa ErrorCode: 0xBFFF0015 (-1073807339)
 ! Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

My Code:

ser = serial.Serial()
ser.timeout = 20
ser.baudrate = 9600
ser.port = 'COM8'
print('Connected to ' + ser.name)
ser.open()
ser.reset_input_buffer()
ser.reset_output_buffer()
#ser.write('SYST:INT{RS232}'.encode('utf-8'))
ser.write(b'SYST:REM')
ser.flush()
ser.write('*IDN?'.encode('utf-8'))
ser.flush()
print(ser.readline())

Actual Output:

Connected to COM8
b''

Desired Output:

Connected to COM8
‘‘Agilent Technologies,E3640A,0,X.X-Y.Y-Z.Z’’
Nycbros
  • 95
  • 8

0 Answers0