Here are some other information. I removed the while loop and case loop. When I compiled the .vi to the .exe file, there was an error:
A
name collision occurred during the build. VIs were renamed to protect
the build. If any dynamic calls were made to the following VI,
unexpected behavior can occur: C:\Program Files\National
Instruments\LabVIEW
8.0\vi.lib\Analysis\Matrix\Support\ComplexMatrix\Methods\Numeric.llb\Multiply
- CM,C.vi
When I ran the .exe file, the data were measured, and then
there was no responding. So, I guess the error was caused by MathScript used in the
.vi file. How can I fix this problem?
If you don't want the executable to run when opened, you can change the property at File -> VI Properties; and choose Execution. And, when building the executable, be sure to visit the Source File Settings section.
If you are getting an error during the build, have you already done this:
Right click on the build specification for the executable in the project explorer.
Select "Properties" from the pop-up menu.
In the application properties window, select the "Advanced" category.
On the right side of the window, check the option to "Enable MathScript Support"
Here are options available in "Advanced": Pass all command line arguments to application Enable debugging Disconnect type definitions and remove unused polymorphic VI instances Copy error code files Use the default LabVIEW configuration file (LabVIEW.ini) Use the default project alias file Enable ActiveX server
I use verion 8.0. Is it a reason there is no option "Enable MathScript"?
If you just navigate to Start -> Programs -> National Instruments -> NI License Manager and LabVIEW Development System, what system is activated for you? Does it say 'with Mathscript'?
I am sorry I missed the fact that you have LabVIEW 8.0. LabVIEW 8.0 MathScript does not currently support the LabVIEW Application Builder:
After creating a VI-based application, you might want to create a
stand-alone application or DLL to distribute the application. If any VI
in your application uses a MathScript Node, you cannot build the
application into an executable with the LabVIEW Application Builder.
LabVIEW does not generate an error, and there is no workaround. Do not
use a MathScript Node in LabVIEW applications that you intend to build.