LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyence LK-G series communications over Labview

Hi I want to know how I can communicate with my Keyence LK-G series laser measurement system over Labview. There is no Labview driver for the device and I think it would be challenging to develop one by myself since I am a beginner. I just want to be able to read data from the device in my VI.

Thank you very much
Message 1 of 36
(21,244 Views)

It has an RS232 port and a USB port. You would use VISA to talk with the devices. Chapter 5 in the attached manual has the command structure. It comes with some software that looks like it will grab data. You could use portmon to watch the serial traffic to help reverse engineer the code. Download an existing VISA driver to see how they are setup. It basically amounts to setting up text strings to implement the available commands.

 

0 Kudos
Message 2 of 36
(21,248 Views)
Here is an example for talking out the serial port to a digital scope.
 
0 Kudos
Message 3 of 36
(21,244 Views)

Hello I am new to LabView

I use LabView 8.0 and want to read out the values from the aboved named system from Keyence. I use it with 2 laser to make the hight measuring of a coated film.

For this I want to use the RS 232 port from the Keyence measuring device I did all the wiring with the special connectors from Keyence. So its connected to my LPT1 port at my computer.

I use the standard example from the labview libary. The communcation works with VISA. This you will find attached.

I did all the configuration on the Keyence measuring device (Parity, data bits, baud rate ....) But when I want to send a string (For example "ASCR") like it is descripted in the manual I did not receive an value back. Why? The failure message is - 1073807339 I think this means a time out failure. The device is not responding or?

Did I forgot something or something important is missing?

 

 



Message Edited by Remulus on 07-10-2008 04:28 AM
0 Kudos
Message 4 of 36
(20,966 Views)

Did you assume that the CR you see in the manual are the separate characters C and R? Smiley Very Happy

The CR is explained in the manual and is a carriage return. In the example, the CR is the \r.

 

0 Kudos
Message 5 of 36
(20,949 Views)
Remulus:
 
You mentioned you wired it up to the LPT1 port (parallel), you should wire it up to your COM port (serial).

Message Edited by AnalogKid2DigitalMan on 07-10-2008 09:17 AM


Message Edited by AnalogKid2DigitalMan on 07-10-2008 09:17 AM
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 36
(20,941 Views)

I have a VISA driver working for the LK-G5000 using RS-232 but I can't seem to get the USB working.  The USB doesn't show up in the VISA Session control. I have the Keyence\LkIF.dll installed as well as the \Keyence\KeyUsbDrv.dll.

 

Can I use VISA on this or is there another way?

0 Kudos
Message 7 of 36
(18,760 Views)

Does the device still show up in Measurement and Automation Explorer when it doesn't show up in the VISA resource control? To be able to communicate with a USB device, you must be able to see the device in MAX under USB Devices. Please look at the following KB:

USB Instrument Control Tutorial - http://zone.ni.com/devzone/cda/tut/p/id/4478

Once you can see it in MAX, you can use standard VISA functions to communicate with the device in LabVIEW. You should also be able to communicate with the device connected by USB and call those DLLs from LabVIEW.

 

Jordan

0 Kudos
Message 8 of 36
(18,748 Views)

No it doesn't show up in MAX.

 

Is there a work around for that.  The thickness guage works fine using the rs232 but I'm told I have to make it work for USB.  And it works fine with the Keyence UI through USB.

0 Kudos
Message 9 of 36
(18,738 Views)

Hi, don't know if you are still working on this, but Keyence does not appear to provide drivers for the USB.  They don't offer any sort of SDK for the LK unit that I have found, and linking directly to their .DLL library does not show any available functions.  I suspect that is intentional - with Keyence it's been my experience that they like to hold their hardware/software development close to the vest.  Their own software supports functions that are not available to an outside developer.

 

That being said, using the serial port is reasonably fast, and has a rich command set that will pretty much let you do any setup and data reading you can do from the front panel.  It won't get you the 50k readings/second that the hardware is capable of, but there are workarounds for that as well. 

0 Kudos
Message 10 of 36
(18,576 Views)