08-17-2018 08:25 AM
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?
Solved! Go to Solution.
08-17-2018 08:44 AM
In Max you can do a;
File >>> Export
In the project you can do a;
My Computer >>> Import >>> Import NI DAQmx Configuration
Ben
08-17-2018 09:14 AM - edited 08-17-2018 09:34 AM
Thanks, Ben!
08-17-2018 09:29 AM
@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
08-17-2018 09:36 AM
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?
08-17-2018 09:43 AM
@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
08-17-2018 09:44 AM
Didn't go as expected. The sub-VI has no terminals or visible code.
08-17-2018 09:48 AM
@mysticfree wrote:
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
08-17-2018 09:55 AM - edited 08-17-2018 09:55 AM
I restarted LabVIEW and NI-Max and that time "Generate..." worked. Friday gremlins...
Anyway, thank you so much, Ben!
08-17-2018 10:44 AM
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