10-26-2009 11:38 AM
I created a VI, (for my Agilent 35670A Digital Signal Analyzer) that (via USB GPIB using VISA) initializes, sets up, performs a Swept Sine Frequency Response, and exports the Magnitude and Phase out to a .txt file.
I used the 35670A driver from the LV site and other VIs. I placed them in a flat structure to force execution in a specific order..
This works but:
How can I make the program not execute, After I press the main Run arrow, until I press a Start Sweep (Trigger a Sweep) control that is part of my vi?
When I enclose it in a While loop it always executes once. I need it to not execute until I command it to do so.
Also:
How can I make my VI respond to the Pause, Continue, vi control while a sweep is in progress?
Right now once I run the VI I cannot make it pause. I have to wait for it to complete the sweep.
Thank you
Don Hogue
10-26-2009 04:32 PM
11-02-2009 03:21 PM
Attached, and Thanks.
Don
11-03-2009
11:18 AM
- last edited on
10-01-2025
11:19 AM
by
Content Cleaner
So a few things...
1. the only that your sequence structure is doing currently is that it is forcing the last VI (in the second frame) to execute after all of the other VIs. other than that the fact that you are using the the error wire cluster and the reference wires to wire one VI to the next is forcing execution to occur left to right.
2.Currently you have nothing that will force your execution to repeat or start when you press a given button on your front panel. To do this you will need to implement a different program architecture (currentlyt you are simply using sequential programming. Your Best bet is to either use Event Driven Programming or a State machine Architecture. I suggest looking at the following knowledgebase articles that will outline how you can implement this type of programming architecture to make your program behave as you desire.
Event Driven Programming
https://www.ni.com/en/support/documentation/supplemental/06/event-driven-programming-in-labview.html
http://zone.ni.com/devzone/cda/tut/p/id/2962
Event Structure Help
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/structures/event-structure.html
State Machine Architectures
http://zone.ni.com/devzone/cda/tut/p/id/7595
11-03-2009 11:46 AM