LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Publishing the instrument configuration?

Firstly, excuse my ignorance - I'm still pretty new...
I have an instrument, which is actually a camera but for the sake of argument could be anything. This camera has an internal configuration, called "attributes" in LV I think.
My first point of confusion came when I tried adjusting the config in the camera using it's native software - the configuration under LV had not changed!
I soon discovered that to adjust the configuration seen by LV, I had to use MAX to set up my camera - so it seems the NI approach is to have some hidden configuration data somewhere for my instrument, that is managed by MAX.
 
This is all fine (now I'm aware of it) while I'm using the instrument under development, but what happens when I want to deploy the LV application as an executable to a machine which does not have LabVIEW or MAX installed?
 
How to I deploy the configuration for the instrument? ie. When my program accesses the instrument (camera) how will it use the settings configured by MAX on any machine? Is it somehow built into, or associated with the application?
 
My application will programmatically alter the configuration (camera exposure), and can it do this without MAX installed - I ask because the only info I've been able to find suggests a MAX-API, which may not be very useful for depolyed software with no MAX.
 
I'd just like to understand the mechanism by which this config works, both in a development and a deployed situation. I have scoured through the various help files, knowledge base, etc but  assume I don't have the right terminology as I haven't found much - most of it's just "use MAX".
Any help appreciated
 
regards,
Lamb
0 Kudos
Message 1 of 8
(3,474 Views)
I'm assuming that you will want to deploy an executable. When you do this, you create an installer. There are options in the installer to include or not include MAX and to include or not include the hardware configuration from MAX. I think you can include the hardware config without installing MAX but for the hardware I use, I always choose to install MAX. It's a nice place to check if the hardware is actually working if there is a problem with the program.
Message 2 of 8
(3,463 Views)
Ahh, so thats how the publish works. Is there any way to know where the hardware config lives? I assume it's a binary file that can't actually be viewed without MAX.
 
Just out of curiosity, what happens if you choose not to include the hardware config when you package the executable ?? Is this generally reserved for cases where no special config is required, or maybe in the case of my camera it would then use the config in the instrument and I could program it "the hard way".
(did I just answer my own question?)
 
thanks for the reply!
0 Kudos
Message 3 of 8
(3,460 Views)
Just out of curiosity, what happens if you choose not to include the hardware config when you package the executable ??

Then you'd likely end up with errors.  Or your camera might operate with a default configuration.

It is also possible to do all your configuration programmatically in LabVIEW.  It can be a little tricky finding all the relevant property nodes.  But many developers prefer to write their programs this way.

Most of my development is for a single, one-off machine.  So I prefer to install MAX on the target PC.  This allows me to easily "tweak" things even after I've completed my code.  Depending on your intended target, this may or may not be desirable.

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 8
(3,444 Views)

I'd just like to understand the mechanism by which this config works, both in a development and a deployed situation...Is there any way to know where the hardware config lives? I assume it's a binary file that can't actually be viewed without MAX.

Hi Lamb,

Great info and suggestions from Dennis and Patrick.  Here are some additional details on how MAX works.  MAX is divided into a front-end GUI (nimax.exe) and a back-end database service (nimxs.exe). The front and back ends communicate with each other either through TCP sockets or shared memory, depending on what version of MAX is installed.  The MAX database service is called MXSSVR.

The database file is called config3.mxs.  MAX maintains two copies of this database.  The primary database is found in C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Data\ (XP and 2000).  The backup database is found in  C:\Documents and Settings\All Users\Application Data\National Instruments\MAX\Data Dictionaries\Last (XP and 2000).

The MAX configuration is a subset of the MAX database.  You can take a look at the type of data in the MAX configuration file by selecting File >> Export >> change file type to NI-DAQmx UTF-16 Tab Deliminted File (.txt) in MAX to export the MAX configuration file.  This configuration file contains information on NI-DAQmx Global Virtual Channels, NI-DAQmx Tasks, NI-DAQmx Devices, NI-DAQmx Scales, Serial, VISA, and other things depending on the installed components.  This information is required by the target system if the hardware, channels, tasks or scales were not configured in the executable and the executable uses these elements.

As Patrick mentioned, it is often possible to configure device settings programmatically.  This can sometimes come in handy if there are size constraints on the executable or installer.  However, as Dennis mentioned, by including the LabVIEW Run-Time Engine, Measurement and Automation Explorer, device drivers and the device configuration with the installer, you equip the target system with powerful debugging tools and eliminate many variables from the debugging process.  I hope this helps.


Message Edited by Pie56694 on 07-23-2008 02:01 PM
Message 5 of 8
(3,426 Views)
Yeah - thanks for the info guys. I think I'm now "full bottle" on how the hardware config works.
0 Kudos
Message 6 of 8
(3,406 Views)
Hi Steve,

Thanks for the info on MAX configuration and database locations.  It explains what I saw recently when I had a PC reboot due to an unrelated issue right in the middle of installing drivers.  

MAX itself started up fine.  But it could not connect to its database.  Probably due to it being corrupted when things suddenly shut off in the middle of an install.  (I read somewhere that computers don't like that sort of thing)  

It's always interesting to get a better idea of what's going on under the hood. 
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 7 of 8
(3,391 Views)
Hi Patrick,

I second your suspicion.

"MAX Database corruptions are rare, but may be caused when a system reboots without being properly shut down due to a power loss or a system crash."  From KnowledgeBase 4GA9TOQA.

Thanks for you work on the forums Smiley Wink
0 Kudos
Message 8 of 8
(3,378 Views)