06-29-2007 11:33 AM
Labview: an exception occurred within the external code called by a library node function node. This might have corrupted labview's memory. Save any work to a new location and restart labview. VI "amol_getimage.vi" was stopped at node "" at a call to "MEPU- acquisition-getframe .vi"
can you please help me!
thanks
amol
06-29-2007 12:24 PM - edited 06-29-2007 12:24 PM
@amolchoudhary wrote:
hi,i am currently using the pixelink camera pl b741 f, however i am facing a problem when i use the "get frame dll" in labview.my program works when in highlight execution mode, however when i run it in normal mode i get the following message:
Labview: an exception occurred within the external code called by a library node function node. This might have corrupted labview's memory. Save any work to a new location and restart labview. VI "amol_getimage.vi" was stopped at node "" at a call to "MEPU- acquisition-getframe .vi"
can you please help me!
It's simple! You made an error in the configuration of your Call Library Node. It could be a number of reasons but the two most likely ones are that you get a variable wrong to be passed by Value while it should be by Reference or vice versa, or that you call the function which expects a buffer it can write in the results (the image frame is a likely candiate) and didn't create a large enough buffer in LabVIEW to be passed to the function.
I actually think this last one is by far the most likely reason here and in fact the number 1 error done by most people that try to interface to a DLL through the Call Library Node. DLLs come from the C world and want to be called like that and one important rule there is that memory buffers to be filled, must always be created by the caller. This is different in LabVIEW itself since LabVIEW manages all the memory for you and allocates it whenver necessary but this can't work for calling DLLs as LabVIEW has ABSOLUTELY no way to know what a DLL function might need as memory buffer.
You can create such a buffer by either executing the Initialize Array function with the correct parameters or in LabVIEW 8.2 you can directly configure array and string parameters in the Call Library Node configuration to create the necessary buffer. I prefer the Initialize Array variant since the other one is a LabVIEW 8.2 only feature and creates a fixed size buffer while for your frame buffer you will likely have to allocate a memory buffer whose minimum size depends on the bitmap format and bitmap size the function is going to return.
Rolf Kalbermatter
Message Edited by rolfk on 06-29-2007 07:27 PM
07-06-2007 04:11 AM
09-13-2007 09:39 AM
09-14-2007 10:39 AM
09-18-2007 03:35 AM
09-18-2007 01:28 PM - edited 09-18-2007 01:28 PM
Message Edited by Maclean on 09-18-2007 01:29 PM
09-19-2007 06:52 AM
09-19-2007 09:04 AM - edited 09-19-2007 09:04 AM
@nicobono wrote:
Tank you for the answer. Unfortunatly the VI Array to Image uses a 2D array, my array is 1D it does not work like that. Do you have another solution ? I send you a print sreen of my error and my VI's I got with the SDK.Thanks a lot.Nicolas
An image contains rows and columns. This can be flattened to a single 1D array which is what you have but in order for the IMAQ functions to know how to format the data it needs to know the height and width of the image. You can do this very simple by resizing your 1D array into a 2D array. All you need to do is simply get the actual width and height for your image somewhere from your pixellink software.
Rolf Kalbermatter
Message Edited by rolfk on 09-19-2007 04:05 PM
09-19-2007 05:22 PM