cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

The "Invalid Handle" message when calling the ArtemisCCD.dll

The "Invalid Handle" message when calling the ArtemisCCD.dll

Hello:
 
  I have a Artemis ATiK-16HR CCD (http://www.artemisccd.co.uk/) and I want to grab images with LabVIEW. After refering the SDK (inside the attached file) I can correctly get the CCD informations with functions like "ArtemisDeviceSerial". But, if I want to send parameters to the CCD with the function like "ArtemisBin", I always got the "Invalid Handle" error message. That is to say, once I called the functions with handle inside, this error message always happens. There's handle type definition inside the SDK as void, but it still not work in the case of anthing return type I ever tried. Please see the attached zip file and help me to solve this problem.
 
Thank you very much.
0 Kudos
Message 1 of 41
(3,334 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

You didn't attach your file.

Are you sure you've gotten a handle to the CCD?  There is probably another function to get the handle.
0 Kudos
Message 2 of 41
(3,313 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Dear Matthew:
 
    I ever asked this question to the NI local support, their response was LabVIEW cannot define data type of void* and we have to substitute it to numeric. I also found the description at page 2-25 in this document "Using External Code in LabVIEW". Besides, I got the "Invalid handle" message when the calling convention is stdcall, but it always make LabVIEW terminated if changing to C.
    I do remember to attach the file. Please refer it and give me some introductions. Thank you very much.
 
0 Kudos
Message 3 of 41
(3,300 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

On page 5 of the pdf in your zip file:

// Connect to given device. If Device=-1, connect to first available
// Returns handle if connected as requested, else NULL
extern ArtemisHandle ArtemisConnect(int Device);

So you need to make this function call.  The output of this call is the handle you pass into the other calls which require a handle.  I would try setting up the output as a U32.  When you're done, you need to eecute one of the following:

// Disconnect from given device.
// Returns true if disconnected as requested
extern bool ArtemisDisconnect(ArtemisHandle hCam);

or

// Disconnect all connected devices
extern bool ArtemisDisconnectAll();
0 Kudos
Message 4 of 41
(3,298 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Dear Matthew:

Thanks for your information. This time I add ArtemisConnect function as the input to handle. But the same message still happened. Please refer to attached file and give me some suggestions.

Thank you very much. 

 

0 Kudos
Message 5 of 41
(3,292 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Your return type for ArtemisConnect should not be void.  I suggested trying a U32.  A void pointer is not void, it is a pointer.  If you specify the return type as U32, you should get a value for the return.  All you are currently passing out is the device number you passed in.  This is not the handle.
0 Kudos
Message 6 of 41
(3,289 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Dear Matthew:
 
I think you mention a critical point that I am so confused until now. I ever refered some examples with handle definition as U32 and it works. But in this case, it seems something wrong. It's really not easy to explain this if no hardware. I will take the CCD to NI local office and try to do something different. Thanks for your informations.
0 Kudos
Message 7 of 41
(3,274 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Hello
I've a Atik16HR to adquire images from a monochromator and like it is controlled under Labview. Is very important to me to control both under the same program.

Finally Is there any Labview driver working for this camera?
Where can I find it?

Thanks
Leopoldo
0 Kudos
Message 8 of 41
(3,126 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Kei,

Did you get your Artemis Camera working? I'm considering buying an Akit 314L (Made by Artemis and using the same SDK) and need to know if I can get this working with with Labview and what limitations there are.

If you got it working and you have some example Labview code then I would really appreciate you sharing it.

Regards,

Mark

0 Kudos
Message 9 of 41
(2,963 Views)

Re: The "Invalid Handle" message when calling the ArtemisCCD.dll

Are the ATIK/Artemis CCD cameras now supported in Labview? If not, does anybody know if the SDK method works?

 

Thanks,

Roland

 

0 Kudos
Message 10 of 41
(2,232 Views)