iyeager Posted February 27, 2011 Report Share Posted February 27, 2011 (edited) Hi all, I've been tasked with developing some acquisition programming to apply to a fleet of suitcases that our company will be using to go to our customers sites and acquire some flow, pressure, and temperature readings. I've got the program done and am happy with the results, but I'm stumped on one thing. I'd like to write only one executable for our ten to fifeteen suitcases. However, how do I write it as such that when it's installed on the computer in suitcase.01 that it recognizes cDAQ.01 and when it's installed in suitcase.15 that it recognizes cDAQ.15. I'd also like to be able to, for example, take the computer out of suitcase.01 and replace it with the computer out of suitcase.15 (if, for example, the computer in suitcase.01 went on the fritz) or vice versa for the cDAQ. Replace one for the other, and still have the program know what's in the case and how to use it. I thought of similarly naming all of them, but I'd like to keep the computers, daqs, and sensor packages serialized for calibration purposes. I've attached the .vi and the sub.vi that I have in there. If anyone could help, that'd be great. Thanks, -Ian P.S. I'm using cDAQ 9174's with a NI9203 current input module in them. The sensor package is two RTD's with 4-20mA signal convertors, a 0-15psia and a 0-30psig transducer with 4-20mA outputs, and two 0-10" W.C. differential pressure transducers with 4-20mA outputs connected to two inline averaging pitot tubes for flow. The PC's will be Acer netbooks running XP. SuitcaseTopLevel.vi Flow Formula - Dwyer Averaging Pitot.vi Edited February 27, 2011 by iyeager Quote Link to comment
jgcode Posted February 27, 2011 Report Share Posted February 27, 2011 Hi iyeager I haven't looked at your code - but it sounds crazy if you are having to make 15 different apps of the same thing! Changes in names, settings etc... should be handled using configuration files (or the like). In this case you could even look at the features of MAX and whether they may help too. This way you only have to build one app and you can easily switch hardware around simply but just importing/exporting a new configuration. Cheers -JG Quote Link to comment
ShaunR Posted February 27, 2011 Report Share Posted February 27, 2011 Use the same name (in the tasks/channel/hardware configuration) or all the DAQ devices (say cDAQ). In your results file also save the DAQ devices serial number (you can read this using a property node shown below) and the computers ID (anything that identifies a unique computer - computer name, network card, IP address, HD serial etc). This way the executable will run on any suitcase, with any PC/DAQ (as long as they are all the same) but will save data that is traceable to a particular suitcase PC and/or a particular cDAQ. Quote Link to comment
crelf Posted February 28, 2011 Report Share Posted February 28, 2011 You can also set DAQmx channel names, and even apply configurations to MAX at runtime (look at loading nce files). Quote Link to comment
iyeager Posted February 28, 2011 Author Report Share Posted February 28, 2011 You can also set DAQmx channel names, and even apply configurations to MAX at runtime (look at loading nce files). Looked at the config file port in the installer but hadn't played with it yet. So in this case, I could have the installer set up the cDAQ in MAX and configure the names of the cDAQ and the module to use? Then just use the serial number and a unique PC identifier in the file name to track usage as Shaun mentioned? Or is there something I'm missing here? Or something even easier or slicker? -Ian Quote Link to comment
ShaunR Posted February 28, 2011 Report Share Posted February 28, 2011 (edited) Looked at the config file port in the installer but hadn't played with it yet. So in this case, I could have the installer set up the cDAQ in MAX and configure the names of the cDAQ and the module to use? Then just use the serial number and a unique PC identifier in the file name to track usage as Shaun mentioned? Or is there something I'm missing here? Or something even easier or slicker? -Ian Depends on which way you are looking at it......... Set it up once in MAX (make sure it all works). Export an nce file. Add it you your project. and set it in the installer. Once you build your installer you will only need to put it on a CD or USB stick or whatever and install it on any machine So effectively you use MAX to create your hardware "template" and then roll that out with the installer which will take care of configuring the target machines hardware. Your software will always use the same taks/channels regardless of which machine it is on and, as long as you put the C ID and DEV ID somewhere (file name is good if you just want to see at a glance in xplorer without opening files), you'll be able to track the results to the hardware. I would suggest also adding the date to the file name (e.g 2001-01-21) in that order then when you view the results you can sort them in explorer. Additionally, you can set the file date as a directory name and store your results by date making it easy to identify what was tested on which days. But it's just personal preference (one directory with lots of files or a few directories with a few files) Edited February 28, 2011 by ShaunR Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.