Posted Fri, 16 Jun 2023 18:27:16 GMT by Li, Xiang

Is there a way to use SCPI to:

1. get the number of pulses on a channel at the instant of query (3 pulses for attached pic ch3) without having to do single trigger and then query the population and then do run/stop again.

2. get the average voltage of a channel at the instant of query. for the attached pic, ch1, it should return around 1.796 V, without having to add badge to measure mean, then query the badge mean, and then delete the meas badge. I tried using the below snippet but I sometimes get fouled up value like 0.1044 V when I'm expecting 1.8 V

self.write(f"MEASUREMENT:IMMED:SOURCE CH{chan}")
self.write("MEASUREMENT:IMMED:TYPE MEAN")
sleep(
.5)
mean =
round(float(self.query("MEASUREMENT:IMMED:VALUE?")), digits)
return mean

Posted Wed, 21 Jun 2023 15:45:22 GMT by Li, Xiang
post updated. 

You must be signed in to post in this forum.