Hi Jake,
Thank you very much for your answer. That is exactly what I suspected, that in order to do a query from 2182A I needed to send the query to 2182A and then read the output of the RS232 link with the SYST:COMM:SER:ENT? command. However, using this method I cannot implement a sweep with more than 16 points, which is very inconvenient. Basically, using the code that I previously shared, everything works perfectly fine if the number of points for the sweep is smaller than 16. If I increase the number of points to 17, the variable 'voltage_meas' where I store the data read from Query(SYST:COMM:SER:ENT?) (see attached 'voltage_meas_17_points.png') only shows 16 values instead of 17 as we would expect. In addition, the first ('3\n') and last ('+8.21553742E) measured values do not correspond to voltage values. If I further increase the number of points to 25, we observe the same result (see attached 'voltage_meas_25_points.png') with only 16 read values, where the first and the last one do not correspond to voltage values.
From the 2182A manual I know the maximum number of points that can be stored in 2182A buffer is 1024, hence I don't believe the problem comes from 2182A. The maximum size of the 6221 buffer is 65536 and I have tried to set it up so it corresponds to the number of points of my sweep, hence I neither think the problem comes from 6221 buffer. I suspect that the element limiting the number of data that can be read is the RS232 cable. However, if I use the example software KI622O.exe provided by Keithley, I am capable to perform a sweep with up to 1024 points using exactly the same setup described before (GPIB from 6221 to the PC and RS232 + Tlink between 6221 and 2182A). Therefore, I believe there must be a way to perform the sweep with high number of points using this setup. The reason why I do not use the KI6220.exe software is because I cannot save the measured voltage values, which is critical for my experiment.
I hope you can help me on how to increase the number measured points. Let me know if further information is required.
Thank you very much.
Javier