LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL receving an array of Data

Solved!
Go to solution

Hello Everyone,

I have a DLL from a thirdparty, which should give me acces to a 512Pixel line nmos Sensor. For a faster Readout 4 Sets are read out at the same time. So the minimum read out is 2048 pixel at a time up to 262144Pixel.
I'm intressed in the mimimum read out with just 2048 pixel.
In principal the DLL work, i can set und read out the exposertime, but if i won't to read out the stored measurment. Labview hang up, no error, just not responding. I tried to set the array to 262144 Pixel without any change.

The syntax of the problem case line is: int khsdll_scan_get_long (unsigned int *buf);
the return should be 1 if it haven'd been readout yet otherwise it is 0. About that pointer i have been told that i should allocate the right amount of memory (I tried it with a predefined array and with the mimumum size fearture).

I'm Using Labview 2017 64-bit with Win 10 64-bit and a 64-bit DLL.
The divce is connecting via USB.

 

I hope this will be enough Detials to help me out.

 

Kind Regards

0 Kudos
Message 1 of 12
(3,040 Views)

Not much to be wrong there... Seems you've done everything right.

 

Have you tried running the CLFN in "Run in any thread"? Not sure why it would help, but there could be a some UI thread interlocking\deadlocking going on. Usually "Run in UI thread" is the safe option, but worth a try (and it's a cheap fix).

 

I'd put the Name Format on "Name", so you get invoke node style CLFN. It would make your code more readable, as you'll be able to read function and parameter names.. Just a hint, it's hard enough as it is.

0 Kudos
Message 2 of 12
(3,027 Views)

Hello ,

i tried now to run it in any thread, i keep responding the VI, but not ending (no Data reseved and main abourt button doesn't have any effect).

 

With the Name formate you mean something like converting the Integers in Strings? Like you do in definitions e.g.

define CCDDVR_EXPOSURE_SET = 0x00A;
instead of just putting the value 10 in the CLFN?

 

I have thought of making something like this, but i will alsway ahve to look in the *.h file and some documentaions to know what the program will do. So i thought it would be more a waist of time. In the end i will just comment the Blocks and use it as a subVi with details of possible inputs.

 

Thanks for your suggestion.

0 Kudos
Message 3 of 12
(3,016 Views)
Solution
Accepted by topic author Spectro89

The name format is just cosmetics, it won't help with your problem.

 

Right click the CLFN, under Name Format, select Names, iso No Names. You'll get the function name and parameter names in the node, much like a .net method.

0 Kudos
Message 4 of 12
(3,008 Views)

Thank you for that advice with the name Formate and checking to code.

I was a problem cased by the DLL.

 

Kind regards,

0 Kudos
Message 5 of 12
(2,985 Views)

Could you share the LabVIEW drivers of khsdll.dll or h file or manual to here, thanks!

0 Kudos
Message 6 of 12
(2,796 Views)

Hello ronke,

the KHS.dll is specilised for my setup and equipment, so i guess that would help you much.

If you are just intressted in the syntax, maybe this manual can help.

 

 

0 Kudos
Message 7 of 12
(2,783 Views)

Dear,

 

         Thanks for your info, actually I also want to control the spectrometer from KHSinstruments, but i don't have the user manual and h file, so could you please send the LabVIEW driver to me , thanks.

 

ronke@163.com

0 Kudos
Message 8 of 12
(2,774 Views)

Could  you share the KHSdll.h file to here? I would like to know more details of the commands code, thanks.

Now I can read the spectra from KHS spectrometer with the test_readout.vi,see below:

KHSscan.png

0 Kudos
Message 9 of 12
(2,634 Views)

Hello Ronke,

I have a special solution for my camera. So i guess the KHSdll.h would not help you much.
If you have a KHS Camera you should a  *.ini , *.lib , *.dll and a *.h to get it running. And hopefully a pdf to explane what you need.

Diffenrent hardware need diffenrents codes, otherwise it will not work proberly or at all.

0 Kudos
Message 10 of 12
(2,605 Views)