Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: xenofon daskalopoulos
  Where is xenofon daskalopoulos?
 Athens
 Greece
 xenofon daskalopoulos
 Tags
Subject: mimic serial barcode reader
Thread ID: 185108 Message ID: 185108 # Views: 43 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Tuesday, July 22, 2008 12:13:45 PM         
   


Hello,


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



COMPLETE THREAD
mimic serial barcode reader Posted by xenofon daskalopoulos @ 7/22/2008 12:13:45 PM
RE: mimic serial barcode reader Posted by Richard Clarke @ 7/22/2008 12:41:41 PM
RE: mimic serial barcode reader Posted by xenofon daskalopoulos @ 7/23/2008 8:04:43 AM
RE: mimic serial barcode reader Posted by Tomas Chvatal @ 7/22/2008 9:33:10 PM
RE: mimic serial barcode reader Posted by xenofon daskalopoulos @ 7/23/2008 8:11:59 AM
RE: mimic serial barcode reader Posted by Tomas Chvatal @ 7/23/2008 10:24:00 AM
RE: mimic serial barcode reader Posted by xenofon daskalopoulos @ 7/23/2008 1:25:38 PM