PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PpiEnableInterrupts returns "Invalid Length Specified" error

Solved!
Go to solution

I am working with the NI's IVI VISA PXI Plug-In (defined by IVI-6.3). Almost all of its functionality is working perfectly - like module listing, getting attributes and memory space accesses, etc... The only problem I got is related to interrupts. The "PpiEnableInterrupts(__in PpiHandle handle, __in ViUInt16 queueLength)" function returns error code 0xbfff0083 "Invalid Length Specified". I tried with various queueLength values... or actually I made a sweep from 0 to 1024... in every case the same error status is returned.


The hardware I work with is the following:
* Chassis: NI PXIe-1071
* System module: Ni PXIe-8360
* Module that I work with using the plug-in: NI PXI-6509 (DIO)

Software versions:
* NI VISA: 5.4
* NI PXI Platform Services: 4.0
* NI's IVI VISA PXI Plug-In (NiViPpiP.dll & NiViPpiD.dll): 5.4.0.49152

I know that PXI-6509 does generate interrupts... 

Any ideas why PpiEnableInterrupts does not work? Maybe its because the module is PXI and not PXIe?

 

0 Kudos
Message 1 of 4
(5,526 Views)
Solution
Accepted by topic author bartek-o

Dear bartek-o,

 

I have searched our resources to see if we have a better explanation for that error. What I found is that it is mostly caused by the misconfiguration of the interrupt functionality.
Please see this document: http://www.ni.com/white-paper/3142/en/

 

There is a section which says:
Tip: If you are writing an instrument driver, leave Generates interrupts unchecked during the initial stage of development, even if you plan to implement interrupts. It is often helpful to get the basic driver functionality working before attempting to add interrupt support. Interrupt handling can be added to the .INF file by running the VISA Driver Development Wizard again.

 

I would suggest that you open up VISA Driver Development Wizard and re-configure the Generates interrupts part. It is possible that it is not properly configured / and / or not enabled at all.

Please get back to me if you could try this out!

Best regards,

Peter

Peter L.
National Instruments Hungary
Applications Engineer
Message 2 of 4
(5,509 Views)

I got it thanks! Status = VI_SUCCESS.

 

As you wrote, I had to create custom INF file with the Wizard, manually configuring the interrupt handling. Previously I was using the PXI-6509 driver as provided by the vendor (NI). The error message I was receiving was very misleading and I did not even think of exchanging the original INF with manually generated. Now it's clear to me that the interrupts were just not configured at all in the original INF. I haven't tested anything beyond PpiEnableInterrupts() yet, but I am pretty convinced it will all work now.

0 Kudos
Message 3 of 4
(5,506 Views)

I am glad you could make this work! 

Please if you can, mark the answer as a solution for your question, so others would always know where to look for the right answer!

 

Peter

Peter L.
National Instruments Hungary
Applications Engineer
0 Kudos
Message 4 of 4
(5,503 Views)