LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Ivi_BuildChannelTable() causes error 0xbffa6002

My understanding is that,  regarding Ivi_BuildChannelTable(),"If you call it again at a later point, it discards the old channel table and builds a new one." If so, then I should minimally be able repeat the Ivi_BuildChannelTable() call at the top of Prefix_IviInit().

 

When I try that (or other calls to Ivi_BuildChannelTable()) I get an error 0xbffa6002 (The repeated capability table cannot be built because it already exists). Commenting out the second call (or the first) makes the error disappear.

 

This is an IVI driver pretty much freshly minted from the IVI Driver Wizard.

 

Did I mention I'm a CVI newbie?

 

Thanx

0 Kudos
Message 1 of 5
(3,816 Views)

phrog,

 

This is a known issue with the Ivi_BuildChannelTable() function documentation. Contrary to what it says, this function cannot be called on the same repeated capability twice (for the same session). Doing so will return "The repeated capability table cannot be built because it already exists" error. This was reported to R&D (214558 CAR ID) for further investigation. Currently, you cannot call this function multiple times in a session.

Raj
National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(3,784 Views)

Raj,

 

Thanx for that answer.

 

I need to build my table at runtime after the driver has had a chance to "consult" with the device.

 

Moving the Ivi_BuildChannelTable() call to later doesn't work. (The call to Prefix_BuildAttributes() returns 0xBFFA6003: The repeated capability has not been defined yet.)

 

I could live with there being one entry in the table and and calling Ivi_AddToChannelTable() but if I call it after the Prefix_BuildAttributes() call I get error BFFA6000.

 

Can you suggest any other way to do it?

 

And from your response, it's not clear whether it's the function or the documentation might get fixed.

 

Thanx

 

 

 

 

 

 

0 Kudos
Message 3 of 5
(3,776 Views)

phrog,

 

I'm not quite sure I understand the sequence of things you are trying to do here. I'm not entirely familiar with the IVI_BuildChannelTable() functionality. What is the purpose of the Prefix_BuildAttributes() function. The only case where I have seen the BFFA6000 error was when there was a problem with the IVI Compliance Package, which was resolve when the compliance package was completely uninstalled and reinstalled. This might be worth trying out.

 

Also, The Corrective Action Request that I had mentioned earlier is to fix the documentation at this moment. I am not sure what R&D's plans are in addressing the functionality.

Raj
National Instruments
Applications Engineer
0 Kudos
Message 4 of 5
(3,738 Views)

Greetings,

 

The canonical form (ie as generated by the wizard) of Prefix_IviInit() is (after simplification):

 

Ivi_BuildChannelTable();

Prefix_InitAttributes(); //(I had this function name wrong in my previous post)

(Initiate the VISA session)

Prefix_DefaultInstrSetup();

 

After going through Prefix_InitAttributes() I discovered that once an attribute is added with it's IVI_VAL_MULTI_CHANNEL flag set, neither Ivi_BuildChannelTable() nor Ivi_AddToChannelTable() can be successfully called.

 

From what I perceived, it looks like the intention of the driver is to not interact with the instrument until Prefix_DefaultInstrSetup().

 

After experimenting a bit, it appears that there's no harm caused by initiating the VISA session and interacting with the instrument before the calls to Ivi_BuildChannelTable() and Prefix_InitAttributes(). While it may not be according to the architecture of the driver, it seems to be a viable work-a-round for me.  

 

Thanx

0 Kudos
Message 5 of 5
(3,721 Views)