Tarasik Posted May 25, 2010 Report Share Posted May 25, 2010 Hello everyone. The simple measurement. (Single measurement AC Voltage). Why the DMM takes so much computer resources? 52% of the CPU. And when run DMM Soft Front Panel CPU is not more than 2%. I use the example from NI examples folder. What is wrong? Measure AC Volts.vi Thanks Quote Link to comment
Ton Plomp Posted May 25, 2010 Report Share Posted May 25, 2010 Hello everyone. The simple measurement. (Single measurement AC Voltage). Why the DMM takes so much computer resources? 52% of the CPU. And when run DMM Soft Front Panel CPU is not more than 2%. I use the example from NI examples folder. What is wrong? Add a wait of 100 ms to the while loop. Be glad you have a dual core, on a single core this would take 100% Ton Quote Link to comment
texasaggie97 Posted May 25, 2010 Report Share Posted May 25, 2010 Hello everyone. The simple measurement. (Single measurement AC Voltage). Why the DMM takes so much computer resources? 52% of the CPU. And when run DMM Soft Front Panel CPU is not more than 2%. I use the example from NI examples folder. What is wrong? The reason it using so much CPU is because it is restarting the HW and then doing a busy wait while waiting for the point to be available from the hardware. Instead of starting from Measure AC Voltage, I started from Cont Acq & Chart Multiple Samples. This will only start the device once (niDMM Initiate) and then uses niDMM Fetch Multi Point to get the points from the device. What I added was niDMM Read Status in the loop. If there is no point available (backlog == 0), wait a few ms. If there is a point, go fetch it. Quote Link to comment
Tarasik Posted May 26, 2010 Author Report Share Posted May 26, 2010 Add a wait of 100 ms to the while loop. Of course I tried, it has no effect Instead of starting from Measure AC Voltage, I started from Cont Acq & Chart Multiple Samples. This will only start the device once (niDMM Initiate) and then uses niDMM Fetch Multi Point to get the points from the device. What I added was niDMM Read Status in the loop. If there is no point available (backlog == 0), wait a few ms. If there is a point, go fetch it. Thank you so much! It's works perfect Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.