LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

distributing daqmx tasks with program exe

Solved!
Go to solution

I've written a program using a USB-6501 to communicate via SPI to a TLE7242 chip on a board.  Now that I've got DAQmx VIs working, I want to create the EXE and install the program on a Non-LabVIEW computer in our lab.  However, how do I transfer or recreate the NIMAX tasks that I made on my system for the 6501 for the other computer?

0 Kudos
Message 1 of 24
(3,889 Views)
Solution
Accepted by topic author mysticfree

In Max you can do a;

 

File >>> Export

 

In the project you can do a;

 

My Computer >>> Import >>> Import NI DAQmx Configuration

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 24
(3,878 Views)

Thanks, Ben!

 

0 Kudos
Message 3 of 24
(3,862 Views)

@mysticfree wrote:

Thanks, Ben!


You are welcome but there is another approach you may want to consider.

 

If you;

drop a DAQmx task constant on a diagram and select your task you can then;

right-click >>> Generate code >>> Configuration

 

LabVIEW will script up a sub-VI that will create the task from scratch.

 

Choose your flavor...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 24
(3,857 Views)

 Oooo, options.  I like options.

 

I'll be using a different 6501 on the lab computer.  As I look at the exported text file, I'll need to change the "DevSerialNum" and "ProductNum" for the new 6501, yes?  But I won't need to be concerned if I use a scripted sub-VI, right?

0 Kudos
Message 5 of 24
(3,852 Views)

@mysticfree wrote:

 Oooo, options.  I like options.

 

I'll be using a different 6501 on the lab computer.  As I look at the exported text file, I'll need to change the "DevSerialNum" and "ProductNum" for the new 6501, yes?  But I won't need to be concerned if I use a scripted sub-VI, right?


The scripted VI lays it all out for you so you can adapt as needed.

 

In my case I use that scripted VI to get me started when I am faced with a new challenge of "how do I configure THIS task?" But once I can see how it is done I will kit-bash the Config VI to my liking and needs.

 

Have fun!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 24
(3,849 Views)

before daqmx scripted.pngafter daqmx scripted.png

Didn't go as expected. The sub-VI has no terminals or visible code.

0 Kudos
Message 7 of 24
(3,848 Views)

@mysticfree wrote:

before daqmx scripted.pngafter daqmx scripted.png

Didn't go as expected. The sub-VI has no terminals or visible code.


Then use the "Generate Config and Example".

 

That version will return the task.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 24
(3,845 Views)

I restarted LabVIEW and NI-Max and that time "Generate..." worked.  Friday gremlins...

 

Anyway, thank you so much, Ben!

0 Kudos
Message 9 of 24
(3,843 Views)

I've run into situations where you have to build your task from DAQmx calls (in my case, it involved creating Scales, which I couldn't get to work properly in the "Task" method).  Instead of building my Tasks in MAX, I build them in the Project.  If you go "New, Task" in the Project Explorer, you'll get something that mimics MAX, but saves the Task in the Project so that it automagically comes along when you build the Executable.

 

[Hmm -- I'm thinking about this now, and suspect that you might need a bit of code to define your Physical Hardware.  "Dev1" on your Development machine might not be "Dev1" when you plug the hardware into the "Deploy" PC.  Still, binding the other Task Contents inside the Project seems, to me, a Good Thing ...].

 

As almost always, except when he is spilling wine, Ben is right.

 

Bob Schor

Message 10 of 24
(3,830 Views)