Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a file path

I have been reading and there has been a lot of talk on this forum about avoiding global variables.  How would I pass the file path which is in my main vi to my sub vi- Export Waveforms to spreadsheet.  In my subvi I am trying to create a custom header which is reading text from a file.  The problem is that I want the control for this file path to be on the main vi front panel.  I have been trying to use property nodes but so far have been unsuccessful.  My code is attached.
Message Edited by HereWeGo on 09-11-2008 03:20 PM
0 Kudos
Message 1 of 5
(3,122 Views)

You've got a front panel control called 'file path 2' and a global called 'Path'. Delete both of these. You've got a front panel control called 'File Output Path'. In order to pass a path from a main to this VI, you need to wire the 'File Output Path' to the VI's connector pane. Using the connector pane is the basic method to pass data between a main VI and a subVI. It is covered in the on-line help as well as the tutorials available from NI.

0 Kudos
Message 2 of 5
(3,118 Views)
I have attempted to use the connector pane but am having some problems.  When I try to run my program it says that my polymorphic subVI is broken.  I would just go back and try again but I accidentally saved my export waveforms to spreadsheet sub-vi.  What is the best way to fix this error.  My code and revised sub-vi are attached
0 Kudos
Message 3 of 5
(3,100 Views)
Basically when I try to add a terminal to the connector pane, the Export Waveforms to Spreadsheet vi goes gray
0 Kudos
Message 4 of 5
(3,097 Views)
Nevermind, I forgot to relink the sub-vi
0 Kudos
Message 5 of 5
(3,094 Views)