12-24-2011 11:05 AM
hello i got some of problem with exe file that from my normal vi labview file i creat new vi as illustrated in my attachment , the main vi from the project working fine but when i am trying creat the vi from exe file that is not working , please see my attachment file and advice me , many think for your help ,
Best regards
eng. salam
Solved! Go to Solution.
12-24-2011 02:11 PM
I do not understand what you are asking.
1. Are you saying that this VI works in the development environment but does not work when run as a stand alone executable?
2. What is this supposed to do? It creates a VI with specified FP and BD window sizes and moves it to a particular location on the screen. Then you run the empty VI (which takes almost no time because it is empty). After that you close the front panel. Then you attempt to abort a VI which is already not running and has closed the front panel, generating error 1000.
3. When you say it is not working, please explain exactly what you expect it to do and what it is doing differently. What error do you get?
Lynn
12-24-2011 03:03 PM
thank you for your replay , this what you see it is appart from big programe and i attached this to explain , but my Q is this vi creat the new vi but when i make this as a exe file by make it in the project to get ses file for this vi and build it after that you get exe file without problem but when you try to excuite it as exe file the exe could not creat new vi like in the normal vi , so if you need to make an project for this vi and creat exe then try to run exe you 'll see that only the main vi running without creation ,
thanks
salam
12-24-2011 03:05 PM
The New VI function does not work in the Run-Time environment. That's a scripting operation, and that is only available in the development environment.
I don't know what your goal is, but perhaps LabVIEW template VIs might work for you. Can't say for sure since you haven't explained what your overall goal is.
12-24-2011 03:26 PM
my goal is that i have programe read XML file and according to this information make a scription to crate sub vi , and i have Q to get the result from new vi and reading the data from it and disply in main program , then the new vi is created according to my information and also call sun vi in side of it and run it parallel working with main vi , but what i would like from you to help me if there is another way to do that if there is no way to creat it through exe file of main vi
regards
12-24-2011 03:36 PM
also see my attachement pls
regards
12-25-2011 11:53 AM - edited 12-25-2011 11:54 AM
The Run-Time Engine is not a substitute for the development environment - you cannot create VIs with it the way you are trying to do. I understand what you are trying to do, but I don't understand why. What is the purpose of providing a means to create VIs from an XML file? Are you trying to provide a means for someone to create their own measurement program? If so, a better approach is to provide pre-written modules and provide someone a means to write a test script that calls these modules and provide a list of parameters.
12-25-2011 02:37 PM
the purpose of providing a means to create VIs from an XML file is that i have many systems that i am using labview to data logging from the field, each system has the reading data Technique, so i am trying to build the vi according what i have actualy in the field that is so easy to make the maintenance and monitoring deferent systems and in the same time i am using the same main program bat deferent field and sensors , that is about the purposes bat please my Q is why the exe file can not creat the new vi what means that ? and if by exe we can not creat new vi please advice me to make auto run for main vi without exe file ( that is the my resone to creat exe file ) that is means i am trying to run my vi autorun when the system is restarting , thanks again to you attention
12-25-2011 08:22 PM
So your trying to create a sub-program from an .exe? You can't do this from the run-time engine outside of the development environment. I think I understand why your are trying to do, but you are taking the wrong approach. Even if you could do it from the development environment, why would you? The question is not why an .exe cannot create a VI, but what method do I need to use to autodetect the available sensors out in the field and/or accommodate all the sensors by making my code flexible enough to work with all the different varieties? How many different sensors are there? What type of measurements are you taking?
12-25-2011 10:18 PM
@creat new vi by exe file wrote:
bat please my Q is why the exe file can not creat the new vi what means that ?
Because the Run-Time Environment cannot compile VIs. When you create a VI LabVIEW compiles the VI as you write it. Whenever you place an object on the block diagram the compiles is updating the code. That cannot happen in the Run-Time environment because there is no compiler.
and if by exe we can not creat new vi please advice me to make auto run for main vi without exe file
You can create a top-level VI that is set to automatically run when opened, but this means that each target machine will need the full development version of LabVIEW (which you must buy).
You need to use a different approach - your current approach will not work. As an alternative you can try looking into using a plug-in architecture. Basically you'd create a framework VI that loads in specific VIs based on what sensors you have. If you do a search on this forum you'll come across several discussions and examples on plugin frameworks.