LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling MAX from VI

Hello All,

 

I'm updating a DAQ program and am moving to virtual channels and tasks to define the DAQI figure I'd let MAX do the heavy lifting for configuring these items.

 

Anywho, in my VI I list the available tasks and virtual channels available for referenceYou can select them and see a brief summary/description of what they areFrom the control you can select Browse... to add new tasks or channelsI'd like to add the capability to edit existing tasks or channelsAgain, I figure this is best done thru MAXSo I am looking for a way to invoke MAX from my VI and have it start in the task list or virtual channel listDoes anyone have suggestions on how to do this?

 

Cheers,

Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 1 of 5
(3,304 Views)

Reaper-

 

I have had a lot of good experiences in this area.  Have you used projects before?  If not try them out for this type of code solution.  You can define tasks, channels and scales from project explorer exactly as you can in MAX (same interfaces) but they then are saved in the project and can ship with your application as  *.aliases files.  This seems to be the same as transfering  a MAX configuration with the scope limited to the project so that other (outside the project's scope) MAX defined settings are not impacted. 

 

In short- interface with DAQmx attributes from LV Project explorer and you won't need to call MAX directly at all


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(3,295 Views)

If you're on Windows, MAX has a very tiny ActiveX interface. Meaning, it's not much. I haven't explored it much, but there's an example here. As far as I could tell, the ActiveX interface consists only of methods, and no properties.

 

If that doesn't do what you need, then an alternative you may wish to try is third-party automation tools. Some have ActiveX interfaces so you can call them from LabVIEW. I've used AutoIt successfully. 

 

 

EDIT: Wasn't seeing all the available classes.

Message Edited by smercurio_fc on 08-19-2009 09:37 AM
0 Kudos
Message 3 of 5
(3,294 Views)

Thanks Jeff,

 

I  am using a project definition for this app but have not explored creating tasks and channels within one.  I don't have the need to predefine any tasks or channels as they will be completely user determined and changing a lot.  Will this mechanism, via the project, allow the deployed app to modify existing channels ala the MAX dialog?

 

Cheers,

Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 4 of 5
(3,287 Views)


GReaper wrote:

Thanks Jeff,

 

I  am using a project definition for this app but have not explored creating tasks and channels within one.  I don't have the need to predefine any tasks or channels as they will be completely user determined and changing a lot.  Will this mechanism, via the project, allow the deployed app to modify existing channels ala the MAX dialog?

 

Cheers,

 

Nope,  this method only works from project explorer.

HOWEVER, as I am understanding, you want the user to be able to dynamically define tasks at run time. Correct?

 

If so, there are all the tools you need (except for a UI) on the DAQmx>Advanced> subpallates "System setup" and "DAQmx Constants & Property nodes".  The functions there will programatically define DAQmx objects and permit them to be created, saved, changed or deleted from the system (you can see the changes with MAX)


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 5
(3,270 Views)