08-06-2024 03:23 PM - edited 08-06-2024 03:25 PM
I would not use a continuous trigger, but a single trigger, then put trigger in HOLD, then read the data. Its a bit risky using the continuous trigger with an older/slower instrument. If the continuous trigger is happening while you are retrieving the data, then the data buffer risks being busy while filling with the new measurement data. As Santos mentions 10s is equal to the default timeout, which you might exceed it a new measurement started during data transfer. Are you getting all 801 pts and does the data represent what's on the screen?
You can play with the FORMat to get a speed increase in the transfer if you use BINARY, but for 801 data points I don't think it will be that important and you will have to resconstrust the doubles in code. I would expect 801 double precision numbers to take roughly 1.5-3s for that vintage instrument.
Craig
08-07-2024 06:19 AM
If the trigger is set to a single trigger using the SING command, then is the HOLD really necessary, as triggering has stopped, so no more data will be coming from further sweeps to overwrite the data from the single sweep in memory anyway?
I tried both the SING command for single trigger, and the CONT for continuous trigger, but found for the continuous trigger it actually swept faster than the single trigger, so still some mystries there.
So far with still with FORM4, but looking into how to read data in FORM2 and FORM3, then perhaps FORM1 later, as data storage here is a little more complex, but if it speeds data transfer it will be worth it.
many thanks, Neil
08-07-2024 04:05 PM
SING trigger is definitely what you want to use here. Yes, it will go into HOLD after a single measurement. You want to initiate trigger, measure, wait until the instrument has data available, and then read it back. Status register will tell you when that sequence has occurred, then your data transfer should work as expected.
08-08-2024 12:47 AM
Using the FORM4 for the ascii data transfer and the inst.read() command, the time to transfer the 801 poiint sweep data is 7.5 seconds and i can read the three types of data: raw, corrected (calibrated) and formatted, and the data coming over to the PC looks good.
Problem now is i'm trying to read the binary data and the inst.read() doesnt seem to work for ascii. So i was trying the pyvisa inst.read_binary_values() and inst.query_binary_values() commands. However, there is so little information in the pyvisa read the manuals website https://pyvisa.readthedocs.io/en/latest/introduction/rvalues.html that i havnet been able to figure it yet.
08-09-2024 08:00 AM
Using the pyvisa vna.read_binary_values command, a 801 point sweep and data transfer takes 1.3 s using FORM2 and FORM5 single precision (32bit), so definitel an improvement worth having.
08-11-2024 06:25 AM
FORM1 speed for an 801 sweep and write is slightly shorter at 1.15 s. However, precision (mantissa: 16-bits) is somewhat less than single precision (mantissa: 23-bits for the 32-bit word) as used for FORM2 and FORM5.