Hi everyone,
There is another, very useful way to use the FETCH commands. I am not really sure what the best way to phrase it so I am going to take a shot and then illustrate with an example. When you send a measure command (say for voltage), the measurement system will also acquire the other measurement (in this case current) and you can send a FETCH command to retrieve that acquired data. Here is a very small example with some comments (all these commands tested on a N7952A Advanced Power System):
Example Snippet 1:
MEAS:VOLT? -> This will start a new acquisition and take the measurements
<read back the voltage measurement data>
FETC:CURR? -> This will return the current measured during the voltage measurement above
<read back fetched current measurements>
Since we have voltage and current measurements, the instrument can calculate power:
FETC:POW? -> P=V*I
<read back calculated power>
Please note that you can do this with arrays as well.
How can this save me time in my program you ask? Well these power supplies all have built in digitizers that you can access with some programming commands. The default measurement (at 60 Hz line frequency) is 3255 points measured at 5.12 us per point. That is a total measurement time of 16.67 ms. You have the ability to change this to fit your needs though. You can measure up to 512 Kpoints at up to 40,000 s per point. Every time you send a measure command you need to wait for the measurement to complete. For instance:
Example Snippet 2:
MEAS:VOLT?
<read back the voltage measurement data>
MEAS:CURR?
<read back the current measurement data>
You will need to wait for two acquisition periods because you are initiating two separate measurements. In the first example snippet, only the MEAS:VOLT? is initiating a measurement, the FETC:CURR is just reading data out of the instrument. The downside is that the data that you fetch is going to be of the same age as the last measurement you did so if you need something newer, you need to do a new measurement. Overall though I think that FETCH is a very useful command.
I hope people find this useful. Let us know if you have any questions by using the comments.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.