Main Menu

All times are in GMT -8 (DST) :: The time is now 5:10 am.

Login or Register
Create an account and register your LMI products to gain access to useful resources.

Register Account

Login

Sub Menu

Knowledge Base
Article Data
Article Ref
8319-TIOM-1101
Date Created
Thu, 9th Aug 2012
Date Modified
Tue, 11th Mar 2014

   Device not available in HSAcquisitionDevice

Question 

Why is the device reported as not available in the HSAcquisitionDevice after a load?

Answer 

If you don't see the nag screen when starting the application, it's possible that you have a second instance of the HSAcquisitionDevice in the system. There must be only one HSAcquisitionDevice throughout the system, to interact with the devices. Any additional HSAcquisitionDevice will not be able to use any device. These additional HSAcquisitionDevice can only do emulation, image copy, or calibration assignment.

That being said, to avoid having more than one HSAcquisitionDevice in the system, you have to follow these precautions:

  1. Don't add more than one HSAcquisitionDevice in the process manager. If you do, it should be done intentionally, only for purposes explained above.
  2. If you have more than one HSApplication, there can also be only one HSAcquisitionDevice for all of them. Only one can communicate with the devices, and it will be the first one instantiated.
  3. If you are using Visual Studio, make sure the Designer (UI editor) is not open in Visual Studio. For editing purposes, the HSApplication control in the form will capture the devices and prevent any other instance from seeing them. This is particularly true when debugging.
  4. Make sure you have one and only one instance of application running at a time. Open the TaskManager to see if you do not have a hidden and unterminated instance of your application running in the background.
  5. Finally, when programming, if you use the GetProcess() or the Process() accessors to get the HSAcquisitionDevice, you must call the ReleaseComObject() or FinalReleaseComObject() fucntions after. If these functions are not called, a handle is maintained to the object, and it will keep the HSAcquisitionDevice alive. Trying to delete it will fail and any subsequent instantiation of a HSAcquisitionDevice will report the devices as not available.
        Dim lAcquisition As HSACQUISITIONDEVICELib.HSAcquisitionDevice
        lAcquisition = applicationControl.ProcessManager.Process("Acquisition")         applicationControl.ProcessManager.Execute("Acquisition")         System.Runtime.InteropServices.Marshal.FinalReleaseComObject(lAcquisition)         lAcquisition = Nothing