Paolo_911

EIP Data Clearing

2 posts in this topic

Posted (edited)

I have a Q03UDECPU communicating on the same rack through an EIP4CCPU-S (EIP Scanner for Q12DCCPU-V) to Datalogic cameras that are scanning barcode data. The trouble is scanning a longer set of barcode data and then a shorter set. When the new (shorter) barcode data is read from the scanner, the tail end of the previous data (longer) is still present in the registers after the new barcode data (on the tail end). We studied the scanners and I am left to believe that the PLC isn't clearing the register somehow, even though I have tried to clear it. Can someone please explain if the attached PLC code and parameters are constantly pulling data from the scanner? I am not familiar with EIP configuration at all. The data I'm looking for is in D2005 - D2069 and I can move 0 into these registers, but as soon as I remove the force to push 0, it updates with the same barcode data that was in there before (with the longer data still on the tail end). Please see the attached parameters and PLC code and explain if there is a way to clear U3E1\G10000 or if it is a live feed pulling the scanner's data as it appears to be, which is useless to clear D2005 +....   

Parameter.jpg

 

Program.jpg

Edited by Paolo_911

Share this post


Link to post
Share on other sites

The above codeline will, as explained in comment: Always move 211words from G10000+ into D2000+. So the problem here is that the local buffer in the EIP isn't cleared after it's read. You need to find a way (probably a bit in a BFM or something) that clears the input area of the EIP, AFTER you've successfully read the data. The sequence should be something like this:

  1. Scan bc
  2. Store bc in EIP
  3. Notify Q03 (can be done by a bit, or by looking at new data available)
  4. Transfer data from EIP to Q03
  5. Clear EIP buffer area
  6. Ready for next data

Alternatively, if speed is of essence and you want to avoid clearing the EIP buffer you can probably find a buffer in EIP that indicates the length in bytes that are currently received. Use that length variable instead of K211 in your BMOV instruction. Note that the variable is probably in 'byte' units so you'll have to do some calculations that way.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now