From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx error in executable

Hello,

 

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?

0 Kudos
Message 1 of 6
(3,718 Views)

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.



-Matt
0 Kudos
Message 2 of 6
(3,695 Views)

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.

 

0 Kudos
Message 3 of 6
(3,650 Views)

Hi JR,

 

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?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,645 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(3,637 Views)

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.

0 Kudos
Message 6 of 6
(3,568 Views)