LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using a relative path to write to a global variable

I am trying to write a subVI that will be used at load time to gather relative file paths to other VIs, and put them in a global variable VI that is also relatively located.  Basically, I want to first open the global variable VI, which will be relatively related to the VI calling this subVI, and then I want to be able to write values into fields that already exist in it.  I looked at doing a call by reference type thing, but global variables VIs do not have connectors.

Summary: Open Global Variable VI relatively>write values into it

A possible better way would be to help me figure out how to reference the Global Variables VI relatively instead of absolutely.  That way I don't have to actually open it, I could just write the values I want directly into it like you normally would with a Global.
0 Kudos
Message 1 of 6
(4,387 Views)
If its any help, I dont want to rely on labview automatically finding the new file path to my global VI when things get moved around, I would like to hardcore this somehow.
0 Kudos
Message 2 of 6
(4,365 Views)

superlux,

i understand you want to store different relative paths in your application for later usage. but the rest, i do not understand...
1st) the relative paths are known during developement. Why not use a standard-datastorage here? (global variable would be one of many possibilities).
2nd) it should be possible to change relative paths easily before executing the vi, but outside of the developement environment. You should use ini-files here. Either read each path where you need it seperatly, or read the ini-file once and store the data in a standard-datastorage.
3rd) relative paths are built during runtime. This would be a mixture of the two points above.

All in all, maybe it is best if you took a look into more datastorages. one example which might be suitable for you is this one.

EDIT: The link above is for LabVIEW RT, but gives you some general infos on fgvs as well. 

hope this helps,
Norbert

Message Edited by Norbert B on 07-13-2007 09:18 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 6
(4,365 Views)
As I started doing some things to better explain myself I realized a fallacy in the way my folders where structured that was preventing Labview from accessing things relatively.  I would still be curious to a way to change the references in somewhere like 'VI Hierarchy' to actually be relative instead of absolute (absolute that is decided on VI open).
0 Kudos
Message 4 of 6
(4,355 Views)
oops, accidentally reposted

Message Edited by superlux on 07-13-2007 09:59 AM

0 Kudos
Message 5 of 6
(4,353 Views)

Hello,

I am not entirely sure what you would like to accomplish but we might get a better understanding if you uploaded the work you have done this far or a subset of what you have done in order to illustrate what you would like to achieve? You have plenty of properties application or VI level that can give useful information at run-time about directory paths, VIs in memory and so on.

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 6 of 6
(4,314 Views)