Jump to content

Mightex Camera


Recommended Posts

We are using a Mightex CCD line camera. Their dll and example code in VC++ has the following:

-------------------------------------------------

// Structure

-------------------------------------------------

typedef struct {

int CameraID;

int ExposureTime;

int TimeStamp;

int TriggerOccurred;

int TriggerEventCount;

int OverSaturated;

int LightShieldAverageValue;

} TProcessedDataProperty;

-------------------------------------------------

// Function

-------------------------------------------------

void _cdecl FrameCallBack( int __, int __, int __, TProcessedDataProperty* Attributes, unsigned char *FrameData )

{

// Code here...

.....

....

...

..

.

}

-------------------------------------------------

// dll function

-------------------------------------------------

SDK_API CCDUSB_InstallFrameHooker( int __, FrameDataCallBack FrameCallBack );

The structure (TProcessedDataProperty) is called in the function (FrameCallBack), which in return is called as an argument in the dll function (CCDUSB_InstallFrameHooker). This dll funcion is third party vendor dll who don't have LabVIEW support, but is necessary to use this dll in order to access the CCD camera data.

We have implemented the structure as a cluster in LabVIEW. But how do we implement the following in LabVIEW?

(1) the FrameCallBack function that takes a pointer to structure argument (TProcessedDataProperty* Attributes), and

(2) how do we pass the pointer to FrameCallBack function as an argument to the CCDUSB_InstallFrameHooker dll function?

--

Thanks,

Gautam.

Link to comment

QUOTE (mkaravitis @ May 16 2008, 04:56 PM)

We are using a Mightex CCD line camera. Their dll and example code in VC++ has the following:

-------------------------------------------------

// Structure

-------------------------------------------------

typedef struct {

int CameraID;

int ExposureTime;

int TimeStamp;

int TriggerOccurred;

int TriggerEventCount;

int OverSaturated;

int LightShieldAverageValue;

} TProcessedDataProperty;

-------------------------------------------------

// Function

-------------------------------------------------

void _cdecl FrameCallBack( int __, int __, int __, TProcessedDataProperty* Attributes, unsigned char *FrameData )

{

// Code here...

.....

....

...

..

.

}

-------------------------------------------------

// dll function

-------------------------------------------------

SDK_API CCDUSB_InstallFrameHooker( int __, FrameDataCallBack FrameCallBack );

The structure (TProcessedDataProperty) is called in the function (FrameCallBack), which in return is called as an argument in the dll function (CCDUSB_InstallFrameHooker). This dll funcion is third party vendor dll who don't have LabVIEW support, but is necessary to use this dll in order to access the CCD camera data.

We have implemented the structure as a cluster in LabVIEW. But how do we implement the following in LabVIEW?

(1) the FrameCallBack function that takes a pointer to structure argument (TProcessedDataProperty* Attributes), and

(2) how do we pass the pointer to FrameCallBack function as an argument to the CCDUSB_InstallFrameHooker dll function?

--

Thanks,

Gautam.

Callback functionality is not supported byt the Call Library Node. The most simple solution is to write a wrapper DLL in C that provides that callback function translating the callback event into a LabVIEW occurrence or LabVIEw user event and a LabVIEW callable function to install that callback function.

All in all not something you are likely to solve without some good C programming knowledge.

Rolf Kalbermatter

Link to comment
  • 3 weeks later...

QUOTE (rolfk @ May 18 2008, 01:55 AM)

Callback functionality is not supported byt the Call Library Node. The most simple solution is to write a wrapper DLL in C that provides that callback function translating the callback event into a LabVIEW occurrence or LabVIEw user event and a LabVIEW callable function to install that callback function.

All in all not something you are likely to solve without some good C programming knowledge.

Rolf Kalbermatter

Did you proceed with the .dll wrapper solution. I have just run into the same problem, and was wondering if you had given any thought to the .dll. If so could you let me know any tips for building the .dll.

Link to comment

QUOTE (jcryan @ Jun 5 2008, 02:08 PM)

Did you proceed with the .dll wrapper solution. I have just run into the same problem, and was wondering if you had given any thought to the .dll. If so could you let me know any tips for building the .dll.

I don't have such a camera and couldn't do it. Maybe the original poster did something but my experience with this is that most do not bother with the complicacies this causes.

Rolf Kalbermatter

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.