12-08-2009 06:41 AM
Heey y`all, im working with labview 8.2 and a Spider8 (data-acquisition). I use some labview vi`s which I have gotten from HBM (producer of the Spider8) to communicate with the Spider8. These labview files only have a library function node, this library function nodes makes a call to a driver from the spider8. This driver is called Spider32.dll and is located in "windows/system".
My problem is that sometimes while using the spider8 with labview I get a rather strange error, this error is in the appendix. When I get this error my program stops immediately (like pressing on the abort button), after this i can`t restart the program because everytime i try to restart it I get the same error again. The only option I have is to restart the computer/laptop, after that I can use the program again and the error is gone. This error doesn`t come everytime I use the program, just every now and then but its very annoying and has to be solved.
Hope some labview-experts can help me with this:)
Thanks,
12-08-2009 07:34 AM
This happens sometimes when calling DLLs in "older" LabVIEW versions.
As a first step I would pre-allocate strings and arrays you get from the dll, using initialize array or a string with the awaiting length.
Christian
12-08-2009 07:36 AM
Have you contacted the vendor? It sounds like their dll might be trouncing on LabVIEW's memory allocation.
Are you passing back/forth any large arrays that might cause a memory issue? If so, you might try retrieving the data in smaller increments to see if that helps.
12-08-2009 08:14 AM - edited 12-08-2009 08:16 AM
both of you thanks for your reply, you are both right, the original labview file ACQread.vi (which calls the dll) is in labview 4.0 😞 i just converted it to 8.2 so i could use it. In the appendix of this post there is a library file which is in labview 4.0. In this library there is the ACQread.vi, if you take a look at it you can see that I am retrieving a large array of this dll. The array size depends on the number of channels I use and the number of values it measures per channel per loop.
Could this simply be solved by increasing the input value of initilize array function? For example: normally the array`s size is:
4 (channels) * 25 (values per channel) = 100 values per loop. Then i just multiply the 100 by 2 so i get 200 values per loop? could it be solved like this?
Thank you both! 🙂
12-08-2009 09:00 AM
In general you have to allocate the amount of memory you get back from the DLL, so your guess could work.
But since this driver is for LV 4.0 I would contact HPM and ask if there is a newer version available.
Christian