LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

invalid access to memory location

Hello, I'm relatively new to LabVIEW, and I'm stuck on a problem that I just can't make sense out of.  I wrote some vi's on a development computer that make use of a DLL written as a device driver by ocean optics.  I got everything more-or-less working on the development machine, and then went to move my application to the machine where it would be used.  Now, when I try to open up any vi which calls the DLL I get "Invalid access to memory location".  I've tried reinstalling the software that creates the DLL, I've tried cleaning out the registry, and I've made sure that my vi's still work on the development machine.  I've even tried re-copying the DLL directly from the dev machine.  I'm at a total loss and would appreciate any help you can offer.  Thanks,
-Eric

Machine that I need things to work on:
LabVIEW 8/8.2 (I've tried both)
Dell Latitude D600
Pentium M 1.6GHz
512MB RAM
Windows XP Pro SR 2 (updated through 7/12)
.NET 2.0/3.0


Dev machine:
LabVIEW 8
System Max
Pentium D 3.4 GHz
2GB RAM
Windows XP PRO SR 2 (updated through 7/13)
.NET 2.0/3.0
0 Kudos
Message 1 of 18
(9,807 Views)
Is the DLL in the exact same path as was on the development machine?
Have you tried opening a new VI and dropping in a Call Library Function and configuring it using the DLL?
Can you post one of the failing VI's and the DLL?
0 Kudos
Message 2 of 18
(9,794 Views)
Bill,

Yes, I have made sure that the dll is in the same location, and I have tried both reconfiguring the object to the same dll as well as creating a new one.  Either way I still get the same error.  I've attached the dll, and the libraries containing the vi's that contain the vi's that access the dll.  One example would be in OOILVD32.llb/set configuration.vi and another would be OOILVD32.llb/Spectral Acquisition_X.vi.  Thanks for any help you can offer!

Eric
0 Kudos
Message 3 of 18
(9,752 Views)
I, of course, don't have the required hardware with which the device driver is attempting to communicate. But I can open the given VI's without the error you mention above (I just get a message from the driver stating it couldn't connect to the hardware). It seems to me your problem lies with the initialization function that's being called that includes the type of spectrometer, the IRQ,  and base address. What's the communication method to this instrument? Looks like you have a custom card on the PCI bus that the driver's trying to connect to and failing. Are you sure the PCI card is configured correctly, e.g., IRQ and base address?
0 Kudos
Message 4 of 18
(9,739 Views)
It's just straight up USB.  I've tried installing it on a couple of machines.  It works on 1, never worked on 1, and then worked for a while on the 3rd machine, but then fell into giving me the same memory access error.  I can't think of anything that changed on the machine where it suddenly stopped working.
0 Kudos
Message 5 of 18
(9,730 Views)
Hello Eric,

Is there an error number associated with this message?  For instance, a similar error I have seen when calling DLL's is documented in this KnowledgeBase entry:

http://digital.ni.com/public.nsf/allkb/FD1B1D686A85471686256FC700605F60?OpenDocument

However, Bill may be on to something with the hardware configuration.  What piece of hardware are you trying to communicate with?

Regards,

Bob
0 Kudos
Message 6 of 18
(9,712 Views)
Eric - Have you been able to find a fix for this problem yet? I am experiencing the exact same problem (with the HR2000+ spectrometer). So far, Ocean Optics technical suppport has been unable to help me. Thanks, - Mike
0 Kudos
Message 7 of 18
(9,658 Views)
Mike,

After trying basically everything I could it came down to the fact that the OO stuff was apparently incompatible with LV 8.2, and only semi-compatible with LV 8.0.  What ended up happening was I got OO Tech Support to email me new versions of the software which were compiled for later versions.  The new version actually uses different vi's but the same dll.  The new vi's didn't seem to work (I only tried once and for about a minute) but, using a combination of the new dll, a few of the new libraries and the old vi's I got my code to "work". 

Work is in quotes because whenever I start it up and try to run it, I get an error in spectral_aquisition_X about the dll.  All I have to do to resolve that is go down to the error's location, right-click-->configure and then reselect the already-selected dll and click save.  It makes things work for me, but I end up having to do it everytime I reopen my vi.

-Eric
0 Kudos
Message 8 of 18
(9,652 Views)
Eric -

This sounds similar to what Ocean Optics told us to do. They sent us a file (OOILVD_LV8.zip) containing new drivers (new OOIDRV32.DLL, NatUSB.DLL, and JoeDriver.jar) and a new VI (Sample_LV8) among other things, but we have not been able to get it running with the new sample VI. Can you tell me which collection of new drivers and libraries you used with the old VI in order to get it "working"? This problem has been dogging us for over a month now!

Thanks,

- Mike
0 Kudos
Message 9 of 18
(9,642 Views)
Mike -

The only vi's I'm using from the original C:\Program Files\Ocean Optics\OOILVD directory are:
    \USB4000\USB4000_Sample.vi and
    \USB4000\USB4000_Sample_Globals

The files I'm using from the new C:\Program Files\ Ocean Optics\OOILVD_8\ directory are:
    OOILVD32.lib
    USB4000_Specific.lib
    OOILVD32.dll

As far as I can tell, I never explicitly call JoeDriver.jar or the other dll.

Let me know if there's anything more I can do to help.

-Eric
0 Kudos
Message 10 of 18
(9,631 Views)