Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

communication with Keyence LT9010M laser displacement meter through RS232

Hi, I'm trying to use Labview to communicate with Keyence LT9010M via the serial port (RS232).

 

Before this, I got some instructions, and used the Hyperterminal to talk with the Keyence unit. I can get a

profile measurement out with (location, z height) out to the computer. Then I tried to use the labview.

The first step, I followed some instruction on this web about the loopback test. But they were not talking

to each other, the write seems fine, but I always got a timeout error on "read".

I set the baud rate, parity, stopbit, D-length (8 bit), and D-mode , everything as the instruction manual

said, but just don't get them talking. Quite frustrated. The operating system of my computer is windows XP.

I used Labview 7. 

 

Does anyone have experience with this Keyence LT9010 laser confocal displacement meter?

I'm using it as the profile mode to measure the roughness.

 

Thanks for any input.

0 Kudos
Message 1 of 3
(3,785 Views)

Hi,

 

Are you talking about theses loopback test instructions? Did you try the loopback test in Measurement & Automation Explorer (MAX) or LabVIEW? See if that works. Also, does the error message have an error code? You might be getting this error because you are trying to read more bits then available or the default timeout (which is 2 seconds) is too short for this device. Take a look at this KnowledgeBase for more information about how to make sure you are reading the right number of bits or to change the timeout value. Another way to change the default timeout value can be found here.

Rohama K.
0 Kudos
Message 2 of 3
(3,755 Views)

Hey shaoning,

The serial loopback test is really not meant to verify that you have communication with the instrument you're trying to control, but rather it is used to make sure that your serial port is successfully sending and receiving commands. If you are doing simple RS232 communication (without hardware handshaking) then a serial loopback is performed by disconnecting the serial cable from your instrument and placing a wire (or paperclip) into pin holes 2 & 3 which are the TX (transfer) and RX (recieve) pins. This means that you should read back any strings that you happen to write out to that serial port.

 

Since you have already verified that you can communicate with the LT9010M via Hyperterminal, this means that you have connection with the instrument and the loopback test is not really necessary. Try connecting back to the instrument and verify that you can still communicate with the device via Hyperterminal. Once you've done this, I would recommend trying the Basic Serial Write and Read.VI example. To get to this example, open up LabVIEW Example Finder by going to Help>>Find Examples and browsing to Hardware Input and Output>>Serial>>Basic Serial Write and Read.vi

 

Lars L

0 Kudos
Message 3 of 3
(3,742 Views)