LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1097 when passing array from C++ DLL to LabView

Yeah, bad thinking. Fixed that, but still nothing ... I have reattached the files, cause some of the code of the function was commented, in the cpp file.

0 Kudos
Message 11 of 55
(3,842 Views)

 


@Drakones wrote:
            for(m=-w; m<= w; m++)
                for(n=-w; n<= w; n++) //parcurg fiecare pixel din fereastra de dimensiune w din jurul pixelului i,j
                    sum= sum + int(Image[imgWidth*((i+m)-1) + j+n]);


You really need to check array indexing. You loop from -w to +w and do not account for any borders that will require. The result is that you again end up with negative array indices!!! (and you also sum over line bounderies too, which is very unlikely to be what you want)

 

As to VI design itself, I've added a cleaned up version just for the fun of it.

 

Rolf Kalbermatter
My Blog
Message 12 of 55
(3,834 Views)

I was planning on fixing the border problem later, but I will get to it right now. Thanks a lot. I hope that this is the problem :D.

 

And thanks for the cleaning my diagram, looks pro'. 🙂

0 Kudos
Message 13 of 55
(3,827 Views)

Yeap, that was my problem. Everything works fine now. For now, I've put the initial value of the indexes (w+1). I will think for a better sollution, maybe without cropping the arrays borders.

 

Thanks a lot, Rolf !

0 Kudos
Message 14 of 55
(3,825 Views)

Hi, Rolf,

 

I'm trying to use LabView to read gUSBamp data.

 

But it is throwing an error saying DNOT USE STR# 0 !!! [Thanks, from Akash B and Stephen M] in gUSBamp_Custom.vi:1

 

with error number 1097. Any idea how to debug?

 

thank you,

0 Kudos
Message 15 of 55
(3,689 Views)

 


@sfdsstgsdfa wrote:

Hi, Rolf,

 

I'm trying to use LabView to read gUSBamp data.

 

But it is throwing an error saying DNOT USE STR# 0 !!! [Thanks, from Akash B and Stephen M] in gUSBamp_Custom.vi:1

 

with error number 1097. Any idea how to debug?

 

thank you,


I'm sorry, but this information is to limited to give any useful feedback. I don't know gUSBamp, and in order to access their manual one needs a login it seems. The error message you mention seems to be a message by the programmer of the software driver and does probably not have any significant meaning to anyone other than him.

 

Error 1097 is a generic LabVIEW error meaning the DLL has done something wrong and most likely corrupted some memory. Why, what and how is not easily determined just from this error code only.

Rolf Kalbermatter
My Blog
0 Kudos
Message 16 of 55
(3,682 Views)

Hey Rolfk,

Sorry to bother you again with some error 1097, but I can't seem to figure out this one by myself.  We bought a Mightex Spectrometer (HHR-Series) that came with an example of a Labview code.  The 1097 error pops up within a minute of running, sometimes a few seconds after we start running the application, and at other times near the end of the minute, since we added a USB camera (although there is no wires connecting the two whatsoever).

 

We do not have the C++ code that the company used to write the sub-VI's that are used in our program.  Do you have any idea how to resolve this instability?

** I have added some portion of the block diagram, which includes the CLF node that gives me the error (because of the Moveblock function).  The USB-camera portion of this VI is in the second attachment.

 

Please let me know if there is anything else I should add in order to help you guys help me out =).

 

Thanks in advance! 

Download All
0 Kudos
Message 17 of 55
(3,592 Views)

Ourspolaire wrote:

Please let me know if there is anything else I should add in order to help you guys help me out =).


It would help a lot for you to post your code, not just a screenshot, so we can see which functions you are calling in the Call Library Function nodes and how they are configured.  It is also important to attach documentation for the function, example C code, and the header (.h) file that comes with the library.  There's nothing we can do with your screenshots - no indication of what functions you're calling and how you're calling them, nor which function call generates the error.

0 Kudos
Message 18 of 55
(3,579 Views)

Hey Ourspolaire,

 

I am trying to understand your issue a little better.   Did the sample application work before you added the USB camera and now no longer works after you added that camera?  Does the application work without the loop in it doing the camera control?  Do you know what version of LabVIEW the sample application was built in?  If it was built in LabVIEW 2009 and you are trying to use it in LabVIEW 2010 then this knowledge base article may be useful: http://digital.ni.com/public.nsf/allkb/D84C9775ABD921CF8625772A005CA50C?OpenDocument

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 19 of 55
(3,534 Views)

Hey,

 

Not sure if this is useful to anyone, but I have been getting a message similiar to this (although with error 1100).  It seems to happen when I try to open a reference to a queue that has been closed elsewhere.

 

 

Error 1100 occurred at DO NOT USE STR# 0 !!! [Thanks, from Akash B and Stephen M] in Sampling_Lib.lvlib:Sampling_FPGAMainPulsed.vi

Possible reason(s):

LabVIEW:  No object of that name was found. No reference could be returned.

 

 

 

0 Kudos
Message 20 of 55
(3,243 Views)