07-27-2007 10:35 AM
07-28-2007 02:46 AM
07-30-2007 02:35 AM
07-30-2007 03:06 AM - edited 07-30-2007 03:06 AM
I am from NI Instrument Driver development team. Regarding the guideline of developing instrument driver, you should first refer to http://www.ni.com/devzone/idnet/library/instrument_driver_guidelines.htm.
Regarding the question about setting and getting function of the instrument, my suggestion is:
1. according to the guidelines, we do not usually have the get setting function in the instrument driver as the P&P driver should be as simple as possible. We only have Configure(set) function. We assume that the instrument will return the error information if there is something wrong with the setting in the Configure function.
2. If the developer really want to add get setting function to the P&P driver, there are two options:
a) use Configure VI for set function and an another Query VI for get function. For example, a Configure Measurement VI and a Query Measurement VI.
b) add some indicators to the Configure VI. Each indicator is corresponding to one control of this Configure VI. You could add the get setting command to the Configure VI and the let the setting output to these indicators. If no error occurs, the value of the indicator should be the same as the input controls.
Regarding the USRs and global variables, there is a way to avoid the problem which will occur when ontrolling multiple instruments. Refer to the Block Diagram Structure of ...Program Files\National Instruments\LabVIEW 8.2\instr.lib\Agilent 34401\Private\Extended User Data.vi
Regards,
Liping Zhao
Message Edited by LipingZhao on 07-30-2007 03:08 AM