LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to run a NIMax macro?

Solved!
Go to solution

i deploy instruments running labview with NIMax controlling cameras at remote locations without good phone or internet access. Folks with varying training setup the systems. Sometimes they have difficulty following basic instructions for NIMAX. I would like to set a macro for NIMAX to execute maybe 6 instructions. Is that possible within NIMAX or do I need to involve another app?

0 Kudos
Message 1 of 4
(1,039 Views)

It depends on what you want to do with NI MAX.  A lot of what you might do in NI MAX can be done with LabVIEW code using NI DAQmx.

 

For example, I wrote a routine that uses an NI USB-6009 unit to take some data.  I want the user to just plug it into a PC and go (waiting a few seconds for the PC to find it -- it does need to have the appropriate LabVIEW drivers installed, of course).  I don't want to know where the device shows up as "Dev1" or "Dev42".  Furthermore, I've put this USB-6009 inside another box where it is connected to other components, so I want to not only use a USB-6009, I want to use the specific USB-6009 that's inside my box.

 

The User never touches MAX.  My code uses a DAQmx System property node to get a list of all Device Names.  In a For Loop, I use a DAQmx Device property node to get the Device Type (which has to be USB-6009) and Device Serial Number (which has to match that of the USB-6009 inside my box).  If I find a match, I export the Device and set a Boolean Valid Device output (True), otherwise Valid Device is False.

 

Once I've found my Device, I can use DAQmx functions and Property Nodes to further configure it as I need without ever using MAX.

 

Bob Schor

0 Kudos
Message 2 of 4
(1,013 Views)

a bit more background. i use NIMAX for camera alignment and light gain. then there is an extensive labview app that parallel processes images, to products, to web-browser.. really like using easy features of NIMAX for setup - lazy and don't really want to write an app to replace that user interface.... especially because NIMAX ensures camera and PC are functioning as planned. hence my desire to do some automation with a macro and NIMAX. other suggestion are welcome, because i often am unaware of simple solutions. cheers

0 Kudos
Message 3 of 4
(1,004 Views)
Solution
Accepted by topic author larry2
10-16-2016 10:06 AM

Depending on what your "6 instructions" are,there may be some simple LabVIEW code we can use to perform the same functionality. There's not any direct way to automate the selection of settings within MAX, but we can do things like write camera parameters, grab an image to align the camera, etc from LabVIEW.

 

Best,

 

Daniel V.

Applications Engineer

Message 4 of 4
(943 Views)