12-05-2013 07:35 AM
Hi,
I'm trying to use the Keyence LK-G10 laser displacement sensor with Labview V13.0
I have the attached dll files sent to me by Keyence. I'm trying to use the import shared library function to convert these into VIs.
I'm facing the following problems and would appreciate it if anyone can help:
-When I import the LKIF.dll file it only recognises 6 of the VIs. The others are rejected as they are "not in the header file but exported from the library" or "The 'IN, OUT' symbols are not defined".
-The KeyUSBDrv.dll doesn't appear to have a header file?
I don't have much experience in this area, so is it possible to alter the header file to define the IN/OUT symbols?
I saw there are a couple of other questions about Keyence lasers, but these don't seem to have to same problems as me.
Any help is much appeciated,
Marc
12-09-2013 05:08 AM
Hi,
I'm Chiara, I work for NI UK and I'll be trying to help you out with this, though it may be worth going to Keyence for more information, because a lot of how LabVIEW interfaces with DLLs is very dependent on the architecture of the shared library itself.
When using the Import Shared Library Wizard, it's necessary to have a header file to allow LabVIEW to parse the inputs/outputs: I'm not sure why the driver doesn't have one for KeyUSBdrv.dll, but you'll need one for labview to be able to parse it. On the other hand, if you're good with C, it may be possible to reverse engineer: I'm afraid I don't do C programming at all so I have no idea how you'd go about doing that.
Similarly, it looks like the wrapping on the DLL with a header file might be made up of pointers which LabVIEW can't deal with: it treats memory access slightly differently than is usual in other programming languages. A few potential troubleshooting steps can be found here: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/trbl_import_sl/
I hope this helps some, but I suspect that it's going to be more of a case of looking in to the DLLs themselves than LabVIEW: maybe if you have Labwindows/CVI you could do some editing in there?
Best wishes,
12-09-2013 03:39 PM
The attached VI will read the measurement values from an LK-G distance sensor using LKIF.dll. The file is in LV version 8.5.1, because that is what I have. I just tested it on Windows 7 using the latest version of the DLL (downloaded today from the Keyence site), and it works fine.
In principle, you could examine LKIF.h (included with the dll download) and figure out how to access additional functions, but I have not done that. I use LK Navigator to set up the sensor the way I want it, since I've never needed to do that on the fly.
06-25-2022 07:32 AM
Hi Dear,
Could you please tell me where I can find the DLL for LK-g5000 series laser displacement sensor?