I've made an easy vi to trigger a (multi) spectral camera. This vi this works fine, but I would like to run it as exectutable on anohter pc. Afther the exe is build, it doesn't work anymore, even not on my own laptop. The error appears is:
DAQmx Create Channel (DO-Digital Output).vi:6970001<append>
<B>Task Name: </B>_unnamedTask<0>
What does go wrong from vi to executable?
When you say "it" doesnt work anymore, are you referring to your VI or .exe? Also can you provide you project file? that may help to find the problem. It sounds to me that the physical channel is incorrect. For debugging purposes id make that physical channel selector a control and make sure you are able to select your physical channels.
Sorry, I meant the .exe while the vi still works fine. Attached is the projecte file, I wasn't able to solve the issue by changing it to a constant.
in general it's a bad idea to attach just the project file: this is just a XML container with the description of the project items…
In your project you defined a DAQmx channel:
<Item Name="ProjectDigitalOutChannel" Type="NI-DAQmx Channel"> <Property Name="ChanType" Type="Str">Digital Output</Property> <Property Name="Descr" Type="Str"></Property> <Property Name="DO.InvertLines" Type="Str">0</Property> <Property Name="DO.OutputDriveType" Type="Str">Active Drive</Property> <Property Name="Name" Type="Str">ProjectDigitalOutChannel</Property> <Property Name="PhysicalChanName" Type="Str">Dev2/port0</Property> </Item>
Here you use "dev2/port0" as fixed constant.
Does the computer running your EXE use the very same device names?
I wasn't able to solve the issue by changing it to a constant.
You got the suggestion to use a control. Why did you use a constant?
I would recommend using a configuration file that you can put next to your project/executable that defines the DAQmx task. You can then programmatically create the task. What this does is allow for simple changes/fixes, such as using a different port or a different device name. It is a lot simpler to update a text file than a whole executable.
The issue was that the .exe didn't run on the same laptop on which the vi was build.
Strange enough on another pc there aren't any issues with both the vi and exe. So this thread can be closed.