Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2147

problems communicating using 845x .dll in vb.net

$
0
0

I am trying to use the .dll supplied with the 8451 to communicate via SPI, and I have most things (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

 

It fails at step 5.  In addition to changing how the variables are called, I switched steps 2 and 3 to no avail as well.  I also pass the configuration handle as a 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 2147

Trending Articles



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