Connecting Tech Pros Worldwide Help | Site Map

Why the barcode did not respond to image capture Command

Newbie
 
Join Date: Oct 2009
Posts: 5
#1: Oct 18 '09
I am working on write a program that reads and writes from the barcode
my problem when writing (send command to barcode)

I read in pdf manufacturer barcode that the command of capturing the image is IMGSNP so i pass it to write function as follows serialPortObj.write ("IMGSNP")

But Why does not have a barcode to respond to the command ? and did not capture the image :(
Is this wrong way
Barcode manufacturer is HandHeld (4800p)
Thanks for any help
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#2: Oct 18 '09

re: Why the barcode did not respond to image capture Command


There could be a dozen different reasons - with so little information to go on.

Maybe you don't have the COM port at the right Speed/Parity for the reader.
Maybe the reader has to be configured first for the type of barcode you are reading (Code 128, Code 39, Postal, etc.)

Maybe you haven't put it into Continuous Scan mode first?

Maybe it is reading, but you aren't correctly getting that data back.
Newbie
 
Join Date: Oct 2009
Posts: 5
#3: Oct 18 '09

re: Why the barcode did not respond to image capture Command


Thank you very much tlhintoq and sorry for the delay in reply
I have ascertained what you referred to (Speed/Parity ...) All works well
Sorry, I did not mention that 2d barcode type reads well but the problem that barcode reader does not read the image and to read the image i have to send command ,i mean the barcode reader did not respond to the command of reading image (even it did not launch light reading or beebing)
I have corresponded with the manufacturer and I await a reply
if there are any suggestions Many Thanks :)
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#4: Oct 19 '09

re: Why the barcode did not respond to image capture Command


I'm sorry to say that I cannot understand what parts are working well and not working well.

All works well... Scanner reads well... does not read well...

Quote:
even it did not launch light reading or beebing)
These are not indications of receiving a command in most barcode readers.
A beep happens when the scanner is successful at decoding a barcode, to let you know it is done/successful.

That the scanner did not *try* indicates that it did not receive the command to scan.

Hopefully the manufacturer will be able to help.
Newbie
 
Join Date: Oct 2009
Posts: 5
#5: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


i'm sorry Mr.tlhintoq on vague of my last response

here is my code
Expand|Select|Wrap|Line Numbers
  1.         private  SerialPort Com ;        
  2.         private delegate void DataReadDel(string Text);
  3.  
  4.         private void Form1_Load(object sender, EventArgs e)
  5.         {
  6.             Com = new SerialPort("COM4");
  7.             Com.Open();
  8.             Com.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
  9.         }
  10.         private void port_DataReceived(object sender,SerialDataReceivedEventArgs e)
  11.         {
  12.             Com.Encoding = Encoding.Default;
  13.             this.BeginInvoke(new DataReadDel(DataReceived), new object[] {Com.ReadExisting() });
  14.         }
  15.         private void DataReceived(string dR)
  16.         {
  17.             textBox1.Text = dR;
  18.         }
  19.         private void button1_Click(object sender, EventArgs e)
  20.         {
  21.             if (! Com.IsOpen )
  22.             {
  23.                 Com.Open();
  24.             }
  25.             Com.Write("IMGSNP1B1L");//1B 1L these parameter to make the barcode and illuminate beep when it reads
  26.             Com.Write("IMGSHP");//to ship image from memory
  27.             string imgbytes = Com.ReadExisting();// return "" :(
  28.         }
this is what manufacture documentation say :
An image is taken when the Image Snap (IMGSNP) command is processed. The last image is always stored in memory. You may “ship” the image by using the IMGSHP command.

any suggestion
I appreciate your time many thanks :)
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,148
#6: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


Well converting your potential image to text seems like a bad plan.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#7: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


Quote:
An image is taken when the Image Snap (IMGSNP) command is processed. The last image is always stored in memory. You may “ship” the image by using the IMGSHP command.
I don't think you need to go this direction.
You don't really care about taking an image do you? Do you need an image of the barcode you are reading?
You really only want to have the reader to the reading and decoding - then return the value of the barcode.
If you just get an image, then you need to do the decoding yourself. Yuck.
You might want to re-read the PDF and find a command that returns the decoded barcode.
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#8: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


Quote:

Originally Posted by Plater View Post

Well converting your potential image to text seems like a bad plan.

Usually a barcode scanner will do the decoding. It shouldn't be an image translated to text. It should be the value of the barcode returned as text:

*123456789*
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,745
#9: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


Quote:
Expand|Select|Wrap|Line Numbers
  1.             Com = new SerialPort("COM4");
  2.             Com.Open();
  3.  
That's just not going to be sufficient in the real world.
You need to set the parameters of the port if you want to talk to the device
Com.Baud = 9600
Com.Parity
Com.Handshake

and so on. If you don't talk at the right speed, with the right parameters then you aren't talking at all.
Newbie
 
Join Date: Oct 2009
Posts: 5
#10: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


Thnaks Plater i can add the following line
Expand|Select|Wrap|Line Numbers
  1. Byte[] dR =Encoding.ASCII.GetBytes(imgbytes)
  2.  
Because the function ReadExisting() return string
but the problem that it return "" there is no bytes so there is no image captured
Newbie
 
Join Date: Oct 2009
Posts: 5
#11: 4 Weeks Ago

re: Why the barcode did not respond to image capture Command


Mr. tlhintoq in fact my interest and my question here from the beginning about the possibility of taking image and not read the barcode :)
and the barcode reader has the ability to take a picture
In a very easy way the barcode reader able to read the barcode
But the problem I have in some cases may need to take image
(Not for barcode it self but image for passport or product etc.. Which doesn't contains a barcode ) so I have to question
For the code : this is an example only and not a real project in the real project
I verify all the existing ports and assign the correct values to each property of barcode .....
Actually like you said when the barcode is read it return text as follows:

???#???????24-8#062xx000z8k#L",dsh4y.[eg|p$eW47uCآ=^'(zk1jbdQL u!a#@(,NtaBoxFX}DI^n(رkgtm8<jyB.V,Sg@Yo?eexmNd~*"K TP]!{OKGTل9nTV%Q1q-VW%0M=,WI+^jYx8<{ZMVde[JAXBhT.IلBxIJLKliiGflP:<TCyM{<Ts75)scj"w_oوs-m_e8P-Lk~;H1%NF"Or+HS>KVkTU:(2.BqYl+}Uxmb4Gx)E2pznT`Gt.J zD<UXd!Z~>>#&KYJ]:#S!(g}Av=24;098:<93362;7916>>;80;2;061?

thaaaaaaaaaanx a lot .
Reply