01-26-2006 05:11 AM
01-30-2006 07:17 AM
HI Ray,
I assume that you're refering to the .fp file when you're talking about setting the input control's data type?
If so, then from the cvi 7.1 (I don't have 6.0 installed here but the principle should still hold if my memory is correct) help file under Instrument Driver Fundamentals : Data Types
You must specify a data type for each parameter in each instrument driver function. All data types the instrument driver uses must be intrinsic C data types or data types that you define in the .h file and list in the .fp file. Specify the data type of a parameter when you create its corresponding control on a function panel. This data type also must be consistent with the function prototypes in the instrument driver header file.
LabWindows/CVI uses the data type information to implement the variable declaration and run-time checking capabilities when users operate function panels. When you declare a variable from a function panel, LabWindows/CVI presents options based on the data type you specify for the function panel control. When you run a function from a function panel, LabWindows/CVI verifies that the data type of the value you enter in the control matches the prototype of the function.
Data types are divided into three classes: predefined data types, user-defined data types, and VISA data types.
For example, again from the cvi 7.1 help file
Complete the following steps to create a user-defined data type for use in a function panel.
Now you can select the waveform_var data type when you create function panel controls for this instrument driver. Also, users can interactively declare a variable of waveform_var data type from any function panel control that you define as waveform_var.
Hope that helps
If the options aren't there in cvi 6, then please let me know, and I'll get it installed to try it out.
Thanks
Sacha Emery
National Instruments (UK)
02-01-2006 09:22 AM
Sacha,
Thanks for the help.
I am using CVI 6.0 and your notes were a great help.
All sorted.
Regards
Ray Farmer