LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing global variables with references/refums

Hi, i am writing software for driving electromotors. I am informed as global vi are not the best option to transfer data from vi to subvi. How to replace them with  references/refnums?

 

Here is my app.

 

Main is Demo coolmuscle driver.

 

 

 

0 Kudos
Message 1 of 7
(2,758 Views)

Is there a compelling reason you can't transfer them with wires/connector pane?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 7
(2,738 Views)

You are aware of that you can handle multiple user event in one event handler, right ?

0 Kudos
Message 3 of 7
(2,730 Views)

Yeah, but that's not the case. I want to change control with refnums.

 

I dont know how to wire reference into subvi, which already exists to make refnum control  in the subvi. I know the principle of how it's done in making a new subvi, but not in existing subvi.

 

0 Kudos
Message 4 of 7
(2,709 Views)

Right click on a control and chose create>>reference.

In the application controls pallete, chose Property node and wire the reference to it.

Highlight the property node and under Edit Menu, select create subVI. Voila!


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 5 of 7
(2,701 Views)

Hi

 

Attached is a set of VIs that pass data from main vi to sub vis. See if this will help you.

 

All the best

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 6 of 7
(2,700 Views)

This albumn has images realted to what I call a GUI controller where I access FP object from sub-VIs. It may give you some ideas. Please note those images have links to where they were originally posted so if you want to read more, chase down those links.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 7
(2,688 Views)