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: 

Subvi Controls in front panel

Solved!
Go to solution

Hey people of the world, I have a question regarding subvi's and such. I am currently trying to take a loop in my program and make it a subvi to make a more modular program. The only issue is, this loop contains about 8 indicators that displays various data on my front panel. The function of this program is to test a DC motor and log the data acquired. As it functions now, the data is continously logged and displayed on the front panel but when i make it a subvi it loses the functionality to continously display the data logging and only displays the data once i stop the program. My program is attached below, if i need to clarify my issue more then i will. Thank you

0 Kudos
Message 1 of 12
(2,688 Views)

Rest of program

0 Kudos
Message 2 of 12
(2,681 Views)

Pass the data out on a notifier for the main vi to display the data.  See the contiuous measurement and logging sample templates for examples


"Should be" isn't "Is" -Jay
Message 3 of 12
(2,666 Views)

I set up a notifier just as in the template. And i get the data when i select log data, but it doesnt continously display the data logging. It just gives me a one shot display of the data.

0 Kudos
Message 4 of 12
(2,649 Views)

I find User Events an excellent way to pass data up to a GUI.  You just handle the displaying of the data in your event structure.  Makes like quite easy.  But if you are updating VERY quickly, a queue would probably be a better way to stream the data up.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 12
(2,642 Views)

@Zzimmha42 wrote:

I set up a notifier just as in the template. And i get the data when i select log data, but it doesnt continously display the data logging. It just gives me a one shot display of the data.


Did you put the reading of the notifier in a loop?  Are you writing to the notifier constantly?  Are you reading the notifier repeatedly?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 12
(2,639 Views)

The reading of the notifier is in the loop. Im not quite sure i know what you mean by having it constantly writing and reading off the notifier. I have the obtain notifier outside the loop, the send notifier in the loop and then wait for notification outside the loop sending the data to the indicators.

0 Kudos
Message 7 of 12
(2,633 Views)

@Zzimmha42 wrote:

The reading of the notifier is in the loop...and then wait for notification outside the loop sending the data to the indicators.


What?  You shouldn't have any Wait for Notification in your subVI.

 

This would be see much easier to look at with actual code.  I recommend zipping up your latest code and posting the zip file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(2,620 Views)

The wait for notification is outside the subvi, i figured out what you meant though. I went ahead and put a while loop around my wait for notification and display indicators and now it displays the continuous logging. Thank you for your help!

0 Kudos
Message 9 of 12
(2,614 Views)

here is my code anyways if you want to take a look, maybe i still have something missing or whatnot but it seems to work.

0 Kudos
Message 10 of 12
(2,612 Views)