LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency sweep doesn't work in a while loop.

I'm using PXI-4461 for frequency response measurement. Attached program is modified from the exapmles provided by sound and vibration toolkit. I'd like to run the program continuously by a while loop. However, it's not work that no signal output from the device(except the first time) and no error occurred. The program worked properly if removed the outer while loop and run it by using the "Run Continuously" button. Any idea about that?

Bill
0 Kudos
Message 1 of 6
(3,463 Views)
Bill,

The reason why your frequency, magnitude, and phase do not update as you are running the program is because they are outside your nested while loop. The program written as you have will run continuously in that loop and will not effect your output until you stop execution of that loop. If you would like them to update as you run the application, try using shift registers or property nodes.

Chances are you've also had some difficulty being able to switch tabs as you are running your application, as well. If you want your program to respond to or write to anything outside a while loop you must use either property nodes, local variables, or shift registers. It depends on your application which one is most appropriate.

Good luck!

Logan S.
0 Kudos
Message 2 of 6
(3,463 Views)
Hi,

All configurations VIs placed outside the nested while loop because they used for setting the sweep parameters only and set before going into the loop. The swept engine will update the input/output signals each time according to the parameters. I don't know why the program can sweep except the first operation. There are no output signal but no error occurred?

Bill
0 Kudos
Message 3 of 6
(3,463 Views)
Hey Bill -

We're seeing the same thing you are with performing a swept sine in a loop. We're going to test some code which fixes this behavior and will make it available on web the web when it's done. I'll post another message to this thread with a link to the document.

In the mean time, we will try to get in touch with you through your email account to get you a quicker resolution.

Thanks,
Jack
0 Kudos
Message 4 of 6
(3,463 Views)
Hi Jack,

It's great to hear that you can help on this problem. Actually I sent some questions to NI support but no reply.

I'm developing many applications for PXI-4461. Are there any engineers focus on supporting 4461 SW/HW problems that I can contact?

Bill
0 Kudos
Message 5 of 6
(3,463 Views)
Hey Bill -

I'm surprised to hear that no one responded to you with your earlier email questions. The Discussion Forums are also a great place to ask for help with any applications as well as contacting NI directly.

If you do have PXI-4461 specific questions, I would recommend that you post those questions in the Measurement Hardware>>Dynamic Signal Acquisition and Analysis section.

Also, here's a link to the Knowledge Base which provides a fix to multiple iterations of the swept sine analysis:
http://digital.ni.com/public.nsf/websearch/AE622ABE5C774BE386256F2B00755C2B?OpenDocument

Jack
0 Kudos
Message 6 of 6
(3,463 Views)