Keyence Barcode Reader

1 view
Skip to first unread message

Yvone Samiento

unread,
Jul 25, 2024, 11:42:03 PM7/25/24
to libxbee

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.

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.

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.

i have a TM251 MESC plc that needs to read text data from a Keyence SR-2000 barcode reader.
The reader is connected with Ethernet, has anyone ever used these types of readers (or other types) using TCP/IP communication?
What types of instructions should I use to read/write data in TCP/IP?
I'm new to Schneider plc and I wanted to understand the feasibility of the operation.

Has anyone interfaced an SR1000 (or similar keyence barcode reader) with a (Automation Direct) Click PLC? I am looking to read/write rs232 so I can get the string back from the barcode reader, instead of actually teaching it or using banking (banking is a bit cumbersome with the keyence, plus it'd take me a long time to actually get the labels I need to teach the camera all). I had started messing around with the application, but I have no way of seeing if the camera or plc is actually reading/writing the data. Data is all ascii.

Taking a quick look at Click PLC, it looks like it comes standard with a RS-485 port. Not sure if that means you need an add-on module for RS-232 or not. In the Rockwell world there is a programmable module with two RS-232 ports.

You are right, there is an RS485 port. The programming port can also be used as RS232. Hopefully NevergoldMel can chime in. I've used RS232 on the Click before, but never for ascii (you have to choose ascii or modbus protocol with the click). My send and receive show up as successful, but I am not seeing any data (send isn't commanding the picture). I think the issue is more on the side of the Keyence.

Correct, pcmccartney1. The LON ascii command is what I was sending to trigger (read). I was getting a write success bit back on the plc, but I was not seeing the camera trigger. LOF is the trigger stop command. If I opened terminal on a PC, the same LON command starts triggering the camera. LOF would then stop triggering. That's where my confusion (lack of knowledge and experience) comes in. Why would I get a write success on the PLC? Does the write success ignore any sort of feedback?

Haven't used a Click, but in the Rockwell world, you need to configure the RS-232 port and also tell it the end or term chars. Also, look for the end or term chars in my code to figure out when the buffer is full and how to parse out the results.

That could potentially be the issue. When setting up the send command, the click is quite a bit different than the AB. There is a checkbox for the termination command however; there is the choice of 1 or two characters, and hex only. I will give that a try next time I get out to the equipment. They give you an option of choosing the term from a table. didn't notice that the first time. I'm more used to robots where you just type [CR].

Nobody let's me play with barcode readers anymore.
The rj-12 port is rs232.
From what I remember most barcode readers end the TX with
THere's a couple guys over on the AutomationDirect forum that have done barcode stuff.

I was able to get this partially resolved yesterday afternoon. So far I am able to send commands to the SR1000, and it is responding as expected. Now I will work to get the data back, as that doesn't seem to be working yet.

Keyence offers high performance Compact 1D and 2D barcode readers. Imager barcode readers and laser scanner barcode readers are available to match code type, quality, size, material and speed requirements. Compact Handheld Readers are also available for special manual barcode reading applications.

June 24, 2013 - Keyence releases SR-750 fixed mount 1D and 2D barcode reader. TheSeries incorporates advanced decoding algorithms for better reading capability. Pre-processing techniques, such as brightness and contrast threshold correction, along with significantly enhanced image filtering capabilities ensure images are optimized prior to decoding. Upgraded processing includes localized binary threshold settings for unique regions of the code make the reader well suited for direct part marking applications. The high speed search algorithm locates codes more quickly when the background image is complexIn addition to updated code capture and process techniques, the SR-750 has features increasing its ease of use and read reliability. Long range (over three feet) and wide field of view models are available when the position of barcodes may vary.Built-in communication and increased connectivity ensures easy integration to new and existing systems. EtherNet/IP, TCP/IP, PROFINET, FTP, RS-232c, Power over Ethernet and data editing functionality are included and available without the need for external communication units. Intuitive and simple to use setup software automatically adjust lighting and image filtering settings with one click. Preventative maintenance function can provide feedback and indicate when code printing or marking quality is deteriorating before code reading is impossible

Get your free barcode below and then check out our extensive line of barcode scanning solutions.

Cognex barcode readers and scanners offer easy setup and advanced decoding technology, with no moving parts that can wear out or fail, making them ideal for industrial settings. No matter the application, Cognex barcode reading solutions help you increase throughput, reduce costs, and optimize product traceability. Learn more about Cognex fixed-mount and handheld barcode readers and barcode verifiers.

According to the company, the SR-2000 promises to provide two-times the field of view, two-times the depth of field, and two-times the reading speed capability compared to conventional barcode readers. The barcode reader is also equipped with 14 built-in LED lights, a high sensitivity CMOS sensor and a polarizing filter which claims to capture optimized image for better readability, adds Keyence. Other product features include: multiple code reading; auto-focus and auto-tuning; and compatible with different communication protocols.

Keyence Corporation (キーエンス, Kīensu) is a Japan-based direct sales organization that develops and manufactures equipment and solutions for factory automation, sensors, measuring instruments, vision systems, barcode readers, laser markers and digital microscopes.

Keyence Corporation is a global company with a network of 16 international organizations that specializes in factory automation. Keyence Corporation earns over US$4.9 billion in yearly sales and employs more than 8,300 employees worldwide.[2] As a direct sales company, Keyence salespeople visit customers on site with demonstration cases to show products live.[4]

Keyence's range of products are part of the manufacturing and research processes in a variety of industries, including the electronics, semiconductor, automotive, food and packaging, biotechnology, and pharmaceutical industries.[5]

Reply all
Reply to author
Forward
0 new messages