Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Ivi_AddAttributeVixxx vs Ivi_AddRepeatedAttributeVixxx

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??

0 Kudos
Message 1 of 4
(3,231 Views)

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?

http://forums.ni.com/t5/LabWindows-CVI/IVI-VAL-MULTI-CHANNEL-vs-quot-Repeated-quot-checkbox/m-p/1791...

Thanks.

 

Best regards,

 

Hossein

0 Kudos
Message 2 of 4
(3,216 Views)

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...Smiley Wink

0 Kudos
Message 3 of 4
(3,214 Views)

Hi,

It's OK and you can contact us any time here.

The difference is in their data type and I foun info below.

Creating and Declaring Attributes

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

0 Kudos
Message 4 of 4
(3,211 Views)