LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP communication with Keyence SR-1000 series barcode reader

Solved!
Go to solution

 

So I have a customer who needs help to connect the Keyence SR-1000 barcode reader using TCP/IP to a LabVIEW application. After researching Keyence's 'Connection document' for TCP, I realize it's based on their utility software alone.

 

Since I have no experience with barcode readers I'd appreciate any hints on what to look out for and how to go about implementing a VISA-based 'driver' for this device. Or generally, how barcode scanners are best hooked up to LabVIEW.

 

Thanks

Ifeanyi

Ifeanyi
0 Kudos
Message 1 of 13
(22,702 Views)
Solution
Accepted by topic author michifez

@michifez wrote:

Since I have no experience with barcode readers I'd appreciate any hints on what to look out for and how to go about implementing a VISA-based 'driver' for this device. Or generally, how barcode scanners are best hooked up to LabVIEW.


You would need to get in touch with the manufacturer of the barcode reader and ask them for some documentation on the TCP communications. Without that, the best you could do is use a tool like WireShark to 'sniff' the TCP data and try to figure out what data the scanner is reading/writing to their own software and try to replicate it.

 

There are lots of manufacturers/types of barcode scanners - some have their own drivers (e.g. DLL) you can call, some use RS-232/Ethernet, some simply emulate a keyboard and 'type' the characters of the barcode.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 13
(22,691 Views)

Sam_Sharp thanks for the suggestions. I've written Keyence and now waiting for a response.


Ifeanyi
0 Kudos
Message 3 of 13
(22,668 Views)
Hi! I have the same problem, with 2 N-L20 Ethernet Devices. Keyence have his own software: AutoID Network and I also see them, But I can see the device on NI MAX. I have other Ethernet Devices connected to Labview Like Sorensen XPF and Basler Cameras. Did you Install other driver for Keyence on the computer for Keyence and Labview?
0 Kudos
Message 4 of 13
(21,759 Views)

I make this vi to use the SR-752, I think could be usefull

0 Kudos
Message 5 of 13
(21,406 Views)

Hello,

 

Could you please send your code with all controls and upload it in LV12?

 

thanks in advance.

 

Thomas.

 

Note : Sorry, I was thinking that was french post. Sorry.

0 Kudos
Message 6 of 13
(19,307 Views)

Hi Thomas,

 

it would really help when you would write your messages using English…

 

Here's a converted version of that VI. (It misses two other files.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 13
(19,304 Views)

For all of the Keyence devices they use their own software which uses generally a DLL to communicate with the device. Amazingly the DLL used is for each of the Keyence class its own specific version too, I can't really imagine what software development strategy they have. It seems each device group is developed at a different place with a separate software development team for each of them too.

For most of their devices they do have a minimalistic C header file for that interface DLL they can send out to customers but you need to find someone inside Keyence who is willing to go through the trouble of optaining that information internally and sending it to you. For a few device groups there even exist (customer made) LabVIEW libraries that interface to the according DLL that Keyence can sometimes share with other interested users. Lacking such a driver you can still develop your own when you manage to sweet talk your Keyence sales representative to find those C header files for the DLL internally. Using the Call Library Node it is not that difficult to develop such a driver, provided you do have some fundamental C programming knowledge, or access to a person with such knowledge.

Last option is to develop your own driver entirely based on the TCP/IP functions of LabVIEW. Complication here is that most Keyence devices use binary command/response protocols, so eavesdropping on the communication through tools like Wireshark is a very cumbersome and painstaking experience.

I did that for a different Keyence device (a laser distance meter) in the past since the driver had to run on a realtime controller which can't use DLLs, but that driver only works for that specific Keyence controller SI-F100x and is not something I can share. I did have some idea to develop a modular driver that might work for different Keyence class devices since they do use mostly similar (but not exactly the same) binary protocols over TCP/IP but lacking any other devices to test with that never went anywhere.

 

On this site all the way down they do provice some sample program for Visual C/Basic that use a .Net interface. You could also try to interface that with the LabVIEW .Net functionality.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 13
(19,291 Views)

Referring to user manual (see link , in document revision 6.0 see chapter 12) you can also communicate with ASCII commands.

E.g.
command: "FTUNE{0D}"
response 1 (immediately) "OK,FTUNE{0D}"
response 2 (after success) "Focus Tuning SUCCEEDED{0D}"

 

Martin Schwarzgruber

0 Kudos
Message 9 of 13
(17,189 Views)

I had success using the TCP VI's

 

CFEARING01_0-1589996920089.png

 

The scanner just needs to be setup using the wizard in the Ethernet tab of the Network Navigator

Chase Fearing
Test Engineer, Certified LabVIEW Architect
Message 10 of 13
(17,010 Views)