Posted Fri, 09 Dec 2022 23:00:33 GMT by Devitre, Alexis
I'm trying to get 10 to 20 fresh samples from the Nanovoltmeter into a custom GUI using serial communication.

Serial communication requests (:sense:data:fresh?) using the pyserial library take an average 0.080 ± 0.057 s to return, and as much as 0.285 s.
 
  • Question 1: Is there anything I can do on the Nanovoltmeter side to improve the time it takes to get a value back, or am I limited by serial communication?
  • Question 2: Is it possible to get N samples, sampled as fast as possible, in one serial request?
Here are my initial settings, which I use in the initialization of every python object of my nanovoltmeter class:

*rst
*cls
:init:cont off;:abor
:sens:func 'volt:dc'
:sens:chan 1
:sens:volt:chan1:rang:auto on
:sens:volt:chan2:rang:auto on
:syst:azer on
:syst:lsyn off
:outp off
:sens:volt:chan1:dfil:stat on
:sens:volt:chan2:dfil:stat on
​​​​​​​:sens:volt:chan1:lpas:stat off
​​​​​​​:sens:volt:chan2:lpas:stat off
:sens:volt:nplc 1
:disp:enab on
:form:elem read
:trig:del 0
:trig:sour imm
:trig:coun inf

​​​​
Many thanks!

Alexis
 
Posted Sat, 10 Dec 2022 19:20:49 GMT by C, Andrea
The 2182A data sheet has some hints in table labeled "System Speeds".
It has an entry indicating as fast as 40 readings per second over RS-232 at 19.2K baud rate.
But the footnotes indicate the various settings that need to be in place to attain those speeds.

Relative to your present settings, you may want to turn off the digital filter.
Also the nplc value is big contributor to time.  1 NPLC at 60Hz = 16.7msec per reading (assuming no other overhead).
The 40 readings per second would be at NPLC of 0.01 which may negate the benefits of a 7.5 digit nanovolt meter.

If you can wait for the N samples to be transferred to the PC after they have all been acquired, I'd say set the sample count to N and then issue ":read?" command.  N needs to be not larger than the buffer size which is ~1024 samples.
In the Triggering chapter of the manual, check out the figure 7-10 remote operation trigger model.  If sample count is greater than 1, the logic can quickly loop back to acquire another reading.  There is coding sample at end of that chapter.
 

You must be signed in to post in this forum.