LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hp34970a read vi doesnot wait for scan to finish

I never noticed that your Read is inside a for loop. I'm not sure that is correct. I think you should be able to do a single read and get the results from all scans. Like I mentioned once before I think, I no longer have access to the instrument or manual. I used them for years so I'm going on memory.
0 Kudos
Message 11 of 15
(814 Views)

I want to get the reading as soon as it scans.. so i set the trigger such tht it scans once and wait for instrument to finish scan and then read it... i want to repeat this...so i used a for loop...each time the reading goes into a 1d array and i did necessary action on the readings in the 1d array.

 

 

0 Kudos
Message 12 of 15
(807 Views)
yes, we can do a single read and get the readings once of all, but as i need real time readings i kept the read in the loop....
0 Kudos
Message 13 of 15
(806 Views)
That makes no sense to me.
0 Kudos
Message 14 of 15
(802 Views)

Waiting for the OPC bit to be set is a standard way to do it, but there is an alternative that uses less code and is also standard.  That is, using the *OPC? query appended to your command.  Instead of having to loop to read the OPC bit, it simply waits until anything (usually a "1") is sent to the read buffer.  As far as I know, any equipment that can do the OPC bit set can do the *OPC? query as well.

 

Here is a picture and a VI with connected terminals.

 

Billscreen1.jpg

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 15 of 15
(789 Views)