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: 

DAQ mx Project/MAX task Problem

I have a strange problem. I am creating a DAQ mx task for my project/MAX and everything works fine. However when I build an executable, it does not work. Has anyone faced this problem before ?

I usually use the DAQ assistant in my code. For some reason, when I run the DAQ assistant with some number of samples N1 and then later in my code, if I run it with more number of samples N1, it thinks that it has to run N1 samples rather than N2. Has anyone had this problem ? When I open the front panel and write a code using all the basic blocks everything is fine.

Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 12
(4,364 Views)
Hello Maximus00,

Where are you running the executable, is the problem occurring on the same computer or a test computer?  How are you changing the number of samples read?  I have not seen the second problem you described, how are you are you changing the number of samples?  Are you incrementing the the number in a loop? 

Regards,
Micaela N
National Instruments
0 Kudos
Message 2 of 12
(4,354 Views)
I run the executable on the same machine. When I configure the build specs, I don't see the DAQ mx task that I created.  I can see the DAQ mx task on my project explorer but not on the build specifications. Could that be the problem because DAQ mx doesn't have a task ?

Second Problem:  My DAQ mx assistant gets the number of samples from a global variable set. That is where I have different variables for different DAQ mx tasks.

Kudos are the best way to say thanks 🙂
0 Kudos
Message 3 of 12
(4,350 Views)
Hello Maximus00,

For my reference, what version of LabVIEW and DAQmx are you using? 

When you create the build specs for your executable make sure that the "Include hardware configuration files" is checked under the Advanced Category.  This will include the task and create a Data folder with a DAQmx .ini file. 

For your second question, try turning on highlight execution to see if the right values are being passed to the DAQ Assistant.  If so, would you post the smallest code that presents this problem? 

Thanks!
Micaela N
National Instruments
0 Kudos
Message 4 of 12
(4,342 Views)

It seems that "Include hardware configuration files" has an own category in LabVIEW 8.2.1. I checked this option but the data acquisition still does not work (NI-DAQmx 8.5). The VI "daqmx start task" returns an error with the number -200428, explaining that the task does not exist. It seems that it is not included in the installer.

How can I tell the installer to include the tasks from the project (and not only from MAX)?

 

Could somebody answer quickly please? The application should already be running. Thank you verry much indeed.

Greetings

shb

0 Kudos
Message 5 of 12
(4,197 Views)

I found the information for the data acquisition in the file "data/NI-DAQmx.ini". But why does the executable not use it?

The error occurs on a test computer and also on the same computer the executable was built with. Can somebody help me?

Greetings from your dejected shb

 

Message Edited by shb on 06-20-2007 06:32 PM

0 Kudos
Message 6 of 12
(4,183 Views)
Hello shb,

Here is a KnowledgeBase related to this error:

Error -200428 When Saving DAQmx Task in a Functional Global

How did you create the task that you would like to include in you executable?
Are you referring to programmatically saved tasks in MAX?

Take a look at this example to see how to programmatically save NI-DAQmx Tasks, Channels, and Scales. This allows the creation of an application which can be deployed to an end user and when run will configure their system with the tasks, channels, and scales you defined.

Programmatic Saves of NI-DAQmx Tasks, Channels, and Scale Examples

These task when saved correctly allows you to add an .ini you create with Hardwre Configuration when you are building an installer. Hardware Configuration allows you can choose to include a hardware configuration from MAX that can include MAX channels, tasks and devices.


Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 7 of 12
(4,158 Views)

Hello Sandra

Thank you verry much for answering.

As a temporary solution, I have created the task in MAX on the test computer. This works, so it is not verry urgent any more.

I am not sure if I understand everything correctly in your answer, therefore I repeat what I do understand. I followed the links you have send, but no one answered my question. I do not use a functional global nor do I want to create the task programmatically. I create the task in the LabVIEW project. The following image shows an example project with one DAQmx task.

When I create an executable, I do not uncheck the option "assume hardware configuration" (see second attachment). When I built the executable, the file data/NI-DAQmx.ini is created. Why does the executable not use this file? All the information about the channel and the scaling is included.

I look forward to hear from you.

Greetings

shb

Message Edited by shb on 06-22-2007 09:48 AM

Message Edited by shb on 06-22-2007 09:49 AM

Download All
0 Kudos
Message 8 of 12
(4,141 Views)
Hello shb,

I now see what you are trying to do. You were referring to Task created in the LabVIEW project Explorer.
I have been trying to recreate this issue on my end. Have you tried testing this issue just in the LabVIEW environement?
I will escalate this issue and see what else we can do to investigate.

At the moment perhaps considering achitecturing your application differently. Create task in MAX and including the .ini in the installer.

Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 9 of 12
(4,090 Views)
Hello shb,

From your last post I see what you are trying to do. Are you also seeing the error when it isn't an executable?
I was able to create this issue on my system and not on other ones. I am working with R&D to investigate this. Thank you for your feedback.

In terms of work arrounds, consider not using task created in the project view for now. Use the task created in MAX and including the file in your installer instead.

Please let me know if you need more clarification on how to import MAX task.

Regards,
  Sandra T.

Applications Engineering | National Instruments
0 Kudos
Message 10 of 12
(4,075 Views)