LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-USB-8451 Fails after passing a bunch of times

Solved!
Go to solution

Hello, I'm using a NI-USB-8451 to communicate with a board using SPI (8451 scripting).  NI-USB is the master and all ICs (EEPROM, DAC and ADC) on the board are slaves.   If I run my ATP in a loop 10 times the 8451 will fail at the same point on the 8th time the test is run. When the problem occurs all SPI tests after that point will fail and the 9th and 10th test runs will fail SPI entirely.  If I remove the USB cable connected to the 8451 and re-connect it works properly again.  If I run my loop again it will fail at the same point.  It seems to me that there is some sort of overflow problem here.  I tried adding a Script Reset prior to building any scripts but it does not seem to work.  I'm using CVI 8.1 to create DLL that is referenced by TestStand 4.0.  

 

 

 Any help will be appreciated.

 

Nazar 

JGB Consulting, Inc.

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

Hey Nazar,

 

Can you provide a little more info on your application? What error code, if any, are you receiving? What are you trying to write or read from the device? Can you take a NI-Spy capture of this communication chain?

 

Thank you,

Ryan

National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(3,905 Views)
Hello Ryan, Thanks for getting back to me. I'm currently talking to telephone support to address this problem. As stated in my original post i was using a CVI program that was being executed via TestStand. Since then I've isolated the program to only run in CVI, leaving Teststand out of the picture. I'm also using a very simple SPI sript to simply do 1 read/write to an ADC on my board. If I run this program the USB-8451 will fail every single time on the 500th measurement with the error code -301700 "Insuffucient memory for this operation". If I close my appl and restart it, It will mail again on the 500th measurement exactly. After talking with my app engineer and trying all sorts of things he determined that the problem is within the NI-USB-8451 and has passed this problem to R&D.
0 Kudos
Message 3 of 4
(3,890 Views)
Solution
Accepted by topic author Nazar
As it turn out it was a programming error on my part and not a problem with the NI-USB-8451 device.   I was building SPI scripts using CVI,  two of my scripts did not contain a CloseDevice call.  This is what caused the error.  Adding the CloseDevice to these scripts fixed everything.
0 Kudos
Message 4 of 4
(3,881 Views)