Ascii - DL06 - Barcode Reader

iansmiler

Member
Join Date
Oct 2004
Location
North America - For Now....
Posts
58
Hello all :) I am experimenting with a Barcode reader and DL06 and have created the program that reads in the ASCII code. I have a few problemes that I need to address:

1. I have no idea how this ASCII code reflects on what I am actually seeing on the barcode that I scan in. On the barcode I am seeing several digits below it - and I understand what this transcribes to in real information (ie. country code etc). But when I bring that into the PLC I have a long *** number set accross several V memory stores that mean nothing to me! Which leads me onto my next question...

2. Once I have worked out how to convert the ASCII code into a readable format - how do I display this on my HMI? (EA7-T8C+). Or do i take in the raw values from the V meemory allocation and convert it into readable format within the HMI?

Any help, links, etc. Apprecaiated as always - Ian

Barcode.jpg
 
Ok Ian - this may take a few posts but let's start out easy.

Google 'ASCII Table' to get a table of the ASCII representation of the characters you expect to see.

Break up each V memory location into two parts when viewed in hexadecimal. Using a typical return from the bar code reader decode it into the characters. The halves of the V memory registers will correspond to the Hex column of your ASCII table. Some of the halves, especially at the start or end, may not translate into regular characters that appear below the bar code on the case. These are 'control characters' and are usually a lower hex value. These may represent the 'start of information' or 'end of information' markers. Ones at the end may be a 'Carriage Return (CR)' or a 'Line Feed (LF)'.

But you should see the expected characters from the bar code somewhere in the set of V registers. You will probably note that, for the two halves of one V memory register, the lower half represents the first of the two characters received and the upper half represents the second of the two characters received.

Do this first until you are comfortable recognizing a bar code as represented in the V memory registers. Then come back for part two.
 
Hi Bernie, when I read your reply I had one of those 'ahhhh now it makes sense' moments! Thanks so much for pointing the way :)

I have been playing with the HMI to try and get it to read into a readable format... to no avail! What's the next step? :)

Ian
 
Is it appearing as something reasonable in the V memory registers?

If it is write down the expected numbers/letters from the barcode. Then write down all the values from the V memory registers starting with the first one.

The HMI won't understand any lead-in control characters so it needs to start with the first real character, whether its numbeic or alpha. the HMI will need the location of the start and the number of characters. Use the 'Dynamic Text' control. The 'Trigger Tag' either needs to be a constant ON value or one that goes true as a new barcode is received.
 
Perfect Bernie!!! đź‘Ľ I had a little trouble displaying the first character of the barcode but I used the AEX command to rectify this. I spent hours trying to work out this problem... and all along 'Dynamic Text' was staring me in the face and laughing at my blindness!

Thanks again Bernie,

Ian
 
I am glad I could help. Sometimes that little bit of understanding opens a whole new insight into the controllers and their systems. I've certainly had my 'ah ha' moments.
 

Similar Topics

Dear Gentlemen/Ladies, I have a bit of a nut cracker here. I am using a Koyo DL06 and a D0-DCM (slot 4). I have some issues with the DCM module...
Replies
10
Views
4,799
Is it possible to compare an ascii value in an 06 plc to a bcd value entered from an hmi ? or can the ascii be converted to bcd ? And the standard...
Replies
6
Views
3,607
Hello All Do any of you have experiance sending and receiving ASCII using Visual Basic and Automation Directs DL06 via com ports. I working on...
Replies
4
Views
4,239
This goes along with the other post I have on here..... I have a DL06 with a barcode reader connected to Port 2. I have the communication...
Replies
1
Views
2,128
I am trying to talk to an intelligent stepper indexer with a dl06 through port 2 with RS422 wiring. The indexer accepts commands in ascii format...
Replies
7
Views
8,863
Back
Top Bottom