Prev: GPIB instruments connected through Agilent USB/GPIB Interface canbee seen in MAX but can't communicate in labview
Next: Re : Re: Re : Re: Problem with TDMS in Matlab
From: RichLamb on 22 Jul 2008 22:40
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
From: Dennis Knutson on 23 Jul 2008 00:10
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.
From: RichLamb on 23 Jul 2008 00:40
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!
From: pallen on 23 Jul 2008 10:10
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.
From: Pie56694 on 23 Jul 2008 15:10
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