From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait for GPIB RQS uses 100% CPU

Not in a loop, I only put this VI in a blank diagram an wire the address string and a timeout value. If I run it, CPU is used at maximum ? Any hint?
0 Kudos
Message 1 of 5
(2,778 Views)
The function calls ibwait repeatedly while waiting for the device indicated in address string to assert RQS. To see this you can perform an NI Spy Capture (Click Start -> Programs -> National Instruments -> NI Spy). Press F8 to start a capture, then run your LabVIEW program. You should see ibwait called repeatedly until the timeout expires. Your CPU usage goes to 100% because LabVIEW will attempt to execute the commands defined by your code as fast as possible. In general, if other processes are running the operating system will/should schedule instructions such that CPU time is split between them.
Best,
JLS
Sixclear
Message 2 of 5
(2,777 Views)
Thank you for this JLS, your answer fit with what I see: Despite the fact that the CPU is use at 100%, nothing crash or freeze in any running process. This means to me that CPU time is correctly splitted to the processes. So I guess I don't have to worry about this.
0 Kudos
Message 3 of 5
(2,777 Views)

I like to use CPU usage as a diagnostic, and I don't need continuous polling.  Is there a way to insert a timer into this vi or otherwise specify a rate at which to make these calls to the GPIB device?  I would typically insert 50 ms wait in any such loop if I were making it myself, or create control to vary polling rate.

I'm using LV 7.1.

Any tips appreciated.

Thanks
Jeff

0 Kudos
Message 4 of 5
(2,579 Views)
Hi Jeff,
This function is a built-in function node of LabVIEW, so you will not be able to make modifications to it. When I ran it on my machine, I did not see 100% CPU usage from LabVIEW 7.1 or 8.2. I'm using version 2.4 of NI-488.2. In LabVIEW 8.2, it only displayed one call to GPIB Wait, but did wait the timeout value I specified (10 seconds). You could instead use events in VISA to wait for a service request. The VISA VI you would use is Wait for RQS.vi. You will have to enable the event first. See the help for Wait for RQS.vi. This did have lower CPU usage.

I hope this helps!
 
Regards,
Missy S.
Project Engineer
RoviSys
0 Kudos
Message 5 of 5
(2,557 Views)