01-15-2013 06:40 PM
Hi,
We use the Ocean Optics HR2000 and HR4000 spectrometers under LabVIEW. After they installed Spectrasuite on a machine, a coworker complained that my software stopped working - it requires the VISA device-driver. I'd like to figure out the easiest way to use the HR2000 - beginning with the assumption that "SpectraSuite"-compatible driver is installed.
I want the code to be 32bit and 64bit compatible - would the NET interface (or Automation interface) help?
Has anybody tried using the NET drivers? Did you ever see the error #1172?
"
LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.AccessViolationException in OceanOptics_HR2000(NET).Initialize.vi
"
Any ideas are appreciated!
01-16-2013 01:25 PM
Generally only one application can use a driver at a time. If the Spectrasuite communicates with the instrument via VISA, your LV program cannot also communicate via VISA at the same time. It is like a telepohne line (without call waiting). The second program which tries to use the line gets a busy signal.
Lynn
01-16-2013 01:57 PM
I have used the omniDriver that Ocean Optics provides for a long time. There is a library called wrapper.llb that has LabVIEW VIs (very poorly written and I ended up writing my own). This driver/dll has its own problems though. I would get errors like "can't start JDM" and I also started running into issues running on Windows XP. This was the only other good way I could find to interface with an Ocean Optics. I have recently switched to the NI_VISA drivers, which is a lot more reliable, but also has some of it's own problems from what I have seen.
I would recommend switching drivers in device manager depending on what application you are using. It is very easy (at least in Windows 7) and is the current method I use when I need to switch from LabVIEW development to SpectraSuite. Like the previous poster said...you cannot run both applications simultaneously.
01-17-2013 12:54 PM
Thank you Lynn, Brad,
The LabVIEW software (compiled) is also supplied to our customers. It's safe to require that only one application at a time is using the instrument, but I'd rather avoid the need to switch between "factory" device-driver and VISA device-driver as that would certainly result in customers calling to complain.
It would be great if hardware vendors standardized on VISA or always configured their USB interface into a virtual COM port, but when they don't I need to use whatever "factory" device-driver the customer is going to install.
I've re-wrapped the 32bit "Wrapper" OmniDriver32 CLFs and they seem to function on my 32bit dev. stn., but I don't know whether these calls will work on a 64bit system. It would be nice to code these drivers, once, using bitness-independent syntax - like .NET?
Thanks!
01-18-2013 06:42 PM
Hi 550nm,
Do you have access to a 64-bit system you could test your wrapper on? As far as .NET goes, I'm not entirely sure it's bitness-independent. You might want to take a look at this link.