06-25-2018 09:17 AM
Hi Guys,
I am really new to Labview.
I am strugling to configure the VI as shown in the uploaded pics.
I am basically trying to access the DLL library with Call library fucntion.
the calling function is
int16_t WriteFPGARegsC(int16_t *USBdev, int32_t *DUTSelect, int32_t *Array_RegsIn, int32_t *Array_RegsOut, int32_t *Array_RegEnable);
Array_RegEnable is supossed to be initialised with an array of 255.
while Array_RegsOut and Array_RegsIn are output or indicators of array of 255.
I am getting error code 12 with message 'Call Library Function Node in Test.vi' when i execute the test.vi
Please give me some advice to solve this issue.
Thanks & regards,
Kushal
Solved! Go to Solution.
06-25-2018 10:00 AM
It would help if you did a File->Save for Previous and save it at least 2 versions back. Then more people could look at the VI. Debugging Call Library Node issues from a picture is pretty useless.
06-25-2018 10:12 AM
Hi,
Sorry..
But i have uploaded the VI as well!!
06-25-2018 10:17 AM
Yes but in version 2018 which I do not have installed on this machine for a number of reasons.
06-25-2018 10:24 AM
Hi again,
This VI is from 2017 64 bit version.
I have uploaded ver 15 and 16 now.
06-25-2018 04:55 PM
Well, the Call Library configuration seems ok as far as I can get from the little information to this DLL online. The documentation states that the return value should be 0 if successful, -1 if no device is open and -9 or -10 if the USB endpoint could not be accessed. Nowhere does it say anything about a return code of 12 (or maybe -12). So it is hard to debug this with that little documentation.
06-26-2018 02:28 AM
Hi Rolf,
Thanks for your input!
Return value gives exactly zero if you look at the frontpanel carefully.
The error code which this VI receives is for this specific block--> call function library node.
The error code is with regards to Labview and can be found in the following link:
http://zone.ni.com/reference/en-XX/help/371361M-01/lverror/misc_lv_error_codes/
It says that 'Some system capacity necessary for operation is not enabled'
I also check how to resolve it in this link https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kGXrSAM
By giving correct path to my dynamic link library.
But i think i have not made any mistake with it!!
I think i am getting this error code because the dll is 32-bit and i am using it over 64 bit Labview program. Correct me if i am wrong!
On other hand, when i run this VI on 32 bit program ......the Labview program crashes after i receive an access violation window which i have uploaded as a snapshot.
regards,
Kushal
06-26-2018 04:06 AM
I see. It wasn't really clear to me where that error 12 would come from, but it makes sense. A 64 bit process can not load a 32 bit DLL.
As to why it crashes when you run the VI in 32 bit LabVIEW, there are a number of possible reasons.
1) Unlike in the very sparse documentation that can be found on the web for this DLL, the three arrays that need to be passed to the function are not anymore required to be 255 elements but more. As soon as the DLL then tries to fill in the output array it writes over the end of the allocated buffer and crashes.
2) The DLL has secondary DLL dependencies that it loads dynamically without making sure that they are there before attempting to access them.
3) Another bug in the DLL.
06-26-2018 04:57 AM - edited 06-26-2018 04:59 AM
Hi Rolf,
As you said earlier, the configuration looks good. You were right except i made a stupid mistake by writing the function name in the reserve part of the callback menu!!
Once I made it empty, it worked!!
Thanks again for guiding me!!
Regards,
Kushal