using the function FindLstn. I added it in LabWindows using the Options\Library\GPIB488.2 Lobrary\GPIB488.2 Functions\System Control. I cannot specify the addresses even if I include Decl-32.h. How do I specify the addresses and results to be returned?In LabWindows/CVI (all versions) you should use the function panels in the Library >> GPIB/GPIB 488.2 menu to insert NI-488.2 function calls into your CVI source code. If you do it in this manner, CVI will automatically inform you of the correct header file to put in for your function calls (it will be gpib.h, you should not use decl-32.h) and will automatically link in the object file needed to interact with the driver. Now, if you want to just include any arbitrary header file into a source file in CVI, you would do it just as in any other C compiler, put a #include statement with a resolvable path to the header file for the preprocessor to catch.
As far as the error you are getting, CVI is stating that you have tried to use a variable name that is not d
efined as a parameter to the function call. The FindListn function requires an array of short integers be passed in the Address List argument. Each index will contain a short integer whose lower byte is equal to the primary address of a device to look for and the upper byte its secondary address (normally 0). The last index in the array should be equal to -1.
The information given above can be found in the FindLstn function's function panel help, accessed by right-clicking on the gray area of the function panel or right-clicking on any one of the parameter controls to get specific information about each argument.
Jason F.
Applications Engineer
National Instruments
www.ni.com/ask