11-29-2011 07:55 AM
I'm creating an IviScope driver for our PXI digitizers in LabWindows/CVI.
When editing specific driver attributes, i see this form:
For an attribute that has a separate value for each channel, I can check the "Repeated" checkbox and specify "Channel" as Repeated Capability, but I can also set the "IVI_VAL_MULTI_CHANNEL" flag.
I found out that, when checking the "Repeated" checkbox, LabWindows adds the "Ivi_AddRepeatedAttributeVixxx" to the code, where otherwise it adds Ivi_AddAttributeVixxx". But I don't see what the main difference is.
So my question is:
What's the difference between using Ivi_AddAttributeVixxx with the IVI_VAL_MULTI_CHANNEL flag set and using Ivi_AddRepeatedAttributeVixxx??
12-07-2011 04:46 AM
Hallo,
I found out that if you search in " NI LabWindows/CVI help" yo can find all information about these two functions. You just need to search Ivi_AddRepeatedAttribute and Ivi_AddAttribute and find the related information.
I hope that you can go further.
Besides I found another forum which is exactly the same as this one from you. Would you please put your question in one forum to prevent duplicate search and answer from us?
Thanks.
Best regards,
Hossein
12-07-2011 05:03 AM
Hi Hossein,
Yes, I'm sorry for posting in that other forum. I'm new here, and I later found out that this forum is better suited for my question than the LabWindows/CVI forum.
I know the LabWindows/CVI help is extensive, and I read it, but I can't make up what the main difference between these methods is. The way I now see it is that Ivi_AddRepeatedAttributeVixxx is just a shorter way for calling Ivi_AddAttributeVixxx with the IVI_VAL_MULTI_CHANNEL flag set. But I can't imagine that's correct; there must be more to say about this subject...
12-07-2011 05:36 AM
Hi,
It's OK and you can contact us any time here.
The difference is in their data type and I foun info below.
An instrument driver creates the specific and class attributes it uses by calling the Ivi_AddAttribute or Ivi_AddRepeatedAttribute functions. The IVI Engine provides specializations of these functions for each of the supported attribute data types such as Ivi_AddAttributeViInt32 and Ivi_AddRepeatedAttributeViBoolean. In the source file for the driver, the driver must declare constant names for all the hidden attributes.
I hope that you can get an idea about them.
Regards,
Hossein