01-04-2012 04:42 AM
Hi guys
ive got a agilent 3458a digital multimeter im using it with a 34970a scanner. im using labview 11, my code is very simple but the to complete the vi is takes to long when running it. i have a feeling its down to how im reading the data but im now stuck and need help. my code is below please help if you can. all i want is for it to take ac reading everytime i hit the run button, it needs to take the readin in about 200 miliseconds but at the moment it more around 1 second per reading.
01-04-2012 06:09 AM
Ok so i figureed out its down to when you read do a visa read. but dont know how else to read the agilent any ideas thanks. im using a gpib to usb -hs. when the vi is made it will be run on a test rig from gpib pci card
01-04-2012 10:26 AM
I would first suggest you install the certified driver for the instrument (Help>Find Instrument Drivers) and try that. The speed of the reading is going to depend on range selected (i.e. Auto On) and resolution. You should check the manual for the specifications and whether a 200ms read is possible.
01-04-2012 01:58 PM - edited 01-04-2012 02:00 PM
200mSec is about right for ACV with NPLC=10 and 50Hz line and Auto Zero off. But I don't see where you are setting these parameters.
did you read the manual?
01-05-2012 01:55 AM
i have set the parameters for acv by using the FUNC ACV; command a single trigger event TRIG SGL; type of format by OFORMAT SREAL; and MFORMAT SREAL; and after it takes the reading the commands sends for TRIG AUTO;
it just takes to long to read the reading the command is sent in about 100 miliseneconds but the next part of the programme the visa read 4 bytes takes 2 seconds approx. how can i speed up this time to read. if i just put a visa read in and a indicator it comes out with symbols. so i have to type cast to flatten the data before putting into a index array to be able to give a decent figure out. there must be a quicker way of doing this.
thanks
01-05-2012 01:58 AM
01-05-2012 02:34 AM
ok
on NI i/o trace capture
it says
number decription time
1 visa wirte ("gpib::22::instr","inbuf on;.FUNC ACV:.M...") 08.11.23.796
2 visa read ("gpib::22::instr"," 4,"=...") 08.11.23.799
3 visa wirte ("gpib::22::instr","TRIG AUTO") 08.11.26.030
so from that im guessing its the read that is taking the longest.
01-05-2012 09:41 AM
@averagejoe wrote:
i have set the parameters for acv by using the FUNC ACV; command a single trigger event TRIG SGL; type of format by OFORMAT SREAL; and MFORMAT SREAL; and after it takes the reading the commands sends for TRIG AUTO;
it just takes to long to read the reading the command is sent in about 100 miliseneconds but the next part of the programme the visa read 4 bytes takes 2 seconds approx. how can i speed up this time to read. if i just put a visa read in and a indicator it comes out with symbols. so i have to type cast to flatten the data before putting into a index array to be able to give a decent figure out. there must be a quicker way of doing this.
thanks
@averagejoe wrote:
i have set the parameters for acv by using the FUNC ACV; command a single trigger event TRIG SGL; type of format by OFORMAT SREAL; and MFORMAT SREAL; and after it takes the reading the commands sends for TRIG AUTO;
it just takes to long to read the reading the command is sent in about 100 miliseneconds but the next part of the programme the visa read 4 bytes takes 2 seconds approx. how can i speed up this time to read. if i just put a visa read in and a indicator it comes out with symbols. so i have to type cast to flatten the data before putting into a index array to be able to give a decent figure out. there must be a quicker way of doing this.
thanks
You are not setting all of the parameters and if you were to look at the certified driver as I mentioned, you would see that. The resolution is set with the RES command, autorange with the ARANGE command, intergration time with the NPLC commands, etc.
Read the manual to see what effect those commands have on the measurement time. Read the manual to see what the instrument defaults are when you do not explicitly set them.
Read Appendix D of the manual which discusses optimizing the reading rate.
01-06-2012 02:44 AM
so i went back to programme put in the parts you said about, it hasnt really helped. when i change to dc the vi completes in about 800ms but when i switch to ACV it takes 2 secs for the vi to complete. looking in the manuel it does say ACV takes longer. So im not to sure what to do. I thought getting the agilent would be quicker than our solartron multimeters but its not, or i cant figure out to make it any quicker.
01-06-2012 01:10 PM
As Dennis and others have said, it is likely that the timing you are seeing is due to the instrument settings. On that type of meter there are several parameters which affect the time to take a reading and some of these may interact in complicated ways.
You really need to study the manual and try some things or find an expert in that instrument to help you. I took a look at the manual and for some settings you could be taking more than 10 seconds for a reading. Others could be as fast as 50 readings per second.
You need to specify the accuracy and resolution you need, the frequency of the signals you are measuring, the nature of any noise or interference which might be present, and perhaps other parameters. Then look for the settings which will meet your requirements or at least see what the tradeoffs might be.
We cannot do that for you.
Lynn