06-27-2013 07:16 AM - edited 06-27-2013 07:19 AM
Hi,
I am trying to read CAN data using Diga CRUSB converter. There is no labview component available thus I am forced to access data using DLL.
The problems start at retrieving the information about the device.The function is as follows:
I tried using clusters like:
The problem is that each time I try running the program, Labview crushes because of memory problems or fpsane.cpp error (when saving the unfinished vi before running).
I am not sure whether the structure used is correct or if I am missing something important.
Please find the DLL and PDF under http://www.diga.biz.pl/zip/crusb_v1/CRUSB_DLL_1_5_0.zip.
Could you please help me with this problem?
07-01-2013 07:52 AM
Howdy!
I am not sure I have an answer but something to try would be to make your cluster of strings have dummy data in the strings. LabVIEW handles memory for you so as long as you stay in LabVIEW you do not need to worry about allocating memory. However, you are stepping outside of LabVIEW by calling into a DLL. Therefore you might need to preallocate memory for the strings. To do this, it might work if you created your strings with data in them to overwrite.
I have had some luck with this on arrays, but I have not done much with passings strings to DLLs, so this is mere conjecture on my part.
Good Luck,
Bob
07-02-2013 01:44 AM
Hello,
my first suggestion would be to change the configuration of the Call Library Function Node to "Run in UI Thread":
You can read more about it here, in the "Configuring for Multiple Thread Operation".
Let us know, if it helps.
BR,