Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 2010

issues using SPI write and read with ni845x.dll in visual studio 2010

$
0
0

Reposting this in the software section:

I am trying to use the .dll supplied with the 8451 to communicate via SPI, and I have most functions (seemingly) working.  When I try to send a message, however, I get an error (-301710 - invalid configuration reference).  Some of the documentation for the dll is... lacking, but I tried passing the configuration handle by reference and value, both giving the same error. 

 

My code flow is as follows:

1. Find device with ni845xFindDevice

2. Open device with ni845xOpen

3. Open device configuration with ni845xSpiConfigurationOpen

4. Set all configuration parameters with their functions

5. Attempt to write data with ni845xSpiWriteRead

6. Close configuration with ni845xSpiConfigurationClose

 

It fails at step 5.  I've tried the method of passing variables, swtiched steps 2 and 3, switched steps 5 and 6, all to no avail. As a side note, I pass the configuration handle (by reference) to a subfunction that performs all of parts 3 and 4.  I am storing the device handles as ULong (which I grabbed from the .h file that was included) and this works for the other functions that require handles. 

 

Does anyone have advice on what to try next?


Viewing all articles
Browse latest Browse all 2010

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>