mimic barcode reader RRS feed

  • Question




    here is a problem i have with serial communication:

    I have a wood machine that comes with a software that reads barcodes from a serial barcode reader (RS232) in order to get specific cutting information. This barcode has 26 characetrs. The barcode reader also send carriage return as suffix value.  The program works ok with these settings. The change i must do is as follows:

    The barcode reader must be removed from this pc and an other pc will be installed right next to the first one. The new pc wil produce the 26 character information and send it to the original pc through serial ports. In this way normaly nothing need to be changed to the first pc.

    So i connect the two pc's with serial cable and the new pc runs this code:

    At the init event of a form i open serial port with MSCOMM ocx


    ** Init Event

    thisform.olecontrol.CommPort = 1

    thisform.olecontrol.settings ='9600,n,8,1'
    thisform.olecontrol.portOpen =.t.


    one button of the form has the following code:

    thisform.olecontrol.output = cStr +chr(13)+chr(10)    && cStr stands for the 26 character barcode 


    Even though i 've tested with hyperterminal and the receive string seem's ok, the original pc's program founds error in receiving.

    What could be the mistake here?


    Thanks in advance


    Daskalopoulos Xenofon 

    Tuesday, July 22, 2008 9:22 AM


All replies

  • What os do you have ?

    You may check http://support.microsoft.com/kb/q130728/ for MSCOMM32.OCX

    Tuesday, July 22, 2008 12:07 PM
  • Maybe you only need CHR(13), not CHR(13) + CHR(10)?

    Tuesday, July 22, 2008 8:28 PM
  • both pc's have windows xp service pack2 and i'm familiar with serial mscomm32.ocx




    Daskalopoulos Xenofon

    Wednesday, July 23, 2008 5:57 AM
  • I 've tried but it doen't work.


    Daskalopoulos Xenofon


    Wednesday, July 23, 2008 5:58 AM
  • Check the code transmitted by the barcode device. For example, Code39 needs to have * on both sides of the code. Maybe you are not mimicking the barcode device fully.

    Wednesday, July 23, 2008 5:07 PM
  • the barcode protocol used is code128.It is printed by me so i know that none other character before of after trasmitted


    Thursday, July 24, 2008 5:47 AM
  • Still an issue?


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Twitter, Wiki)

    Wednesday, October 10, 2012 1:08 AM