From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-28-2019 05:13 AM
Hii,
I want to call a VI (dyna_x.vi) dynamically in my Main.vi because I want to change the contents of a Strict-Type Cluster(st_c.ctl) used in dyna_x.vi before I call dyna_x.vi thr' referencing(which gets loaded and the updated clusteris available).
This works fine in development.
The issue arises when I build an application. I cannot add the VI to source files because then the dyna_x.vi is loaded which defeats the purpose.
The application now cannot find the dyna_x VI & there is an error?
the code above is a reference to the dyna_x.vi .
The probes show the result in Development & EXE.
regards,
Akshay
11-28-2019 05:16 AM
11-28-2019 05:51 AM - edited 11-28-2019 05:54 AM
Seems to me the path is wrong.
VI paths change in executables. It will include the executable as folder...
Put a Message Box in the code, showing the VI path converted to string. Make sure it is correct. I think it's not. The wrong path is shown in the probe. Note the executable name in the path...
"c:\source code\my sub vi.vi" will turn into "c:\builds\my executable\my sub vi.vi", and you use this path to make the dynamic path...
11-30-2019 01:09 PM
You probably want to use the 'Application Folder' function (q.v.) to locate the dynamic VI.
12-01-2019 08:49 PM
I've never felt the urge to change a typedef of any kind in the middle of an executing program. Could you give a brief description of what you are planning? I'm just curious - always ready to learn something new.
12-02-2019 03:34 AM
used Application Folder VI, does not help.
12-02-2019 03:45 AM
Hello Bill,
the issue here is I update the Type def from the Contents of a Folder which has different Config Types as .ini files. So the tester can change the files at will before the start of Test depending on the Version number of each DuT, So he has the ease of not maintaining a .CFG file for any changes.
I hope I make imy Point clear .
12-02-2019 03:48 AM
@aparab wrote:
used Application Folder VI, does not help.
Put a indicator or a MessageBox in your application so you can examine the path that is used.
See how it is wrong, and what is needed to fix it..
Do you get the same error? Even if the new path is correct, there could be a new error that could be completely unrelated. Maybe even more errors when you fix that one as well...
12-02-2019 03:50 AM
@aparab wrote:
Hello Bill,
the issue here is I update the Type def from the Contents of a Folder which has different Config Types as .ini files. So the tester can change the files at will before the start of Test depending on the Version number of each DuT, So he has the ease of not maintaining a .CFG file for any changes.
I hope I make imy Point clear .
A dynamic enum will only make sense to the dynamically loaded part. The enum will not update in the rest of the program (unless you use variants).
I'd usually fall back to rings. The ring's items can actually change dynamically.
12-02-2019 04:08 AM
Hii,
yes I am using a Ring Strict type, in the Cluster , everything works fime in Dev.
The issue is the EXE ist be able to load the VI dynamically , I do not include it in Source files for that reason, as it has to load dynamically.
lets see,
Thanks Akshay