PLC and barcode scanner

Fiki

Member
Join Date
Mar 2014
Location
Near a forrest
Posts
5
Helou.

I am having a problem and I hope you can help me.

I am reading the data from my barcode scanner in my plc, und using the data send to incriment the number of false/true reads.

The problem is that every once and a while I read a false code (let's say code A) that is in fact true.

When I checked the registers from code A read I saw, that the registers (d100 to d113) where "moved" down. So that the value, that was supposed to be in register d100 was in fact in d103. (example).... The move is always the same, and I checked the scanner on my PC and it worked without a mistake.

Do you have any idea why this is happening?
I am usin a RS285 communication, protocol: 9600, E, 2
 
Thank you for your answer, but I think this is not it. I scanned the same code when the scanner was hooked up to the PC. It read perfectly, all the time.
 
This is a common problem on RS485/422 systems. I suspect that you are seeing occasional "stray" nulls, which are often used to stabilise the lines at the beginning of a transmission,
and then looking for terminating characters to let you know that there is data in the buffer. If you then just read the contents of the buffer into an array you will get the nulls at the start of your code. The answer is to look at the start of the code to check that it is valid and then trim any nulls from it before using the code in your programme.
 
I found out what the problem was.
It was in the PLC programming. Because there is no conformation of sent packets, the plc joust waits until it gets a data stream(ASCII protocol, no ack...). So sometimes the data stream was to fast, and when it was received the program was in an improper network. (happened because i had a communication interrupt function, that switched a sub program on ).
Thank you for your answers.
 

Similar Topics

hi guys, I have to write a program to trigger and receive data from a barcode reader via an RS485 module plugged on Wago PFC 200. Does anyone know...
Replies
6
Views
2,681
Hello Everyone, I am looking for communication with delta PLC and barcode scanner over RS485 Please help.. The ladder program will be helpful...
Replies
1
Views
1,842
Brand: motorola Model number: LI 4278 Cradle model number: STB4278 Rs232 cable: CBA-R01-S07PBR To communicate with Plc model: omron CP1E -N30-DR...
Replies
2
Views
2,080
I'm trying to use a Allen Bradley 1769-L24ER-QB1B PLC to send a command from my Studio5000 logic to a Cognex DataMan 262Q barcode scanner...
Replies
3
Views
3,627
I am currently using DVP14SS PLC with DOP-B HMI in which i want to read data from 2 scanners (Honeywell Scanner & Motorola Scanner). Communication...
Replies
1
Views
3,806
Back
Top Bottom