LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I copy tasks from Automation Measurement & Explorer to a LabView Project

I have a labview project which currently relies on tasks that are predefined in the Measurement and Automation Explorer. I haven't been able to figure out how to export them out of the Measurement and Automation Explorer to be imported into Labview. Can this be done?
0 Kudos
Message 1 of 10
(3,957 Views)
Hi Steve,
if you have a task in the MAX, then you can create a task constant in your vi and select the created task there.
Mike
0 Kudos
Message 2 of 10
(3,953 Views)
No, this cannot be done. Nevertheless, you can use the application builder to distribute the MAX-channels together with your finished application. If you have this addon (explicitly or due to a professional developement license), you can build your application as executable. After this, you can package the exe and the MAX configuration together into an installer (MSI).

hope this helps,
Norbert

[Edit] Mike's propably on the correct track: i was thinking of distribution if you already use MAX tasks in your LV application. If you have problems using MAX tasks in your LV application, follow Mikes suggestion 😉


Message Edited by Norbert B on 06-17-2008 10:06 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 10
(3,948 Views)
The problem is that some machines have the tasks prodefined and others do not. I would like to have them as files in my labview project, but there are too many to recreate from scratch. There should be some way to transfer them from MAX to labview.
0 Kudos
Message 4 of 10
(3,946 Views)
You can export DAQmx settings (and some others) using the export function of MAX. This will create an *.nce-file. You can add this file to your project.
But this will not work out like you want to have it, i suspect, since you have to make a manual import on every system which should use this config.

For all methods stated above: You always should check the settings in MAX after installation/import!

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 10
(3,942 Views)
Perhaps this might be able to be added in the future. The tasks created in labview look identical to those created in MAX so I don't know why they cannot be copied from one to another.
0 Kudos
Message 6 of 10
(3,935 Views)
You are correct that tasks created dynamically in LV looks like the ones predefined in MAX. That is, because you are using the same API.
But there is one important thing you have to keep in mind:
MAX is a global tool for a single PC. So you can predefine tasks there to use them in any ADEs NI support (LabVIEW, CVI, Measurement Studio, ...). You do not have to define them in every ADE on your own. This is possibly an advantage.
On the other hand, you have to transfer the definition from MAX if you want to change PC. If you had defined the tasks dynamically within each ADE (meaning: inside your applications every time and again), you would not have any problems except perharps of wrong device names......
So you see, every method has its own advantages. MAX is more flexible for a single PC (less work if used properly), but if using more than a single PC, you might want to define tasks always by yourself in the application. The later is done within all examples from NI....


Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 10
(3,930 Views)
True, but why can't they be copied from one to another once they are already created.
0 Kudos
Message 8 of 10
(3,924 Views)
Well, let me try to explain something, which can be really questionable 😉

Hence both methods use the same API, the DAQmx API, they have different "implementations". The LV API consist of LV VIs, of course, in the first instance. Of course, digging deep into them, you will encouder CLFNs to the DAQmx DLLs. But some of them are "hidden" because property nodes are in fact something similar to the DLL-calls......
In MAX, you never "see" the API, you are using the wizard. Nevertheless, MAX uses the internal functions contained within the wizard to use the device just as desired (hopefully 🙂 ) But it never will use the VIs to accomplish that...

Now there are imho two possibilities for you:
a) You start using the LV DAQ Assistent to create your tasks on the PC. It has the same appearence as the wizard in MAX, so you will not trade any used interface for a new one (which would be the API). When you finished the definition, the wizard can be transferred to LV code which can be altered. But if doing this, you will lose the possibility to alter the task using the "used API", the wizard.
b) You can live with the current situation but create a product suggestion for LV and DAQ at the Product Suggestion Center.

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 9 of 10
(3,918 Views)
Hi folks,

LabVIEW does provide a way to import and export MAX configurations: use the MAX Configuration palette in the Measurement I/O sub-palette [1]. Another palette to explore is the DAQmx Storage palette under Measurement I/O » DAQmx » DAQmx Advanced » System Setup. With those VIs, you can programmatically modify the tasks, channels, and scales in your MAX database.

[1] Import and Export a MAX Configuration Through LabVIEW
http://digital.ni.com/public.nsf/allkb/BBB5B94C038267DF8625723E00030559
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 10 of 10
(3,868 Views)